JMeter may be used to test performance, to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types.
First download and install all necessary packages:
1. Java
– http://www.oracle.com/technetwork/java/javase/downloads/index.html
– Setup the environment variables
2. Jmeter
– Download Jmeter from following website, select the latest zip file:
http://jmeter.apache.org/download_jmeter.cgi
After download extract the downloaded zip file to folder C:\jmeter (or any favorite folder)
Jmeter configuration tip:
By default, JMeter do not save threads count in JTL files. If you plan to work with JMeter JTL files, you should enable it by uncommenting in JMETER_INSTALL_DIR/bin/jmeter.properties the line:
#jmeter.save.saveservice.thread_counts=false
and set it to true:
jmeter.save.saveservice.thread_counts=true
3. Download Badboy software from site:
Click on Download, fill the form and Click on Continue.
Download the latest version
Install Badboy software, execute the downloaded .exe file.
4. Download Jmeter plug-ins from following website:
http://code.google.com/p/jmeter-plugins/
Extract the downloaded file and just copy the JAR files into JMeter’s lib/ext directory (C:\jmeter\lib\ext)
Creating and Running the application:
With Badboy software you can record your script. Start the installed software.
In the address bar enter the URL of a website or application you want to test.
To start recording just press the ENTER key.
To stop recording click on Record On /Off button.
After the script is recorded you have to import this script into Jmeter.
Click on File -> Export to Jmeter.
Select location, enter your Script Name and click on Save. The file will be saved with .JMX extension.
After the script is saved run JMeter:
Go to “bin” folder (C:\jmeter\bin) and execute Jmeter file
Import the recorded script into Jmeter:
– Click on File – Open. Navigate to the location where you saved the recorded file and click on it and click on Open.
After the script is loaded you can change the Thread group properties:
– Click on Thread group and the properties will be displayed in the right side window. Here you can change/define the Number of treads, Ramp-Up period and loop. The default value is 1.
The next step is Selecting the Result formats. Right click on Thread group. On padding menu click on Add – Sampler. From this list you can select the most appropriate Sampler(s) according to the results that you need.
After you select the Result format you can now Start the Thread group:
Click on Run – Start(or just click on green play button). This will start the loaded script.
Similar Posts from the author:
- Getting started with JMeter II – record traffic with Jmeter
- Configuring Selenium RC using Eclipse
- Mobile testing – Screen recording on Android – non-rooted device
- Comparison of web-based bug tracking tools
- Usertesting
2 thoughts to “Getting started with JMeter”
In the latest versions of Jmeter we can record test-scenarios without BadBoy, just using HTTP Proxy server.
Here is blog post about how to record Jmeter test plan.
We have looked into it. It is a pretty useful function. We made a quick tutorial on how to start recording test scenarios: https://blog.wedoqa.com/2013/04/getting-started-with-jmeter-ii-record-traffic-with-jmeter/
Comments are closed.