[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-76053":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},76053,"android-testing-skills","skydoves\u002Fandroid-testing-skills","skydoves","⚡️ A set of skills for Android testing: Compose UI, AndroidX Test, JVM unit tests, and ADB.","",null,"Shell",266,8,1,0,4,13,107,16,67.36,"Apache License 2.0",false,"main",[],"2026-06-12 04:01:20","# Android Testing Skills\n\n\u003Cimg width=\"1116\" height=\"444\" alt=\"cover\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F0cb8280f-aa4c-425a-95a6-c17995e6b33d\" \u002F>\n\nA library of [Agent Skills](https:\u002F\u002Fagentskills.io) for **Android testing**, covering the full\ntesting surface that an Android engineer touches, from unit-test fundamentals to ADB-driven E2E.\nThe skills are written for AI coding agents (Claude Code, Android Studio Agent mode, Gemini) but\nread fine for humans too: every API claim is grounded in an `androidx\u002F` file path or an\nauthoritative external doc, and every behavior note is sourced from primary research.\n\n> **Note.** You don't need all 54 skills. This is a catalog to pick from based on what your\n> project actually tests. Pull the Compose set if you write Compose UI tests, the ADB set if\n> you script CI, etc. Most projects use a handful at a time.\n\n54 skills across 7 sets:\n\n| Set | Skills | What it covers |\n|---|---:|---|\n| [`compose\u002F`](compose\u002F) | 25 | Jetpack Compose UI testing: finders, semantics matchers, assertions, gesture\u002Fkey injection, the test clock, idling resources, state restoration, Espresso interop, accessibility checks, audit, preview-driven development, on-device preview screenshot catalogs in CI, stability validation. |\n| [`fundamentals\u002F`](fundamentals\u002F) | 5 | Testing pyramid, what to test, test doubles (fake\u002Fstub\u002Fmock\u002Fspy\u002Fdummy), Given-When-Then strategies, source set organisation. |\n| [`kotlin\u002F`](kotlin\u002F) | 1 | Kotlin-native test tooling: the multiplatform `kotlin.test` library (`@Test`\u002F`@BeforeTest`, `assert*`, `assertFailsWith`, `Asserter`, the `kotlin(\"test\")` JUnit4\u002FJUnit5 capability). |\n| [`jvm-tests\u002F`](jvm-tests\u002F) | 6 | JVM unit tests: JUnit4 setup, Mockito + mockito-kotlin, MockK, kotlinx-coroutines-test (`runTest`), Turbine for flows, Robolectric. |\n| [`instrumentation\u002F`](instrumentation\u002F) | 6 | On-device tests: `AndroidJUnit4` runner, `ActivityScenario`, `FragmentScenario`, Espresso, UiAutomator, Gradle Managed Devices. |\n| [`platform\u002F`](platform\u002F) | 1 | Platform-shipped test tooling: migrating off the deprecated `android.test.*` classes (`ActivityInstrumentationTestCase2`, `AndroidTestCase`, `ServiceTestCase`, `MoreAsserts`, `TouchUtils`, `android.test.mock.*`) onto AndroidX Test. |\n| [`adb\u002F`](adb\u002F) | 10 | ADB-driven E2E: architecture, USB & wireless connection, app management, `am instrument`, input injection, screencap\u002Fscreenrecord, logcat, file transfer, CI scripting. |\n\n> Another skills: [**compose-performance-skills**](https:\u002F\u002Fgithub.com\u002Fskydoves\u002Fcompose-performance-skills)\n> covers the *performance* side of Compose: stability, recomposition, lazy layouts, modifiers, side\n> effects, measurement, baseline profiles, R8, hot reload. Same authoring spec; install both for full\n> coverage. See [Attribution](#attribution) for details.\n\n## 💝 Sponsors\n\nThe sponsors listed below made it possible for this project to be released as open source. Many thanks to all of them for their support!\n\n\u003Ca href=\"https:\u002F\u002Fcline.gg\u002Fjaewoong\">\u003Cimg src=\"art\u002Flogo-cline.png\" alt=\"Cline\" width=\"280\"\u002F>\u003C\u002Fa>\n\n**[Cline](https:\u002F\u002Fcline.gg\u002Fjaewoong)** is an open-source autonomous coding agent, and with Cline 2.0 the runtime that powers it across VS Code, JetBrains, and the CLI is now a programmable TypeScript SDK (`npm i @cline\u002Fsdk`). The agent loop is decoupled from providers (Anthropic, OpenAI, Google, Bedrock, and more) and extended via plugins, custom tools, hooks, and hub-backed sessions that outlive a single UI: inspectable, forkable, and built to be built upon.\n\n## What is a Skill\n\nA Skill is a single Markdown file (`SKILL.md`) plus optional `references\u002F` material that teaches\nan agent how to perform one focused task. It declares trigger vocabulary in YAML frontmatter and a\nnumbered workflow in the body. The agent reads the frontmatter, decides whether the skill applies\nto the current task, then follows the workflow inside `SKILL.md` step by step.\n\nA skill is not documentation for humans. It is operational instructions for an LLM. That changes\nthe writing voice: terse, imperative, RIGHT and WRONG snippet pairs, MUST and MUST NOT directives\nin bold caps, and a Verification checklist that proves the work was done. Prose is kept short.\nCode samples carry the load.\n\n## Directory layout\n\n```\nandroid-testing-skills\u002F\n├── README.md                     # this file\n├── INDEX.md                      # symptom + API + workflow lookup tables\n├── LICENSE                       # Apache-2.0\n├── docs\u002F\n│   ├── SPEC.md                   # authoring spec (frontmatter, voice, RIGHT\u002FWRONG, post-write self-check)\n│   └── CORPUS.md                 # research corpus (file paths, API tables, primary URLs)\n├── scripts\u002Finstall-skills.sh     # symlinks each skill into the agent's flat skills dir\n├── tasks\u002Fresearch\u002F               # 11 deep research reports (gitignored)\n└── \u003Cset>\u002F\u003Ccategory>\u002F\u003Cslug>\u002F\n    ├── SKILL.md                  # the skill (required)\n    └── references\u002F               # optional, one level deep\n```\n\nConventions:\n\n- **Set**: lowercase, one of `compose`, `fundamentals`, `kotlin`, `jvm-tests`, `instrumentation`, `platform`, `adb`.\n- **Category**: lowercase, varies per set (e.g. `compose\u002Fsetup`, `adb\u002Farchitecture`, `fundamentals\u002Fconcepts`).\n- **Slug**: gerund form, lowercase, hyphenated, max 64 chars. Unique repo-wide.\n- **Body length**: every skill stays under 500 lines. Longer material moves into `references\u002F`.\n- **Cross links**: relative Markdown links. Same category uses `..`; different category in same set uses `..\u002F..`; different set uses `..\u002F..\u002F..`. See [`docs\u002FSPEC.md`](docs\u002FSPEC.md) §7.\n\n## Installation\n\nSkill loaders (Claude Code, Android Studio Agent mode, Gemini) expect a **flat layout** of\n`\u003Cinstall-dir>\u002F\u003Cslug>\u002FSKILL.md`. This repo organizes skills under `\u003Cset>\u002F\u003Ccategory>\u002F\u003Cslug>\u002FSKILL.md`\nfor human readability. A plain `git clone` into `~\u002F.claude\u002Fskills` will NOT surface the skills\ndirectly. Use the bundled install script, which symlinks each skill folder by its slug into a flat\ntarget directory.\n\n> Why this matters. If you skip the install script, the agent loader sees `compose\u002F`, `fundamentals\u002F`, etc. as\n> top-level entries and never finds any `SKILL.md`. The script flattens the tree. **Always run\n> it after cloning** and after every `git pull`, since new skills only become discoverable\n> once their slugs are symlinked.\n\n### Claude Code\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fskydoves\u002Fandroid-testing-skills.git \\\n  ~\u002F.claude\u002Fskills-sources\u002Fandroid-testing-skills\n\n~\u002F.claude\u002Fskills-sources\u002Fandroid-testing-skills\u002Fscripts\u002Finstall-skills.sh\n```\n\nThe script is idempotent. It walks the repo, finds every `SKILL.md`, and creates one symlink per\nskill at `~\u002F.claude\u002Fskills\u002F\u003Cslug>\u002F`. It does NOT touch other entries in `~\u002F.claude\u002Fskills\u002F`, so it\ncoexists with `android skills add ...` (Google's first-party catalog) and with other community\nlibraries.\n\n```bash\n~\u002F.claude\u002Fskills-sources\u002Fandroid-testing-skills\u002Fscripts\u002Finstall-skills.sh \u002Fpath\u002Fto\u002Fagent\u002Fskills\n~\u002F.claude\u002Fskills-sources\u002Fandroid-testing-skills\u002Fscripts\u002Finstall-skills.sh --uninstall\n```\n\nAfter install, restart Claude Code so it re-scans the skills directory.\n\n### Android Studio Agent mode and Gemini\n\nThese agents discover skills at runtime by scanning project-local directories per Google's\n[Android skills documentation](https:\u002F\u002Fdeveloper.android.com\u002Ftools\u002Fagents\u002Fandroid-skills). Use the\nsame install script, targeting the project's agent skills directory:\n\n```bash\ncd \u003Cyour-android-project>\ngit clone https:\u002F\u002Fgithub.com\u002Fskydoves\u002Fandroid-testing-skills.git \\\n  .android-testing-skills-source\n\n.\u002F.android-testing-skills-source\u002Fscripts\u002Finstall-skills.sh .agent\u002Fskills\n```\n\nAdd `.android-testing-skills-source\u002F` to `.gitignore` so the project doesn't track upstream.\nUpdates are a single `git -C .android-testing-skills-source pull && .\u002F.android-testing-skills-source\u002Fscripts\u002Finstall-skills.sh .agent\u002Fskills`.\n\nEnd-to-end behavior with Android Studio Agent mode and Gemini has not been independently verified\nby the author. Reports of working or broken integration are welcome at the\n[issue tracker](https:\u002F\u002Fgithub.com\u002Fskydoves\u002Fandroid-testing-skills\u002Fissues).\n\n### Android CLI (first-party catalog only)\n\nThe [Android CLI](https:\u002F\u002Fdeveloper.android.com\u002Ftools\u002Fagents\u002Fandroid-cli) manages only Google's\nfirst-party skill catalog (`android skills add --skill r8-analyzer`, etc.). Community libraries\nsuch as this repo are outside that catalog and cannot be installed through the CLI. Use both\ntogether: `android skills add` for the first-party catalog, `install-skills.sh` for this library.\n\n### Claude.ai and the Claude API\n\nFor Claude.ai workspaces, upload the relevant `SKILL.md` files as Agent Skill attachments. For\ndirect Anthropic API integrations, reference skills inline in the system prompt or load them\nthrough the Agent Skills file API. The skills are self-contained: no external runtime is required\nbeyond a working Android toolchain on the developer's machine for the verification steps.\n\n### Other agent runtimes\n\nAny agent runtime that can read a Markdown file and follow its instructions can use these skills.\nThe frontmatter is plain YAML. The body is plain Markdown. Treat the `SKILL.md` files as system\nprompts for the task, attach the linked `references\u002F` files when the body cites them, and let the\nagent run the Verification checklist before declaring the work done.\n\n## Quickstart examples\n\n### Diagnose a flaky animation test\n\n> My LazyColumn animation test passes locally but fails on CI. There's a `Thread.sleep(500)` mid-test.\n\nThe agent matches on `flaky`, `animation`, `Thread.sleep`, `LazyColumn` and loads\n[`compose\u002Fsynchronization\u002Ftesting-animations-deterministically\u002FSKILL.md`](compose\u002Fsynchronization\u002Ftesting-animations-deterministically\u002FSKILL.md),\nwhich walks Claude through the `mainClock.autoAdvance = false` recipe and chains into\n[`compose\u002Fsynchronization\u002Fsynchronizing-with-idle\u002FSKILL.md`](compose\u002Fsynchronization\u002Fsynchronizing-with-idle\u002FSKILL.md)\nto swap `Thread.sleep` for `mainClock.advanceTimeBy(durationMs)`.\n\n### Stand up a JVM test suite for a new module\n\n> I'm adding unit tests to a Kotlin library module. Pick the right runner, mock framework, and coroutine harness.\n\nThe agent loads [`jvm-tests\u002Frunner\u002Fconfiguring-junit4-on-android\u002FSKILL.md`](jvm-tests\u002Frunner\u002Fconfiguring-junit4-on-android\u002FSKILL.md)\nfor the AndroidX dep matrix and `AndroidJUnit4` runner choice, then chains into\n[`jvm-tests\u002Fmocking\u002Fmocking-with-mockito\u002FSKILL.md`](jvm-tests\u002Fmocking\u002Fmocking-with-mockito\u002FSKILL.md)\n(or `mocking-with-mockk`) and [`jvm-tests\u002Fcoroutines\u002Ftesting-coroutines-with-runtest\u002FSKILL.md`](jvm-tests\u002Fcoroutines\u002Ftesting-coroutines-with-runtest\u002FSKILL.md)\nfor the coroutine test harness.\n\n### Wire ADB into a CI pipeline\n\n> Run instrumented tests across 4 emulators in parallel and capture screenshots + logcat on failure.\n\nThe agent loads [`adb\u002Fautomation\u002Fscripting-adb-for-ci\u002FSKILL.md`](adb\u002Fautomation\u002Fscripting-adb-for-ci\u002FSKILL.md)\nfor the parallel-fan-out idiom, [`adb\u002Ftests\u002Frunning-instrumented-tests-via-adb\u002FSKILL.md`](adb\u002Ftests\u002Frunning-instrumented-tests-via-adb\u002FSKILL.md)\nfor the `am instrument -w -r -e numShards\u002F-e shardIndex` invocation, and\n[`adb\u002Fcapture\u002Fcapturing-screenshots-and-screenrecord\u002FSKILL.md`](adb\u002Fcapture\u002Fcapturing-screenshots-and-screenrecord\u002FSKILL.md)\n+ [`adb\u002Fobservability\u002Fextracting-logs-with-logcat\u002FSKILL.md`](adb\u002Fobservability\u002Fextracting-logs-with-logcat\u002FSKILL.md)\nfor the capture-on-failure recipe.\n\nThe full symptom-to-skill lookup is in [INDEX.md](INDEX.md).\n\n## Editorial position\n\nCross-cutting hot takes that appear as **MUST** \u002F **MUST NOT** directives across the relevant skills:\n\n1. **Tag from production, find by tag from tests.** `Modifier.testTag` (Compose) or `android:id` (View) belongs in production source under a constant. Text finders are i18n-fragile and churn with copy edits.\n2. **Default to `useUnmergedTree = false`** in Compose. Switch only when the matcher targets an inner element collapsed by the merge pass.\n3. **Animation tests require `mainClock.autoAdvance = false`** in Compose. Otherwise `InfiniteAnimationPolicy` cancels infinite animations and your test never observes a determinate state.\n4. **`waitUntil` timeouts are wall clock; `advanceTimeUntil` is test clock** in Compose. Same split applies to `runTest` virtual time vs Turbine's wall-clock timeouts.\n5. **Funnel state mutations through `runOnIdle` or `runOnUiThread`.** Direct `var = value` from the test thread races with the recomposer.\n6. **Prefer the v2 entry points** for Compose (`androidx.compose.ui.test.junit4.v2.createComposeRule`, `androidx.compose.ui.test.v2.runComposeUiTest`). They use `StandardTestDispatcher`, matching `kotlinx.coroutines.test.runTest`.\n7. **`Thread.sleep` is a smell**, except in screenshot tests waiting on the RenderThread for ripples.\n8. **`am instrument` exit codes only matter with `-w`.** Without it, `$?` is meaningless and CI silently passes broken tests.\n9. **`pm clear` for hermetic reset, not `am force-stop`.** Force-stop kills the process but leaves SharedPreferences, DB, and files intact.\n10. **`androidx.test:orchestrator` ships via `androidTestUtil`, NOT `androidTestImplementation`.** The latter is a silent no-op.\n\n## Scope\n\nIn scope:\n\n- Jetpack Compose UI testing (the original `compose\u002F` set).\n- JVM unit tests on Android: JUnit4, Mockito + mockito-kotlin, MockK, kotlinx-coroutines-test, Turbine, Robolectric.\n- On-device instrumented tests: `AndroidJUnit4`, `ActivityScenario`, `FragmentScenario`, Espresso, UiAutomator.\n- ADB as the device-control surface for E2E and CI: connection, app management, instrumentation invocation, input injection, capture, logcat, transfer, automation.\n- Cross-cutting fundamentals: pyramid, what to test, test doubles, strategies, source sets.\n\nOut of scope (intentionally; root-foundations focus first):\n\n- Screenshot\u002Fgolden testing libraries (Paparazzi, Roborazzi, Shot). May be added later.\n- Code coverage tooling (JaCoCo, Kover).\n- Static analysis (lint, ktlint, detekt).\n- Performance and stability, covered in the sister repo [compose-performance-skills](https:\u002F\u002Fgithub.com\u002Fskydoves\u002Fcompose-performance-skills).\n- Compose Multiplatform iOS\u002FDesktop\u002FWeb specifics. Most Compose skills apply because `ComposeUiTest` is multiplatform, but iOS\u002FDesktop\u002FWeb targets are not validated here.\n\n## Contributing\n\nContributions are welcome. Before opening a pull request:\n\n1. Read [`docs\u002FSPEC.md`](docs\u002FSPEC.md) end to end. Frontmatter template, body structure, voice, mandatory rules, post-write self-check: all non-negotiable.\n2. Pull facts and code samples from [`docs\u002FCORPUS.md`](docs\u002FCORPUS.md) so vocabulary stays consistent across skills.\n3. Verify cross-references resolve. The convention is `..` for same-category siblings, `..\u002F..` for same-set different category, `..\u002F..\u002F..` for cross-set.\n4. Run the post-write self-check (SPEC §9). Frontmatter validates, body ≤500 lines, ≥1 RIGHT\u002FWRONG pair for code-level skills, Verification checklist, ≥3 authoritative reference URLs, no first person, no emojis, no time-sensitive phrasing.\n5. Add the new skill to [INDEX.md](INDEX.md) under each lookup section it belongs to.\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full procedure.\n\n## Find this repository useful? :heart:\nSupport it by joining __[stargazers](https:\u002F\u002Fgithub.com\u002Fskydoves\u002Fandroid-testing-skills\u002Fstargazers)__ for this repository. :star: \u003Cbr>\nAlso __[follow](https:\u002F\u002Fgithub.com\u002Fskydoves)__ me for my next creations! 🤩\n\n# License\n```xml\nDesigned and developed in 2026 by skydoves (Jaewoong Eum)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","这个项目是一个针对Android测试的技能集合，涵盖了从Compose UI测试到ADB驱动的端到端测试等多个方面。它提供了54个技能点，分布在7个不同的集合中，包括Jetpack Compose UI测试、Kotlin多平台测试库使用、JVM单元测试工具（如JUnit4、Mockito）、设备上测试框架（如Espresso、UiAutomator）以及ADB脚本编写等。每个技能都基于权威文档或`androidx\u002F`路径下的API声明，并附有详尽的行为说明。此项目特别适合需要提高Android应用测试覆盖率和质量的开发者或团队，在进行新功能开发或维护现有代码时参考使用。",2,"2026-06-11 03:54:19","CREATED_QUERY"]