Interview practice question
Tests call a real third-party API
Backend Engineering · Testing · Beginner
Your tests call a real payment provider's API, so they are slow, sometimes fail and occasionally hit rate limits. What should you change?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Don't depend on external services in unit/integration tests.
- Wrap provider behind interface; fake it.
- HTTP stubs (WireMock, nock, responses).
- Separate few contract/sandbox tests.
- Run sandbox tests on schedule.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.