If you want to start Apache JMeter in non-GUI mode, use the following command line options:
- -n – non-GUI mode – this specifies JMeter is to run in non-GUI mode
- -t – JMX file – location of the test plan and the name of JMX file that contains the Test Plan
- -l – log file name of JTL file to log sample results to
jmeter -n -t my_test_plan.jmx -l log.jtl
- -j – name of JMeter run log file
- -r – Run the test in the servers specified by the JMeter property “remote_hosts”
- -R – list of remote servers Run the test in the specified remote servers
- -H – proxy server hostname or ip address
- -P – proxy server port
jmeter -n -t my_test_plan.jmx -l log.jtl -H my.proxy.server -P 8000
Tips for running JMeter in non-GUI mode:
- here are details on how to add jmeter to the PATH variable of your environment
- remove any listeners that are GUI mode specific (you can do this by opening your JMX file in GUI mode and remove the GUI specific listeners)
- get summary results in the terminal by activating the summary option in the jmeter.properties file
Additional scripts that come with Apache JMeter installation can be found in the /bin folder where you’ve downloaded JMeter.
For Windows systems:
- jmeter-n.cmd – drop a JMX file on this to run a non-GUI test
- jmeter-n-r.cmd – drop a JMX file on this to run a non-GUI test remotely
- mirror-server.cmd – runs the JMeter Mirror Server in non-GUI mode
- shutdown.cmd – Run the Shutdown client to stop a non-GUI instance gracefully
- stoptest.cmd – Run the Shutdown client to stop a non-GUI instance abruptly
For Unix/Linux systems:
- mirror-server.sh – runs the JMeter Mirror Server in non-GUI mode
- shutdown.sh – Run the Shutdown client to stop a non-GUI instance gracefully
- stoptest.sh – Run the Shutdown client to stop a non-GUI instance abruptly
The commands will only be accepted if the scripts are run from the same host. Details on how to start JMeter on Mac system can be found here. Also, here is how to load test a website with Apache JMeter.
Thanks for reading. I hope you learned something interesting about React!
If you found this article useful, please share it with others. Don’t forget to subscribe to get notified for the upcoming articles.