linux下使用命令行执行jmeter的方法


JMeter -n -t 文件名.jmx -l log.jtl

 

 

来进行测试,如果无法执行请检查自己机器的环境变量.
参数说明:

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

 

上面这段说明来自 JMeter 的官方用户手册。其中提到了使用命令行方式运行 JMeter 脚本的方法。只有几个简单的参数,很直观,用起来也很方便。好处是可以节省一些系统资源。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM