首页 > 解决方案 > Jmeter 执行脚本但提供空白报告

问题描述

我在 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

标签: linuxdockerserverjmeter

解决方案


我也经历过。就我而言,问题在于 JMeter 组件“CSV 数据集配置”上设置的路径。当我在我的机器上执行项目时,Jmeter搜索并找到了路径,但是上传到服务器后我忘记根据服务器环境更改CSV路径。更改后,测试在服务器上执行正常。因此,请检查您的 JMeter 项目中是否有类似的东西。


推荐阅读