JMeter 如何在达到特定错误率时停止测试

JMeter How to stop the test when we reach specific error rate

我正在运行 JMeter 中进行性能测试。我想知道如何 stop/abort 准确地在达到 5% 百分比时进行测试。

我们有这样的选择吗?

首先通过下载jar安装plugins-manager,将其放入lib/ext并重启jmeter。

然后安装Auto-Stop监听器插件:

将其添加到您的计划中并按以下方式配置:

请注意,我已将其他标准设为 0 以禁用它们。

  1. 其中一个选项是使用 AutoStop plugin. Example test plan: AutoStopExample_ErrRate.jmx
  2. 如果需要,您可以使用 Taurus tool as a wrapper, this way you will have real-time console and/or web reporting and possibility to benefit from extra features, one of them is Pass/Fail Criteria Subsystem which is powerful and flexible way of applying custom failure conditions to your test. Moreover it will return non-zero exit code which makes your test scripting and CI friendly. Check out Navigating your First Steps Using Taurus 运行 JMeter 测试以获得更多详细信息。