Android testing
Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/android-testing
🧠The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.
npx -y skills add ComeOnOliver/skillshub --skill android-testingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Standards for Unit Tests, UI Tests (Compose), and Hilt Integration. Use whenever writing Android test files or asking about runTest, composeTestRule, HiltAndroidRule, MockK, MainDispatcherRule, @TestInstallIn, or how to test a ViewModel/Composable/Repository in Android. (triggers: **/*Test.kt, **/*Rule.kt, @Test, runTest, composeTestRule, HiltAndroidTest, MockK, createAndroidComposeRule, MainDispatcherRule, @TestInstallIn)
SKILL.md
1.2 KB, 193 tokens by cl100k_base, as published. Nobody here has run it
Android Testing Standards
Priority: P0
Implementation Guidelines
Unit Tests
- Scope: ViewModels, Usecases, Repositories, Utils.
- Coroutines: Use
runTest(kotlinx-coroutines-test). UseMainDispatcherRuleto 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
- No Real Network in Tests: Always mock with MockK or fake repositories via @TestInstallIn.
- No Thread.sleep: Use IdlingResource or composeTestRule.waitUntil for async timing.
References
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.