jmeter_ use the command line to run

 

 Use non-GUI mode, that command-line mode to run JMeter test script can greatly reduce the system resources needed.

The method under Windows running in command line mode:

1, Command Introduction

-n -t JMeter < testfile filename > -l < logfile filename > 
Example: jmeter -n -t test.jmx -l test.jtl 

Example Meaning: -n nonGUI mode (i.e., non-GUI command line) 
-t file Example JMeter name .jmx
the -l jmeter log file name .jtl
the remarks run in command-line mode test.jmx file, the output of the log file is test.jtl

 

2, parameters introduced

-h, –help -> prints usage information and exit
-n, –nongui -> run JMeter in nongui mode
-t, –testfile <argument> -> the jmeter test(.jmx) file to run
-l, –logfile <argument> -> the file to log samples to
-r, –runremote -> Start remote servers (as defined in remote_hosts)
-H, –proxyHost <argument> -> Set a proxy server for JMeter to use
-P, –proxyPort <argument> -> Set proxy server port for JMeter to use

 

 

3, the script runs

JMeter defaults to the current directory to find the script file and logging in the current directory.

If your script in a different directory, and want to put the results in another folder, you need to use absolute or relative path tells JMeter, as follows:

(See if WARING given 5)

 

The results are shown for the above test: performed with 20 cases, the error rate of 0%, indicating a successful execution of all cases.

 

4, Report Viewer

You can view the test report test.jtl in GUI mode

1, open Jmeter GUI interface

2, in the test plan, the report added party

3, corresponding to the test result file is added, as in FIG.

 

5, WARING error:

Run, type regedit to open the registry editor

 

Guess you like

Origin www.cnblogs.com/happy-xiaoxiao/p/9960498.html