如何在 JMeter 5.3 中验证整个 JSON 响应?
How to verify entire JSON response in JMeter 5.3?
有没有办法在 JMeter 5.3 中验证整个 JSON 响应?我在不同的线程中看到了一些答案,但需要在最新版本的 JMeter 中验证最佳解决方案?
我尝试使用 JSON 断言,但出现错误。
JSON 回复是一个常规回复,您可以使用 Response Assertion
将 Field to Test
设置为文本响应
the response text from the server, i.e. the body, excluding any HTTP headers.
并且在 Pattern Matching Rules
中,如果您可以按原样验证 JSON 文本,请使用 Equals
Equals - true if the whole text equals the pattern string (case-sensitive)
如果您需要正则表达式,请使用 Matches
Matches - true if the whole text matches the regular expression pattern
有没有办法在 JMeter 5.3 中验证整个 JSON 响应?我在不同的线程中看到了一些答案,但需要在最新版本的 JMeter 中验证最佳解决方案?
我尝试使用 JSON 断言,但出现错误。
JSON 回复是一个常规回复,您可以使用 Response Assertion
将 Field to Test
设置为文本响应
the response text from the server, i.e. the body, excluding any HTTP headers.
并且在 Pattern Matching Rules
中,如果您可以按原样验证 JSON 文本,请使用 Equals
Equals - true if the whole text equals the pattern string (case-sensitive)
如果您需要正则表达式,请使用 Matches
Matches - true if the whole text matches the regular expression pattern