Assertions (Checkpoints)
It is used to verify the response
generated for sampler.
There are multiple types of
assertions in JMeter, some of them are
- Response Assertion
- Duration Assertion
- Size Assertion
Response Assertion
The response assertion
control panel lets you add pattern strings to be compared against various
fields of the response. Add the Response Assertion as a child tag for each HTTP
Request Page.
Attributes of Response Assertion
Attribute
|
Description
|
Apply to
|
Main
sample only - it applies to the main samples
Sub-samples only - it applies to the sub-samples Main sample & sub - samples - it applies to both the main & sub Samples JMeter Variable - it applies to the contents of the named variable |
Response Field to Test
|
Instructs
JMeter which field of the Response to test
|
Ignore status
|
Instructs
JMeter to set the status to success initially. When the Ignore Status
checkbox is selected, the Response status is forced to successful before
evaluating the Assertion.
|
Pattern Matching Rules
|
Indicates
how the text being tested is checked against the pattern
|
Patterns to Test
|
A list
of patterns to be tested. Each pattern is tested separately. If a pattern
fails, then further patterns are not checked
|
Duration Assertion
The Duration Assertion tests that each
response was received within a given amount of time. Any response that takes
longer than the given number of milliseconds (specified by the user) is marked
as a failed response.
No comments:
Post a Comment