← Back to list

android-unit-testing
by jtakumi
camera with face tracking
⭐ 0🍴 0📅 Jan 12, 2026
SKILL.md
name: android-unit-testing description: Run Android JVM unit tests via Gradle, collect reports, and fix failures. Use when asked to run/repair unit tests or CI test failures.
Scope
- JVM unit tests (Gradle
test*UnitTest) first. - Instrumented tests are out of scope unless explicitly requested.
Preconditions
- Use the repo's Gradle Wrapper (
./gradlew). - Prefer deterministic commands; avoid “try random flags”.
Step-by-step
1) Discover test tasks
- List modules and test tasks:
./gradlew tasks --all | grep -E "test.*UnitTest|:test"
- Identify common tasks:
:app:testDebugUnitTesttestDebugUnitTest(root aggregation if present)- flavors:
test<Flavor><BuildType>UnitTest
2) Run unit tests
- First attempt (fast, useful output):
./gradlew testDebugUnitTest --stacktrace
- If multi-module, run the failing module task explicitly:
./gradlew :<module>:testDebugUnitTest --stacktrace
3) Collect evidence
- Always locate HTML report paths, e.g.:
<module>/build/reports/tests/
- Extract:
- failing test class/method
- assertion message
- stacktrace root cause
4) Fix strategy
- Prefer fixing production code bugs vs weakening tests.
- If test is flaky:
- remove time dependence
- isolate coroutines/dispatchers
- mock IO/network
- Keep changes minimal and explain tradeoffs.
5) Re-run and confirm
- Re-run the exact same command.
- If CI uses a different variant, also run that variant.
Output format
- Command(s) executed
- Failures summary (table)
- Root cause
- Patch + why
- Validation commands
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon