Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The skill of Jmeter running on the command line

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

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

-n this parameter indicates that Jmeter is running in non-graphical mode (that is, command line mode).

-t saves the JMX file with the test case

-l JTL file that saves the sample results

-r runs all the remote services defined in JMeter.properties (or overrides the remote services defined in the configuration file through the command line). The script also allows you to specify optional firewall / proxy server information:

-H proxy server hostname or IP address

-Port number of the P proxy server

The above paragraph is from the official user manual of JMeter. It mentions the method of running JMeter scripts on the command line. There are only a few simple parameters, which are intuitive and convenient to use. The advantage is that some system resources can be saved.

When trying 300 virtual users to run continuously for 5 minutes-using GUI mode, it was found that UI had lost its response shortly after it started running, and an error about AWT was prompted, which could only end the Java process. But it is stable when using the command line method.

However, when trying 500 virtual users to run continuously for five minutes on the command line, JMeter threw an Out of Memory exception and exited the process.

Note:

1. Check whether the current directory is the% JMeter_Home%in directory before executing the command

two。 If the JMeter script is not in the current directory, you need to specify the full path; if you want to save the results of execution somewhere else, you need to specify the full path as well.

Scan it and follow us. We'll have good luck.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report