Agent skill
Android Testing
Standards for Unit Tests, UI Tests (Compose), and Hilt Integration
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/testing-hoangnguyen0403-agent-skills-standar-9
Metadata
Additional technical details for this skill
- labels
-
android testing junit compose-test
- triggers
-
{ "files": [ "**/*Test.kt", "**/*Rule.kt" ], "keywords": [ "@Test", "runTest", "composeTestRule" ] }
SKILL.md
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
- Real Network:
**No Real APIs**: Always mock network calls. - Flaky Delays:
**No Thread.sleep**: Use IdlingResource or 'waitUntil'.
References
- Test Rules
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?