There are many types of assertions in JMeter, and I don't list them here, just the---I use to respond to assertions.
Function: An HTTP request is sent out, how to determine the success of the task performed? The task fails by checking that the server responds to the data, whether the expected data is returned, and if so, the task is successful.
1. How to add
Select a sampler, right-click Add, Assert, and select "Response assertion"
(1) Apply to
Regarding the scope of application, most of us tick "main sample only" is enough, because we have a request, essentially only one request. However, when we send a request, we can trigger multiple server requests, there is the main sample and sub-sample of the points.
(2) The response field to be tested
Tick "Response text" to verify in the response data.
(3) Matching rules
Tick "include", meaning that if the corresponding data contains the field to be verified, the task succeeds.
(4) the mode to test
That is, the data value that needs to be verified.
2. View running Results
(1) Failed tasks
View results Tree Task result color red when judging for task failure.
(2) Successful tasks
To determine the success of the task, view the result tree task result color green.
Interface test Tool-jmeter using notes (four: responding to assertions)