10
Performance testing with JMeter

Performance testing with JMeter. 100% pure Java desktop application Designed to load test client/server software (such as a web application ) JMeter

Embed Size (px)

Citation preview

Performance testing with JMeter

100% pure Java desktop application Designed to load test client/server software

(such as a web application ) JMeter 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.

Stefano Mazzocchi of the Apache Software Foundation was the original developer of JMeter.

He wrote it to test the performance of Apache JServ (later renamed Apache Tomcat project).

Click the following link to download the Jmeter zip folder◦ http://apache.cs.utah.edu//jmeter/binaries/jakarta-

jmeter-2.5.1.zip

To install a release build, simply unzip the zip/tar file into the directory where you want JMeter to be installed. ◦ We will use C:/JMeter

Provided that you have a JRE/JDK correctly installed and the JAVA_HOME environment variable set, there is nothing more for you to do.

The installation directory structure should look something like this

To run Jmeter◦ run the jmeter.bat (for

Windows) ◦ run jmeter.sh (for Unix)

These files are found in the bin directory.

After a short pause, the JMeter GUI should appear.

A test plan describes a series of steps JMeter will execute when run.

A complete test plan will consist of one or more ◦ Thread Groups◦ Logic conrollers◦ Sample generating controllers◦ Listeners◦ Timers◦ Assertions◦ Configuration elements

All controllers and samplers must be under a thread group.

The thread group element controls the number of threads JMeter will use to execute your test.

The controls for a thread group allow you to: ◦ Set the number of threads ◦ Set the ramp-up period ◦ Set the number of times to execute the test

These drive the processing of a test. Two types of Controllers:

◦ Samplers ◦ Logical Controllers.

Samplers tell JMeter to send requests to a server.

Logical Controllers let you customize the logic that JMeter uses to decide when to send requests.

Provide access to the information JMeter gathers about the test cases while JMeter runs.

Additionally, listeners can direct the data to a file for later use. Every listener in JMeter provides a field to indicate the file to store data to.

There is also a Configuration button which can be used to choose which fields to save, and whether to use CSV or XML format.

Note that all Listeners save the same data; the only difference is in the way the data is presented on the screen.

Listeners can be added anywhere in the test, including directly under the test plan. They will collect data only from elements at or below their level.