API Testing · Senior · Question 1 of 75

How should API tests be split across levels for a microservice?

Show the answer

Correct answer: Many unit and component tests, contracts between services, few E2E flows

Explanation

Component tests run the service with stubbed dependencies and cover logic fast. Contracts guard integrations; a handful of E2E flows prove the whole system works.

Further reading

Problem with a question

API Testing · Senior · question 1

Test yourself

Take the API Testing · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz