Daily iOS
Testing

Layers of test automation

You're adding automated tests to the listing feature of a secondhand marketplace app for the first time. What would you put on each of the three layers: unit tests, API contract tests, and UI tests?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Unit tests take most of the listing rules, such as price validation and required fields, a few contract tests cover the request and response shape of the listing API, and one or two UI tests walk from attaching photos to a completed listing, with the fast layers running on every PR.

Share a question