How to run JMeter in non-GUI mode

Most of you've faced below OutOfMemoryError: Java heap space error during JMeter execution.

There are multiple ways to resolve it,

1. Increase the Java Heap Size in Jmeter.Bat file.
2. Increase the system RAM to your fit requirements.
3. Running JMeter in non-GUI mode. Yes, we're going to explain about non-GUI mode.

JMeter GUI is basically for recording,scripting and debugging purpose only. While running JMeter in GUI mode, produce high loads and consume more resources in the system which produces unreliable results. So highly recommending non-GUI mode for load testing. Here explains its detailed steps.

1.Take command line.
2.Navigate to JMeter 'bin' directory.
3.Enter below command in command line.
jmeter -n –t test.jmx -l testresults.jtl
-n  non-GUI mode
indicates that it is a non-GUI mode execution.
-t  test script name
We need to specify the name of test script file to be executed. Here test.jmx is the file.
-l  results file name
Name of the generated output file. In the above example testresults.jtl is the name of the output file.  Please find the below screenshot about non-GUI execution.


Once the execution is over you can see the generated results file in Jmeter 'bin' folder.

Share this