仅在n个断言错误之后才停止JMeter测试执行 [英] Stop JMeter test execution only after n assertion errors

查看:594
本文介绍了仅在n个断言错误之后才停止JMeter测试执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在JMeter 2.13中模拟压力测试.我的想法是在达到一定的响应时间上限后停止测试,我使用持续时间断言"节点进行测试.

I am modelling stress tests in JMeter 2.13. My idea of it is to stop the test after certain response time cap is reached, which I test with Duration Assertion node.

但是,我不希望在第一次失败之后停止测试的执行-在其他情况下,这可能只是一个事件.我希望在 n 次声明错误后执行失败,因此我可以相对确定系统压力很大,并且平均响应应该在我定义的上限附近,这就是我想要的上限停止整个事情.

I do not want, however, to stop the test execution after first such fail - it could be a single event in otherwise stable situation. I would like the execution to fail after n such assertion errors, so I can be relatively sure the system got stressed and the average response should be around what I defined as a cap, which is where I want to stop the whole thing.

我正在使用JMeter插件中的Stepping Thread Group.在那里,我可以使用一个复选框在发生错误后停止测试,但这是第一次进行.我在文档中没有其他节点可以对其进行建模,因此我猜想有一个暂时无法解决的解决方法.

I am using Stepping Thread Group from JMeter plugins. There I could use a checkbox to stop the test after an error, but it does that on first occasion. I found no other node in documentation that could model it, so I'm guessing there's a workaround I'm not seeing right now.

推荐答案

关闭但不完全符合您的要求:Auto-Stop Jmeter插件.请参见此处.您可以将其配置为在一定时间内失败n%的情况下停止测试.

Close but not exactly what you're asking for: The Auto-Stop Jmeter plugin. See the documentation here. You can configure it to stop your test if there are n% failures in a certain amount of time.

如果您想要特定数量的错误,则可以将测试操作采样器与if-controller-if(errorCount = n)测试操作停止测试结合使用

If you want a specific number of errors, you can use a test-action sampler, combined with an if-controller - if (errorCount = n) test-action stop test

这篇关于仅在n个断言错误之后才停止JMeter测试执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆