Wednesday, 7 May 2014

Jmeter tests in non-GUI mode

Why we need to use non gui mode ? 

One of the way to resolve java.lang.OutOfMemoryError is by running Jmeter in non-gui-mode. 

First prepare your test plan with Jmeter and save it, let's say the file name is 'script.jmx'.


Second Apache JMETER_HOME/bin folder using command shell. And then run Jmeter with the following parameters, to execute the test.


Command :

jmeter -n -t C:\TestScripts\script.jmx -l C:\TestScripts\scriptresults.jtl















-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].


Test is running the results will be saved in the 'mytest_results.jtl'