Skip to content
Back to skills

Android Testing

ASecurity

Use when writing or fixing unit tests, Compose UI tests or Maestro end-to-end tests in the Android app (AgenticApp), or when a pull request check is red.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 18, 2026
ai-agentsnodetestingapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 18, 2026

npx -y skills add erumkatzwan/agentic-product-starter --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/erumkatzwan-android-testing/badge)](https://www.skillsdirectory.com/skills/erumkatzwan-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: Use when writing or fixing unit tests, Compose UI tests or Maestro end-to-end tests in the Android app (AgenticApp), or when a pull request check is red.
---

# Android testing

Every story ships with all three layers. Pull requests cannot merge unless all checks are green.

| Layer | Where | Runs | Command |
|---|---|---|---|
| Unit | `app/src/test/` | View models, services, networking, flags (JVM, no emulator) | `make test-unit` |
| UI | `app/src/androidTest/` | Real app on the emulator with fixture data (Compose UI test) | `make test-ui` |
| End-to-end | `e2e/flows/*.yaml` (Maestro) | Full user journeys on the emulator | `make e2e` |

## Rules

- Unit tests use the test doubles in `app/src/test/.../TestDoubles.kt` (`FakeApiClient`, `FakeAuthService`, `FakeItemsRepository`, `FakePush`). No real network: `ApiClientTest` fakes HTTP with an OkHttp interceptor.
- Use `runTest` for suspend functions. Name tests by behaviour (`signInSavesTheToken…`) and structure them arrange / act / assert.
- UI and end-to-end tests launch with the extra `uiTesting=true`, so the app uses `FixtureApiClient` and `assets/fixtures/*.json`.
- Find elements by test tag (`onNodeWithTag`, Maestro `id:`), never by position or styling. Tags are exposed as resource IDs, so Maestro uses the same IDs as on iOS.
- Wait with `waitUntilAtLeastOneExists`, never `Thread.sleep`.
- Flip feature flags in tests with launch extras, for example `launch("FF_settings" to false)`.
- Coverage gate: logic coverage (screens, design system and Android glue excluded, see `scripts/check-coverage.py`) must stay at or above 70%.

## When a check is red

- `Android lint` – run `make lint`; fix every ktlint and Android Lint warning. `ktlint -F` fixes formatting.
- `Android spelling` – run `make typos`; fix the word or add it to `_typos.toml` if it is a real term.
- `Android unit tests and coverage` – run `make test-unit`; add tests if coverage dropped. The HTML report is in the job's artifacts.
- `Android UI tests` / `Android end-to-end tests` – run locally on an emulator, then open the test report artifact from the failed run.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.