Documente Academic
Documente Profesional
Documente Cultură
WORKING
User Manual: How to Operate JMeter
Document Information
Prepared By:
Reviewed By:
Recommended for
Approval By:
Approved By:
Table of Contents
Chapter 1. Overview:........................................................................................................................................................................................................ 4
1.1. Types of tests that can be done using JMeter:.............................................................................................................................................. 4
Chapter 2. Downloading and installation of JMeter ................................................................................................................................................. 4
2.1. Downloading: ....................................................................................................................................................................................................... 4
2.2. Installation: ............................................................................................................................................................................................................ 5
Chapter 3. Making your first test plan ......................................................................................................................................................................... 5
3.1. Adding thread group ........................................................................................................................................................................................... 5
3.2. Adding Sampler ................................................................................................................................................................................................... 6
3.3. Adding Listener.................................................................................................................................................................................................... 7
3.3.1. View Results in table ................................................................................................................................................................................ 7
3.3.2. View results tree ......................................................................................................................................................................................... 7
Chapter 4. Performance and Load testing ................................................................................................................................................................... 8
4.1. Performance testing............................................................................................................................................................................................. 8
Chapter 5. Recording a UI Test: .................................................................................................................................................................................. 10
5.1. What is recording?............................................................................................................................................................................................. 10
5.1.1. By Using template.................................................................................................................................................................................... 10
Chapter 6. How to read data from a CSV file .......................................................................................................................................................... 14
6.1. Setting up a CSV file: ....................................................................................................................................................................................... 14
6.2. How to log in multiple users at a time in CBAS using a .CSV file: .................................................................................................... 16
Chapter 1. Overview:
The Apache JMeter™ application is open source software, a 100% pure Java 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.
1.1. Types of tests that can be done using JMeter:
Apache JMeter may be used to test performance both on static and dynamic resources (Web
services (SOAP/REST), Web dynamic languages - PHP, Java, ASP.NET, Files, etc. -, Java
Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load
on a server, group of servers, 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.
Chapter 2. Downloading and installation of JMeter
2.1. Downloading:
As JMeter is an open source software it can be easily downloaded from the official web site of
Apache i.e. http://jmeter.apache.org/ and by clicking on download releases you can get latest
version of JMeter.
Note: Note that you have to click on zip files for downloading JMeter.
2.2. Installation:
Following steps must be followed while installation of JMeter into your system
1. As JMeter is a pure java application it works only in the environment where java is
installed.
2. If you don’t have java or JDK installed you must have to download it first by clicking on
the given link
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-
2133151.html
3. After installing JDK go to your downloads i.e. where you have downloaded JMeter,
extract it because it is a zip file.
4. This extracted folder may contain many sub menu find the “bin” then click on j-meter,
remember that you have to click on bat file, for opening JMeter.
5. Steps would be like this downloads>jmeter>bin>Jmeter batch file
6. Following will be the front screen of Jmeter.
Here we have seen that all the users are tested by a single button.
Note: Note that the green sign show the success behavior and the red sign indicates the failure of
the test plan.
A fail test plan would be like this:
Note: We will have to configure our browser for such type of recording, it only works on Mozilla
Firefox, and for configuring following will be screen.
Now in your browser write down the address of your website and you clearly seeall the actions
are recording into the JMetre.
Following are some screens of recording a UI test using templates.
2. After that you should add sampler and add a child of it ADD CSV DATA SET CONFIG,
see following figure.
3. In this data set confiq, you have to type file name and variable name which you are
passing for the user login.
4. In HTTP request following image will guide you to type some parameters of the request.
5. Because I have my variables as email and password in the .csv file, you use any variables
which you want.
6. Following will be the result of this .csv data set config.
6.2. How to log in multiple users at a time in CBAS using a .CSV file:
JMeter also allow logging into same application by many users at a same time. This can easily be
done using a csv file which contain PP No, Password and verification code. We call this csv file
into our JMeter script and run the script for the results. This script also has live recording of
application under test and we apply csv data set config in our request.
Following are the screen shots of script.
1. We have CBAS application under test. First of all we will record the application behavior
which is previously done.
At this stage when we run the script we will clearly see that user of multiple branches are logging
into CBAS. Following are the screen shots for the passed script.