我在Docker内的Linux服务器中以非GUI模式运行Jmeter。当我检查jmeter是否安装时,它在其中说明了版本,但是当我执行脚本时,如下所示 -
root@xxxxxxx:/# /var/xxxxx/apache-jmeter-5.1/bin/jmeter -n -t /lib/xxx/deduction.jmx -l test.jtl
Creating summariser <summary>
Created the tree successfully using /lib/xxx.s/deduction.jmx
Starting the test @ Tue May 14 05:54:53 UTC 2019 (1557813293320)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
summary = 0 in 00:00:00 = ******/s Avg: 0 Min: 9223372036854775807 Max: -9223372036854775808 Err: 0 (0.00%)
Tidying up ... @ Tue May 14 05:55:53 UTC 2019 (1557813353945)
... end of run
同一文件在我的Windows计算机中正常工作。
root@xxxxxx:/# /var/xxxxxx/apache-jmeter-5.1/bin/jmeter -v
_ ____ _ ____ _ _ _____ _ __ __ _____ _____ _____ ____
/ | _ / / ___| | | | ____| | | / | ____|_ _| ____| _
/ _ | |_) / _ | | | |_| | _| _ | | |/| | _| | | | _| | |_) |
/ ___ | __/ ___ |___| _ | |___ | |_| | | | | |___ | | | |___| _ <
/_/ __| /_/ _____|_| |_|_____| ___/|_| |_|_____| |_| |_____|_| _ 5.1 r1853635
Copyright (c) 1999-2019 The Apache Software Foundation
我也经历过。就我而言,问题是Jmeter组件" CSV数据集配置"上的路径集。当我在计算机上执行项目时,Jmeter搜索并找到了路径,但是上传到服务器后,我忘了根据服务器环境更改CSV路径。更改后,测试在服务器上执行正常。因此,检查您的Jmeter项目是否有类似的东西。