JMeter - 超过最大执行时间时发送错误消息但不停止请求
JMeter - Send error message when exceeding a max execution time but do not stop request
我的测试计划中有一些 HTTP 请求,我想分析哪些在特定时间限制内执行,哪些不执行。 PreProcessor Sample Timeout 在这里可能很有用,但我也想检查 HTTP 请求本身是否正常工作,所以我需要在超过时间限制时不停止请求。
完美的行为是,如果请求超过超时时间,则将其标记为红色,并且我们仍然可以看到实时执行时间和请求结果。
有办法吗?
您需要将 Duration Assertion 添加到您的请求中,它会将请求标记为失败(红色),但让请求完成并保存其响应/加载时间
A Duration Assertion can be used to detect responses that take too long to complete.
例如断言消息:
Assertion failure message: The operation lasted too long: It took 15,111 milliseconds, but should not have lasted longer than 1,000 milliseconds.
我的测试计划中有一些 HTTP 请求,我想分析哪些在特定时间限制内执行,哪些不执行。 PreProcessor Sample Timeout 在这里可能很有用,但我也想检查 HTTP 请求本身是否正常工作,所以我需要在超过时间限制时不停止请求。
完美的行为是,如果请求超过超时时间,则将其标记为红色,并且我们仍然可以看到实时执行时间和请求结果。
有办法吗?
您需要将 Duration Assertion 添加到您的请求中,它会将请求标记为失败(红色),但让请求完成并保存其响应/加载时间
A Duration Assertion can be used to detect responses that take too long to complete.
例如断言消息:
Assertion failure message: The operation lasted too long: It took 15,111 milliseconds, but should not have lasted longer than 1,000 milliseconds.