Jmeter non-GUI command line execution script file

Source: Internet
Author: User

Introduced

When performing a performance test, the Jmeter Official document declaration is not recommended in the GUI, and the command line needs to be used at this time.

First Step: Environment configuration

Add the JMeter installation directory \ Bin to the system environment variable path

Step Two: Command parameters

-N command-line mode
-T Script path
-L test Result path (JTL or CSV)
-j Log Path
-R Distributed execution
-R remote Server list
-G Generate test Report
-e Setup test report is generated after testing is completed
-O Specify test report generation folder
-H Proxy Server IP
-P Proxy Server port

Examples are as follows:

Jmeter-n-T C:\apache-jmeter-5.0\My_Source\test02.jmx-l C:\apache-jmeter-5.0\My_Source\Result\testreport.jtl-e-o C : \apache-jmeter-5.0\my_source\report

Step three: Complete and batch execution

(1) Each time the above command is re-executed, it is necessary to manually clean up the report file, so it is better to automatically clean up, we just need to maintain the script on the line

(2) Create a new bat file

Write:

/s/q C:\apache-jmeter-5.0/s/q C:\apache-jmeter-5.0\my_source\report# Rebuild the test Report folder (modify the custom directory for new users) MD C:\apache-jmeter-5.0\my_source\report# perform the test (new user please modify custom directory) # need to put JMeter installation directory \ Bin added to system variable # command interpretation:-N for non-gui,-t specified script (script file name cannot contain Chinese characters),-l Specify run result file save path, e    -set test report after completion,-o     -n-t C:\apache-jmeter-5.0\my_source\test02.jmx-l C:\apache-jmeter-5.0\my_source\ RESULT\TESTREPORT.JTL-E-o C:\apache-jmeter-5.0\my_source\report

(3) At this point, complete

(4) Follow-up can be considered into Python, in order to more convenient and fast

Reference documents

https://testerhome.com/topics/12114

Jmeter non-GUI command line execution script file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.