← All Prompt Categories

📚 LLM HUB · 2 PROMPTS

Assertions & Validations

2 copy-ready AI prompts for assertions & validations in JMeter, k6, and Gatling. Part of the JMeter.AI LLM Hub.

Comprehensive Assertion Setup

Generate a complete set of JMeter assertions for an HTTP request that:
- Returns HTTP 200 OK
- Returns Content-Type: application/json
- Response body contains "status":"success"
- Response body does NOT contain "error"
- Response time is under [N]ms
- Response size is between [N] and [N] bytes

Provide XML for:
1. Response Assertion (status code)
2. Response Assertion (content type header)
3. JSON Assertion (body content)
4. Response Assertion (negative. must not contain)
5. Duration Assertion (SLA enforcement)
6. Size Assertion

Include scope and failure message for each.

JSON Schema Validation

I need to validate that my API response matches an expected JSON schema. The expected structure is:
[Paste expected JSON response]

Generate:
1. JMeter JSON Assertion to validate required fields exist
2. JSR223 Assertion with Groovy to perform deeper schema validation
3. k6 equivalent using check() with multiple conditions
4. Explain the difference between asserting presence vs asserting value