Skip to content
Development
Skill

/android-testing

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.

From plugin
agent-skills-standard
538200 skills1 MCP
Install
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill android-testing --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/android-testing

Context preview

The summary Claude sees to decide when to auto-load this skill.

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.

SKILL.md

android-testing.SKILL.md
name: android-testing
description: 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.
metadata:
  triggers:
    files:
    - '**/*Test.kt'
    - '**/*Rule.kt'
    keywords:
    - "@Test"
    - runTest
    - composeTestRule
    - HiltAndroidTest
    - MockK
    - createAndroidComposeRule
    - MainDispatcherRule
    - "@TestInstallIn"

Android Testing Standards

**Priority: P0 (CRITICAL)**

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

  • **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

  • [Test Rules](references/implementation.md)
Ships withagent-skills-standard

The portable SDLC standards layer for AI coding agents. Sync once, then work in your own runtime.

Get the whole plugin

Other skills on agent-skills-standard.