Skip to content
RED SAGSkills
mediumMobile App Developer interview question

What testing strategy do you use for a mobile app, and what do you test at each level?

What the interviewer wants to hear

  • Many fast unit tests for ViewModels, use cases and mappers
  • Integration tests for repositories, database and network with fakes
  • A smaller set of UI tests for key user journeys
  • Snapshot or screenshot tests for visual regressions
  • Run on CI, plus testing on real devices or device farms

Model answer

I follow the test pyramid. Most tests are fast unit tests for ViewModels, use cases, mappers and validation, with fake repositories and a test dispatcher so they are deterministic. Next are integration tests: Room or SQLite migrations, repository logic with a mock web server, and serialization of real API samples. On top is a small set of UI tests for critical journeys like login, checkout and onboarding, written with Compose testing or Espresso on Android, XCUITest on iOS, or Maestro or Detox for cross-platform apps, all against a fake backend. Screenshot tests catch visual regressions across themes and font sizes. Everything runs on CI for each pull request, and before release we run the UI suite on a device farm covering low-end devices and older OS versions.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Mobile App Developer questions