Back to skills
SKILL.md
Android Testing
ASecurityStandards for Unit Tests, UI Tests (Compose), and Hilt Integration
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added September 27, 2026
Works with
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add David-Li0406/meta-skill-evloving --skill android-testing --agent claude-codeAre you the author of Android Testing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/david-li0406-android-testing)---
name: Android Testing
description: Standards for Unit Tests, UI Tests (Compose), and Hilt Integration
metadata:
labels: [android, testing, junit, compose-test]
triggers:
files: ['**/*Test.kt', '**/*Rule.kt']
keywords: ['@Test', 'runTest', 'composeTestRule']
---
# Android Testing Standards
## **Priority: P0**
## Implementation Guidelines
### Unit Tests
- **Scope**: ViewModels, Usecases, Repositories, Utils.
- **Coroutines**: Use `runTest` (kotlinx-coroutines-test). Use `MainDispatcherRule` to mock Main dispatcher.
- **Mocking**: Use MockK.
### UI Integration Tests (Instrumentation)
- **Scope**: Composable Screens, Navigation flows.
- **Rules**: Use `createAndroidComposeRule` + Hilt (`HiltAndroidRule`).
- **Isolation**: Fake repositories in DI modules (`@TestInstallIn`).
## Anti-Patterns
- **Real Network**: `**No Real APIs**: Always mock network calls.`
- **Flaky Delays**: `**No Thread.sleep**: Use IdlingResource or 'waitUntil'.`
## References
- [Test Rules](references/implementation.md)
Files in this skill
- SKILL.md
- references/implementation.md
Attribution
Comments
Loading comments…