Reputation: 2825
I have a .jmx file of all of my test plans and I want to create a batch file. When I click that, everything starts and ends automatically. So that I can provide it to my client as well to verify that I have performed the load test on his website. How can I achieve this?
Upvotes: 0
Views: 21408
Reputation: 11
Just write the following command in a text file and save this file as SomeName.bat
@ECHO OFF
jmeter -n -t "Your .jmx file path" -l "Your .jtl file path"
For example:
@echo off
jmeter -n -t F:\DEV\WORKSPACE\buyer.jmx -l F:\DEV\WORKSPACE\output.jtl
After saving click on that bat file. The test plan result will be stored into .jtl file.
Note: Make sure you put this bat file into JmeterinstallationDirectory/bin folder.
Upvotes: 1
Reputation: 7339
jmeter does not support running batch of .jmx files as document part 2.4.3 (Command Line Mode) gives to us. I would recommend you to try 2 approaches:
1) to follow best practices of running jMeter in non GUI mode. In accordance to this approach you are expected to use the command
jmeter -n -t D:\TestScripts\script.jmx -l D:\TestScripts\scriptresults.jtl
Where the pareameters:
-n [This specifies JMeter is to run in non-gui mode]
-t [name of JMX file that contains the Test Plan]
-l [name of JTL file to log sample results to]
-j [name of JMeter run log file]
2) to use any cloud service for running your .jmx file.
BlazeMeter (http://blazemeter.com/) worked for me fine.
One can adjust the test plan settings. Testing results can be seen on “Load Report” tab as soon as test finishes. For detalization one can follow Getting Started: Scripting with JMeter steps.
Hope this works for you.
Upvotes: 5