Android inasaidia aina kadhaa za upimaji — unit tests (logic, zinaendeshwa kwenye JVM), instrumented tests (zinaendeshwa kwenye kifaa/emulator, ikiwa ni pamoja na UI tests kwa Espresso), na zaidi. Mkakati mzuri wa upimaji huboresha uaminifu na ujasiri.
Aina za upimaji
UNIT TESTS (local, on the JVM) → test logic (ViewModels, repositories, utilities):
→ fast (no device); use JUnit, Mockito/MockK (mocking), no Android framework needed
→ for business logic, data processing, ViewModels
INSTRUMENTED TESTS (on a device/emulator) → test code needing the Android framework:
→ UI tests (ESPRESSO — interact with and verify the UI), integration tests
→ slower (real device/emulator) but test real Android behavior
