using apache jmeter to perform load testing agains

10
OraclePoint.com Using Apache JMeter to perform load testing against database Apache JMeter is a 100% pure Java desktop application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. Apache JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. You can use it to make a graphical analysis of performance or to test your server/script/object behavior under heavy concurrent load. This tutorial will only demonstrate a simple SQL load testing example against Oracle via JDBC. Step 1: Download Apache JMeter The Apache JMeter is downloadable at http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi . We chose the binary version on 2.3.2 for our windows xp workstation. Step 2: Installation The installation could be done by extracting the downloaded zip. That’ s it. Step 3: JDBC access to oracle database To conduct the load testing against oracle database, setting up JDBC connection is required. It’ s also easy to do that: copying ojdbc14.jar at $ORACLE_HOME/jdbc/lib to folder lib under Apache JMeter installation destination. Step 4: Start Apache JMeter Launching batch file jmeter.bat in folder bin will start Apache JMeter as following.

Upload: patrickwangrui

Post on 11-Apr-2015

3.381 views

Category:

Documents


2 download

DESCRIPTION

Apache JMeter is a 100% pure Java desktop application designed to load test functionalbehavior and measure performance. It was originally designed for testing Web Applications buthas since expanded to other test functions.Apache JMeter may be used to test performance both on static and dynamic resources (files,Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can beused to simulate a heavy load on a server, network or object to test its strength or to analyzeoverall performance under different load types. You can use it to make a graphical analysis ofperformance or to test your server/script/object behavior under heavy concurrent load.This tutorial will only demonstrate a simple SQL load testing example against Oracle via JDBC.

TRANSCRIPT

Page 1: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

Using Apache JMeter to perform load testing against database

Apache JMeter is a 100% pure Java desktop application designed to load test functionalbehavior and measure performance. It was originally designed for testing Web Applications buthas since expanded to other test functions.

Apache JMeter may be used to test performance both on static and dynamic resources (files,Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can beused to simulate a heavy load on a server, network or object to test its strength or to analyzeoverall performance under different load types. You can use it to make a graphical analysis ofperformance or to test your server/script/object behavior under heavy concurrent load.

This tutorial will only demonstrate a simple SQL load testing example against Oracle via JDBC.

Step 1: Download Apache JMeter

The Apache JMeter is downloadable athttp://jakarta.apache.org/site/downloads/downloads_jmeter.cgi . We chose the binary version on2.3.2 for our windows xp workstation.

Step 2: Installation

The installation could be done by extracting the downloaded zip. That’s it.

Step 3: JDBC access to oracle database

To conduct the load testing against oracle database, setting up JDBC connection is required. It’salso easy to do that: copying ojdbc14.jar at $ORACLE_HOME/jdbc/lib to folder lib underApache JMeter installation destination.

Step 4: Start Apache JMeter

Launching batch file jmeter.bat in folder bin will start Apache JMeter as following.

Page 2: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

Step 5: Adding new “Thread Group”

Page 3: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

For my testing example, I had the following configuration about “Thread Group”

Number of Threads(users): 10 Ramp-Up Period (in seconds): 1 Loop Count: 10

Step 6: Adding JDBC connection

Page 4: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

Page 5: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

The JDBC setting for this example are:

Database URL: jdbc:oracle:thin:@your_db_server_IP:1521:jonathan JDBC Driver class: oracle.jdbc.driver.OracleDriver Username: scott Password: tiger

Step 7: Adding JDBC request

Page 6: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

In Query box, you can type any sql you want to test against oracle database.

Step 8: Adding aggregate report

Page 7: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

Step 9: Saving Test Plan

Page 8: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

Step 10: Run Testing

Page 9: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

Page 10: Using Apache JMeter to Perform Load Testing Agains

OraclePoint.com

In Summary

This is quite simple demo to show how to use Apache JMeter to do loading test against oracledatabase via JDBC. Apache JMeter offers a way to test SQL loading and performance. Byexamining above report, we have no idea to tell that throughput at 33.8/min is good or not. Thefeasible way to use Apache JMeter more effectively is to perform typical sql statement on idletime and peak time to get threshold about performance. And, those threshold will be the criteriato evaluate further sql loading test and performance.