Run jmeter script using command line

Source: Internet
Author: User
2.4.3 non-Gui mode (command line mode)

for non-interactive testing, you may choose to run jmeter without the GUI. To do so, use the following command options

-n This specifies jmeter is to run in non-Gui mode

-T [name of JMX file that contains the test plan].

-L [name of jtl file to log sample results to].

-r run all remote servers specified in jmeter. properties (or remote servers specified on command line by overriding properties)

the script also lets you specify the optional Firewall/Proxy Server Information:

-H [Proxy Server Hostname or IP address]

-P [proxy server port]

example : jmeter-n-t my_test.jmx-l log. jtl-H My. Proxy. Server-P 8000

The above section is from jmeter's official user manual. The following describes how to run the jmeter script using command line. There are only a few simple parameters, which are intuitive and easy to use. The advantage is that it can save some system resources.

Today, when 300 virtual users are trying to run for five consecutive minutes-using the GUI, the UI will lose response shortly after it starts running, and a AWT error will be prompted, the Java Process can only be ended. However, the command line is stable.
However, when trying to run 500 virtual users for five consecutive minutes in command line mode, jmeter throws an out of Memory exception and exits the process.

Note:
1. Check whether the current directory is % jmeter_home % \ bin before executing the command;
2. If the jmeter script is not in the current directory, you must specify the complete path. If you want to save the execution result elsewhere, you must also specify the complete path.

 

 

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.