Clear description of why this prerequisite is required.
This description should explain:
The description helps developers understand the dependency relationship and aids in debugging when prerequisites fail.
Guidelines for good descriptions:
MUST be written in English. Never use other languages.
The API endpoint that must be called before the main operation.
This specifies the exact HTTP method and path of the prerequisite API. The endpoint must be a valid operation defined elsewhere in the API specification. Path parameters in the prerequisite endpoint can reference the same parameters available in the main operation.
Prerequisite API operation dependency.
IPrerequisite
defines a dependency relationship between API operations, specifying that certain endpoints must be successfully called before the current operation can proceed. This ensures proper resource validation, state checking, and data availability in complex API workflows.CRITICAL WARNING: Authentication is NOT a Prerequisite
NEVER use prerequisites for authentication or authorization checks!
Prerequisites are ONLY for business logic dependencies such as:
Do NOT create prerequisites for:
Authentication is handled separately via the
authorizationActor
field on the operation itself. Mixing authentication with business prerequisites creates confusion and incorrect test scenarios.Core Concept
Prerequisites create an execution dependency graph for API operations. They explicitly declare which APIs must succeed before attempting the current operation, preventing invalid states and ensuring data consistency.
Structure
Each prerequisite consists of:
Common Use Cases
1. Resource Existence Validation
2. Parent-Child Relationships
3. State Prerequisites
4. Business Logic Dependencies
Implementation Guidelines
Test Generation Usage
The Test Agent utilizes prerequisites to:
Best Practices
Example