add_response_assertion
Add a response assertion under an HTTP sampler to fail the sample when the response does not match specified patterns, enabling automated validation in JMeter test plans.
Instructions
Add a Response Assertion under an HTTP sampler, to fail the sample if the response doesn't match.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"planId": "<planId>",
"parentId": "<parentId>",
"patterns": "<patterns>"
},
"name": "add_response_assertion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| not | No | Negate the match (assert the pattern does NOT match) | |
| name | No | Response Assertion | |
| planId | Yes | ||
| parentId | Yes | ||
| patterns | Yes | ||
| matchType | No | contains | |
| testField | No | response_data |