Integration Test Recipes
Welcome to the Gherkio Recipe Book! This section compiles production-grade design patterns and actionable code templates to solve complex, real-world integration testing challenges.
Rather than simple syntax references, these recipes show how to orchestrate high-performance, resilient, and secure test suites against live microservices.
πΊοΈ Recipe Catalogue
Select a recipe below to dive into real-world code templates and design patterns:
| Recipe | Core Use Case | Primary Focus |
|---|---|---|
| π Authentication & Token Recycling | Dynamic login, JWT claim extraction, and recycling bearer tokens. | Security & Identity |
| π¦ Bulk Upload & Collections | Submitting JSON sequences and asserting conditions across collections (all(), count()). | Data Pipelines & Lists |
| β Negative & Error Validation | Verifying business constraints, bad payloads, and detailed API error shapes. | Contract Resilience |
| π Async Polling & Consistency | Handling eventual consistency and long-running tasks using dynamic backoff retries. | Event-Driven Systems |
| π‘οΈ Multi-Account Role Boundaries | Asserting RBAC limitations and security boundaries across different users. | Authorization Security |
| π Contract Verification with Schemas | Validating complex JSON bodies against centralized reusable schema rules. | Structural Testing |
| β‘ Parallel Execution Safety | Orchestrating concurrent test runs securely using dynamic thread-safe parameters. | Performance & Speed |
| ποΈ Database Seeding & Data Strategies | Setting up and tearing down transient data states to guarantee test isolation. | State Management |
π‘ How to Use These Recipes
- Copy & Adapt: Each recipe includes a fully valid Gherkio DSL YAML snippet. Copy it into your
.gherkio/tests/directory and replace the mock URLs with your system's endpoints. - Utilize Environments: Combine these recipes with Gherkio's environment configurations (
.gherkio/environments/) to run the exact same tests acrosslocal,staging, andproductiontargets without code modifications. - Integrate with CI/CD: Combine Parallel Execution and Data Management strategies to execute hundreds of validation scenarios inside your GitHub Actions, GitLab CI, or Jenkins pipelines in seconds.