Jmeter assertion applies to json response format assertion

The main test used to check whether the data obtained in line with expectations]

1, Response Assertion assertion [response]

 

zone 1:

Main Sample and sub-samples: matching range including the current parent and covering to the sub-sampler sampler.

Main sample only: only match the current parent sampler

Sub-samples only: Match only the sub-sampler

Jmeter variables Name to use: Support for variable values ​​to match Jmeter

District 2:

Text response (response text): text response returned by the server, HTTP protocol exclude Header section.

Response Code (the response code): matching response code, return code protocol such as HTTP "200" represents the success of

Response Message (response information): a matching response information, such as word processing successfully returns "success" or "OK" word.

Response Headers (response header): Match response headers.

Request Headers (request header): match request header

Url sampled (URL sample): Matching URL link.

Document (text): matching of response data (in text form).

Ingore Status (Status ignored): in response to assert a plurality of requests, wherein a first selected in response to this assertion, when a response to the first assertion failure can ignore the response result, continue with the next assertion. If the next assertion succeeds or can determine the success of things.

Request Data (request data):

Zone 3:

Contains (including): response contains the contents of the required match which represents a successful response, support for regular expressions.

Matches (match): In response to the content matches need to match exactly which represents a successful response, case-insensitive, support regular expressions.

Equals (equal): content to be exactly equal to the contents of the response need to match only on behalf of a successful response, case sensitive, need to match the contents of a string of non-regular expression.

Substring (substring): in response to the need to match the contents contained only representative of successful response, case sensitive, need to match the content of the non-regular expression is a string.

Not : If checked, the previously selected will be reversed. For example, just do not match Matches + Not even Pass.

OR:  If you do not want to connect with AND (all modes must match assertion to be successful), with the OR option can be used multiple assertions mode OR connection (as long as a match, the assertion is successful)

2, JSON Assertion [  applies to the assertion in response to json format ]

 

3, Size Assertion [http request Size asserted, the byte size]

4、JSR223 Assertion

 

5、XPath Assertion

 

6、Compare Assertion

 

7、Duration Assertion

 

8、HTML Assertion

 

9、MD5Hex Assertion

 

10、SMIME Assertion

 

11、XML Assertion

 

12、XML Schema Assertion

 

13、BeanShell Assertion

Guess you like

Origin www.cnblogs.com/hd-test/p/12217005.html