Android ले धेरै परीक्षण प्रकारहरू समर्थन गर्दछ — unit tests (logic, JVM मा चल्छ), instrumented tests (device/emulator मा चल्छ, Espresso सहित UI tests सहित), र अन्य धेरै। राम्रो परीक्षण रणनीतिले विश्वसनीयता र आत्मविश्वास सुधार गर्दछ।
परीक्षण प्रकारहरू
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
