Virtualize a third-party service
Hard120 pts~45 min
- Service virtualisation
- Resilience
Practice app · Acme REST API
A live REST + GraphQL API with auth, validation, pagination, rate limiting and an interactive request console.
Your starter code already declares BASE_URL — call the API relative to it.
Objective
Drive a third-party client through a matrix of virtualised responses and assert your handling of each.
Your task
- 1Define cases: 200 (ok), 429 (retry later), 503 (unavailable), 404 (not found).
- 2For each code GET BASE_URL + "/status/{code}" and classify the result: success, retryable or permanent failure.
- 3Assert 429 and 503 are classified retryable and 404 permanent.
Acceptance criteria
- GET /status/429 returns 429
- GET /status/503 returns 503
- The cases are data-driven
- At least 4 assertions pass
Fixtures
- apiKey
- tqa_live_key_123
- basicUser
- admin
- basicPassword
- secret
- username
- qa@target.dev
- password
- Test@123
API testing · API Testing · Mocking & virtualization