Generate negative tests
generate_negative_testsGenerates negative and boundary test cases from an API spec for one endpoint, covering missing fields, wrong types, enum and limit violations, and missing credentials, expecting 4xx responses only.
Instructions
Negative and boundary tests for one operation (e.g. 'POST /orders'), derived from the spec, including nested fields and array items: missing required fields, wrong types, values outside enums and min/max/length/item limits, missing parameters, no credentials, unknown IDs. Every case must get a 4xx, never a 5xx; boundary cases that must be accepted clean up after themselves. base_values supplies real values for the valid parts (e.g. {"customerId": "${fixture.customer.id}"}) with fixtures=["customer"]. Save the result with write_flow.
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": {
"endpoint": "<endpoint>"
},
"name": "generate_negative_tests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | ||
| endpoint | Yes | ||
| fixtures | No | ||
| base_values | No |