Skip to content
Back to skills

Android Testing

ASecurity

Standards for Unit Tests, UI Tests (Compose), and Hilt Integration

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
testingkotlintestingapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill android-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Android Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-android-testing/badge)](https://www.skillsdirectory.com/skills/david-li0406-android-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.md1 KB
  • references/implementation.md940 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…