我几天前写过测试,它们运行没有问题。
现在,当我尝试运行它们时,它们以代码 1 和错误消息退出:
An error occurred: null
我在 TeamCity 上运行它
.jtl 文件创建没有问题。
这是运行日志的片段。
[17:03:02][Step 2/2] jmeter args=-g tests/report/dynamic-checkout.jtl -o tests/report/dynamic-checkout
[17:03:03][Step 2/2] Dec 05, 2019 4:03:03 PM java.util.prefs.FileSystemPreferences$1 run
[17:03:03][Step 2/2] INFO: Created user preferences directory.
[17:03:03][Step 2/2] An error occurred: null
[17:03:03][Step 2/2] Process exited with code 1
[17:03:03][Step 2/2] Process exited with code 1 (Step: Performance Tests Execution (Command Line))
[17:03:03][Step 2/2] Step Performance Tests Execution (Command Line) failed
我试图找到解决方案,但我只找到了几篇关于 java 版本的文章。 stackoverflow 上其他问题中提供的解决方案:
alternatives --config java
当我尝试使用它时,TeamCity 向我显示,只有 1 个 java 版本并且被选中。
编辑: 我刚刚发现,即使测试本身也运行了 0 秒。
最佳答案
错误消息非常笼统,如果有更多信息需要继续处理,将会有所帮助。如果你愿意尝试这个,我建议你尝试使用 blazemeter taurus 看看它是否可以运行你的测试,taurus 会自动安装所有插件和依赖项。
因此,如果您的问题是由缺少的插件引起的,那么这应该可以解决。
关于testing - 生成 HTML 报告期间的 JMeter 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59199138/