Jmeter's response assertion

1. Response Assertion
Perform an assertion check on the response content of the server to determine whether the return value of the interface is correct.
Insert picture description here
2. Interface function description

1. Apply to: Usually one request will only trigger one server request, just check "main sampie only"; if one request can trigger multiple server requests, there are main sample and sub-sample points.

2. Response fields to be tested:
(1) For general http responses, check the "response text";
(2) Response code: http response code, such as 101, 200, 302, 404, 501, etc. When we want to verify http response codes such as 404 and 501, we need to check "ignore status". Because when the http response code is 400,500, jmeter defaults that the request failed;
(3) Response information: the response code corresponds to the response information, such as "OK"
(4) Response Header: matches the information in the response header

3. Pattern matching:
(1) Including: The returned result includes the content you specify and supports regular matching
(2) Matching: The response content must match the content exactly, case-insensitive
(3) equals: exactly equal, case-sensitive
(4) ) SubString: Similar to "include", it means that the returned result includes the content you specify, but subString does not support regular strings
(5) No: It is equivalent to negation. If the result of the assertion is true, after checking "No", the final assertion result is false. If the assertion result is false, after checking "No", the final assertion result is true

4. The mode to be tested: enter the expected value of the result

Guess you like

Origin blog.csdn.net/baidu_24752135/article/details/114105278