AGENT SKILL
android-testing-unit
Write fast, focused Android unit tests for reducers, use cases, repositories, and lifecycle-safe state holders.
- License 许可
- MIT
- 最近更新
- 2026-06-10
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- android-testing-unit
- metadata
- { "tags": [ "android", "testing", "unit-tests", "verification" ], "owners": [ "@android-agent-skills/maintainers" ], "version": "0.1.0", "category": "quality-release", "triggers": { "exclude": [ "ui screenshot only", "play store listing", "apk alignment" ], "include": [ "android unit test strategy", "test viewmodel reducer android", "repository unit tests android", "mock coroutine dependency android", "fast test coverage android" ] }, "test_targets": [ "examples/orbittasks-compose", "examples/orbittasks-xml", "benchmarks/triggers.jsonl" ] }
- description
- Write fast, focused Android unit tests for reducers, use cases, repositories, and lifecycle-safe state holders.
03 SKILL.md 正文
Android Testing Unit
When To Use
- Use this skill when the request is about: android unit test strategy, test viewmodel reducer android, repository unit tests android.
- Primary outcome: Write fast, focused Android unit tests for reducers, use cases, repositories, and lifecycle-safe state holders.
- Handoff skills when the scope expands:
android-testing-uiandroid-ui-states-validation
Workflow
- Scope the risk surface: correctness, security, performance, test depth, or release automation.
- Pick the narrowest verification strategy that still catches the likely regressions.
- Instrument the workflow so failures are actionable rather than just red.
- Run the relevant checks on the showcase apps and packaging outputs.
- Capture any residual risk with explicit follow-up work and owner skills.
Guardrails
- Prefer reproducible checks in CI over one-off local heroics.
- Fail with a precise remediation path instead of a vague quality gate.
- Keep secrets, signing material, and production credentials out of examples and fixtures.
- Treat performance and security work as engineering tasks with evidence, not folklore.
Anti-Patterns
- Adding more tests without increasing signal.
- Shipping benchmarks or security scans that no one can reproduce.
- Hard-coding release credentials into build logic.
- Using synthetic metrics with no user-impact interpretation.
Examples
Happy path
- Scenario: Cover reducer and formatter logic in both fixture apps with focused local tests.
- Command:
cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest && cd ../orbittasks-xml && ./gradlew :app:testDebugUnitTest
Edge case
- Scenario: Mock sync failures and permission-denied branches without instrumentation.
- Command:
cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest
Failure recovery
- Scenario: Separate unit-testing requests from UI testing or general architecture cleanup.
- Command:
python3 scripts/eval_triggers.py --skill android-testing-unit
Done Checklist
- The implementation path is explicit, minimal, and tied to the right Android surface.
- Relevant example commands and benchmark prompts have been exercised or updated.
- Handoffs to adjacent skills are documented when the request crosses boundaries.
- Official references cover the chosen pattern and the main migration or troubleshooting path.
Official References
04 同仓库更多 Skills
youtube-content
YouTube transcripts to summaries, threads, blogs.
★ 3
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
★ 3
touchdesigner-mcp
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.
★ 3
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
★ 3
teams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
★ 3
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
★ 3