Write Android unit, Compose UI, and Hilt-integrated tests. Use when designing test behavior with MockK or coroutine test utilities; defer database/WorkManager-specific recipes to the owning feature skill.
62
78%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/android/android-testing/SKILL.mdQualitative reasoning framework to evaluate unit test value:
[MOB-TEST-01] Tripartite Naming: Name tests Method_Scenario_ExpectedBehavior (e.g. submitOrder_whenCreditLimitExceeded_displaysBlockedBanner).[MOB-TEST-02] State & ViewModel Invariant Rule: Assert UI state transitions (e.g. StateFlow/UiState via Turbine test {}); ban asserting 30-property boilerplate state copies.[MOB-TEST-03] Entity Invariant & Serialization Rule: Test calculations, validations, domain invariants, and non-trivial serialization/parsing or error mapping. Ban testing auto-generated code, trivial getters, or echo tests repeating literal assignments.[MOB-TEST-04] Contract Testing Rule: Repositories and data sources must be tested for contract compliance and error mapping. Ban 1:1 pass-through mock echoing (coEvery { dataSource.get() } returns x; repo.get() == x).[MOB-TEST-05] Bug-First Regression Lock: Every PR fixing a bug ticket or with title fix(...) must introduce a failing test reproducing the defect before fixing it.runTest with MainDispatcherRule. Mock with MockK or fakes.createAndroidComposeRule + Hilt (HiltAndroidRule). Fake repositories via @TestInstallIn.[MOB-TEST-01] Vague names: Banish non-descriptive test names.[MOB-TEST-02] Brittle state copies: Ban asserting 30-property boilerplate state copies; use focused state assertions or Turbine.[MOB-TEST-03] Echo tests: Ban testing auto-generated code, trivial getters, or repeating literal assignments.[MOB-TEST-04] Pass-through mock echoing: Ban 1:1 pass-through mock echoing and shallow assertions without contract checks.[MOB-TEST-05] Missing bug reproduction: Ban bug fix PRs without reproduction tests.composeTestRule.waitUntil for async timing.HoangNguyen0403/agent-skills-standard
4bb4994
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.