Running the JMeter test script in a non-GUI mode, the command-line mode, can significantly reduce the required system resources. Using commands
Jmeter-n-T <testplan filename>-L <listener filename>
Here are some of the commands we can use when running test scripts in non-GUI mode:
- -H help print out useful information and exit
- -N Non-GUI mode run JMeter in non-GUI mode
- -t test file, JMeter test script file to run
- Files that record results with-l log file
- -R remote execution, starting remote service
- -H proxy Host, setting up the proxy host used by JMeter
- -p proxy port, setting the port number of the proxy host used by JMeter
For example:
Jmeter-n-T test1.jmx-l logfile1.jtl-h 192.168.1.1-p 8080
https://girliemangalo.wordpress.com/2009/10/29/jmeter-run-scripts-from-the-console/
JMeter default to the current directory to look for script files, and log in the current directory. For example, if you execute the above command in the C:\tools\apache-jmeter-2.11\bin directory, JMeter will go to the directory to find the TEST1.JMX script and place the execution results in that directory. If your script is in a different directory and you want to put the execution results in a different folder, you can use the absolute path to tell JMeter, for example:
c:\tools\apache-jmeter-2.11\bin>jmeter-n-T e:/defonds/work/20141106/add/addcustomerscript.jmx-l e:/ DEFONDS/WORK/20141106/ADD/ADDCUSTOMERSCRIPT201411060954.JTL
The results of the execution can be viewed using aggregated reports in GUI mode, for example, if you want to see the ADDCUSTOMERSCRIPT201411060954.JTL report, you can
Open JMeter GUI interface, test plan, add thread group, add aggregation report, click "Browse ..." under "all data written to a file" button to find the Jtl file you just generated, you can visually analyze the results of the execution:
Run JMeter stress test using non-GUI mode