The Test Rules Writing Agent helps you define what success looks like for your API tests. Whether you’re checking status codes, validating response fields, or querying your database - Qodex lets you do it all with code or AI-assisted suggestions.Documentation Index
Fetch the complete documentation index at: https://qodex.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.

How It Works
- Go to any Test Scenario Navigate to any existing scenario, expand a test case in it and scroll down to the Test Rules section.
-
Choose how to write your rule
- Suggested Rules (AI-generated): Qodex recommends rules like “Status code should be 200” or “Response should include user_id.”
- Write Your Own:
- Use plain JavaScript to define validations
- Use our built-in helper functions like current_response_body, current_status_code, etc.
-
Two Rule Types Supported
- Assertion: Validates the response body, headers, status, etc.
- DB Validation: Run queries (e.g., PostgreSQL) to confirm backend state after an API call.