Ctrl K
QA · Senior · Theory

In 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?

~4 min by voice

How to approach it

This checks whether the candidate understands how consumer-driven contracts replace most of the brittle e2e tests in microservices, and whether they can honestly name the limits of the approach: a contract checks the shape of the interaction, not the business logic, and requires organizational agreements between teams.

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-levelYour 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? Mid-levelYou'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-levelHow would you organize testing for a system of fifteen microservices that communicate over REST and message queues? 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