jmeter Hi Guys, I have prepared the one simple Batch file running the...

  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

S

Surya Kosuri

Guest
Hi Guys, I have prepared the one simple Batch file running the jmeter scripts on a single click, it is running successfully on the windows machines. But it is not running on the Linux based machines.so I want the shell script for the below given code of batch file . @echo off d: cd D:\apache-jmeter-2016\bin java -jar ApacheJMeter.jar -n -t scriptname.jmx -j log1.log -l jtl1.jtl So please help me with the shell script for the above provided code (or) how to create a batch file using shell script for Non-GUI mode of execution for jmeter scripts flexible for windows and Linux based machines.
 
Suppose your jmeter folder is in root folder You have to just give the path of you script like Cd /jmeter/bin - n - t /home/script/script.jmx -l result.jtl
 
For Linux: -> Go to your apache-JMeter bin directory. Command: # cd /usr/apache-jmeter-2.13/bin/ (since my Jmeter in the "usr" directory) -> Here you will find a file named "runjmeter.sh". -> You can just edit this file like this "/usr/jdk1.8.0_25/bin/java -Xmx4096m -jar ApacheJMeter.jar -n -t test_script.jmx -l report.jtl" To do this: Command: # vi runjmeter.sh Edit the file like below formats: -jar ApacheJMeter.jar -n (for non gui) -t -l -> then commit the file. To Run your Test Script: Command: # sh runjmeter.sh (your test script must be kept in the apache-JMeter bin directory) Hope, this will help you. :)