The Android Testing Pyramid

Android's testing guide asks for "many small tests and relatively few big tests", arranged as a pyramid. The trade is fidelity against speed: a JVM test finishes in milliseconds but only simulates Android, while a test on a device exercises the real system but costs an install and minutes per run.

The testing pyramid, with the tools BookNest uses at each level
The testing pyramid, with the tools BookNest uses at each level

Plain Kotlin tests form the wide base, Robolectric runs Compose 234 , navigation and Hilt tests on the JVM in the middle, and a few device tests on top prove the pieces work together. Testing React Native Apps's React Native 36,878 app has the same shape, with Jest 62,362 at the bottom and Detox 12,028 or Maestro on top.