我在 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 项目中是否有类似的东西。
关于linux - Jmeter 执行脚本但提供空白报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56123969/