【问题标题】:JMeter - Send error message when exceeding a max execution time but do not stop requestJMeter - 超过最大执行时间但不停止请求时发送错误消息
【发布时间】:2018-05-30 07:16:26
【问题描述】:

我的测试计划中有一些 HTTP 请求,我想分析哪些在特定时间限制内执行,哪些不执行。 PreProcessor Sample Timeout 在这里可能很有用,但我也想检查 HTTP 请求本身是否正常工作,所以我需要在超过时间限制时不要停止请求。

完美的行为是,如果请求超过了超时时间,请求会被标记为红色,并且我们仍然可以看到实时的执行时间和请求结果。

有办法吗?

【问题讨论】:

    标签: http jmeter timeout jmeter-4.0


    【解决方案1】:

    您需要在您的请求中添加Duration Assertion,它会将请求标记为失败(红色),但让请求完成并保存其响应/加载时间

    持续时间断言可用于检测需要太长时间才能完成的响应。

    例如断言消息:

    Assertion failure message: The operation lasted too long: It took 15,111 milliseconds, but should not have lasted longer than 1,000 milliseconds.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-27
      • 2013-11-16
      相关资源
      最近更新 更多