Ctrl K
QA · Mid-level · Theory

Your service is integrated with an external payment provider, and on the test environment it's either unavailable or takes a minute to respond. How would you test this integration?

~4 min by voice

How to approach it

The interviewer wants to see whether you can isolate an unstable external dependency without losing confidence in the real integration. The key is understanding the risks of the payments domain: a timeout with an unknown outcome, retries, double charges, webhooks.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsThere's an endpoint POST /api/users: it accepts JSON with the fields email and name, and on success returns status 201 and the created user with the fields id, email, name and createdAt. Write automated tests for this endpoint: a positive scenario that checks the response schema, and a couple of negative ones. Mid-levelIn a system of twenty microservices, the end-to-end tests take a long time and fail constantly. How would you apply contract testing, and what won't it cover? SeniorHow do you set up testing for a service that works with a database, a message broker and a couple of external APIs? What do you test at which level? SeniorYou've been given a new REST endpoint for creating a user. What will you test? JuniorHow would you test a REST endpoint for creating an order, POST /orders? What would you check besides a successful response? Mid-level

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~4 min