Apache JMeter is an open source testing tool. JMeter functions to analyze and measure the performance of web applications with a variety of other services. The GUI mode of JMeter is perfect for adding and editing new configuration elements, thread groups, and samplers as a result of which you can view a number of different listeners helping for debugging.
However, the GUI mode does have a limitation which slows down the CPU utilization while running the recorded script. If we are running multiple listeners in a script, it affects the JMeter performance. To overcome such a situation, the script should be run in the non-GUI mode. There is a benefit to drive more requests per second out of JMeter in non-GUI mode.
Why to use JMeter in Non GUI/command line mode:
Running JMeter in command line mode:
Running JMeter using command line in non-GUI mode is very simple.
jmeter -n –t test.jmx -l testresults.jtl
-n: It specifies JMeter is to run in non-gui mode
-t: Name of JMX file that contains the Test Plan
-l: Name of JTL(JMeter text logs) file to log results
-j: Name of JMeter run log file
Other than these options, JMeter has several other parameters that can be used for running in the non-GUI mode.
-R: list of remote servers,
-H: proxy server hostname or ip address
-P: proxy server port
View test result:
Once your test is complete, you will see the following display:
After completing the test, a JTL file will be generated at jmeter2.12/bin folder
Follow below steps to view test results from the resultant JTL file.
Would love to address questions from the readers. Kindly post them in the comments section below.