Mock a downstream dependency
Medium70 pts~25 min
- Service virtualisation
- Test doubles
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
Use the payments endpoint as a virtualised payment gateway and test the happy path against it.
Your task
- 1POST BASE_URL + "/payments" with { "amount": 49, "cardNumber": "4242424242424242" }.
- 2Assert 200 and status === "approved".
- 3Assert transactionId is a non-empty string.
Acceptance criteria
- POST /payments returns 200
- At least 3 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