Skip to content

Testing

This section covers an Android testing strategy and focused tests for ViewModels, asynchronous code, and user interfaces. Choose a test level according to the behavior and risk, keeping most feedback fast and deterministic.

Suggested path

Start with the strategy: decide what to test and at which boundary. Then test state and events in ViewModels, control virtual time in coroutine tests, and use UI tests for interactions that require the Android or Compose runtime. The Code Review chapter helps connect tests with change risk.

Articles