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:

RecipeCore Use CasePrimary Focus
πŸ”‘ Authentication & Token RecyclingDynamic login, JWT claim extraction, and recycling bearer tokens.Security & Identity
πŸ“¦ Bulk Upload & CollectionsSubmitting JSON sequences and asserting conditions across collections (all(), count()).Data Pipelines & Lists
❌ Negative & Error ValidationVerifying business constraints, bad payloads, and detailed API error shapes.Contract Resilience
πŸ”„ Async Polling & ConsistencyHandling eventual consistency and long-running tasks using dynamic backoff retries.Event-Driven Systems
πŸ›‘οΈ Multi-Account Role BoundariesAsserting RBAC limitations and security boundaries across different users.Authorization Security
πŸ“ Contract Verification with SchemasValidating complex JSON bodies against centralized reusable schema rules.Structural Testing
⚑ Parallel Execution SafetyOrchestrating concurrent test runs securely using dynamic thread-safe parameters.Performance & Speed
πŸ—οΈ Database Seeding & Data StrategiesSetting up and tearing down transient data states to guarantee test isolation.State Management

πŸ’‘ How to Use These Recipes

  1. 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.
  2. Utilize Environments: Combine these recipes with Gherkio's environment configurations (.gherkio/environments/) to run the exact same tests across local, staging, and production targets without code modifications.
  3. 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.