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
