e-Zest members share technology ideas to foster digital transformation.

3 Simple ways to a JMeter Script

Written by Kishore Bhamare | Feb 14, 2018 5:15:44 AM

The Apache JMeter is basically used to measure performance of web applications with static and dynamic resources. With the help of Apache JMeter we can create virtual users, while simulating heavy load on servers, network or test objects. We can also analyse the performance of the application under different load conditions.

To do this we need to create JMeter script, and it can be done in following 3 ways:

1. Apache JMeter
2. Using Blazemeter chrome extension(Add On)
3. Badboy application

Apache JMeter

If you want to create a script using Jmeter, then for the first step you need to install Apache JMeter on your system.

1. Open Apache Jmeter.

2. In Workbench, add ‘HTTP(S) Test Script Recorder’.

3. Add Thread Group in Test Plan.

4. Add Recording Controller in Thread Group.

5. Go to ‘HTTP(S) Test Script Recorder’ and set Target Controller.

6. Click on Start button.

7. It starts recording. You can continue recording until the task is accomplished.

8. Add other test element in Test Plan and your script is ready.

BlazeMeter Chrome Extension

It is one of the easiest way to create JMeter script. Just add the addon (BlazeMeter Plugin) from Google Chrome store to Chrome browser.

1. After successfully installing, it displays Blazemeter icon on browser.

2. Click on Blazemeter icon.

3. Login to your BlazeMeter account. If you do not have an account then create an account.

4. After login, enter URL in the browser that you want to record and click on start
button to start recording.

5. You can perform your desired actions during this time.

6. After completing all actions, click on ‘Stop Recording’.

7. After the recording is complete, ‘Edit the recording before it’s uploaded’, ‘Export to Jmeter’, ‘Reset all Options’ and ‘Adjust Test Properties’ buttons will be enabled.

8. Click on ‘Export to Jmeter’ button.

9. Give the name and path to save .jmx file. It downloads the script.
    Save that script into Jmeter/bin folder.

10. Now you are ready to use Jmeter Script.

BadBoy

Badboy is an open source application (for a limited time frame) to create Jmeter scripts.

1. Download the Badboy application- Click on the link to download the application. http://www.badboy.com.au/download

2. It downloads the ‘BadboyInstaller-2.2.5.exe’ file.

3. Start installing setup.

4. After a successful installation, open Badboy GUI.

5. Enter your application URL for which you need to create the script.

6. It saves the transaction under Test Suite.

7. Explore the application.

8. Then go to ‘File’ menu.

9. Click on ‘Export to Jmeter’.

10. It exports your script in .jmx format.

11. You are ready to use the script.

As you can tell, these simple steps can be used to create the Apache JMeter script to make Performance Testing a breeze.