structuring-a-compose-test
structuring-a-compose-test is a Test authoring & frameworks skill for AI agents, published by skydoves in the android-testing-skills repository on GitHub. Skillspace rates structuring-a-compose-test C (71/100) and it passed the safety scan; the rating is based on static analysis only.
Use this skill to structure a Jetpack Compose UI test class the way androidx itself writes them — `@MediumTest` + `@RunWith(AndroidJUnit4::class)`, a single `createComposeRule(StandardTestDispatcher())` rule, hoisted `mutableStateOf` declared above `setContent { }`, and the Test → Find → Assert → Act → Re-assert flow. Covers when to use `createAndroidComposeRule<MyActivity>()` for custom Activities, how to drive state from outside the composition via `runOnIdle { }`, why state must NOT be hoisted inside `setContent`, and why `@get:Rule createComposeRule()` and `runComposeUiTest { }` MUST NOT both appear in the same test. Use when the developer asks "how do I write a Compose test", "where do I declare state", "how do I name the test class", "MediumTest vs LargeTest", "rule.setContent inside @Before", or shows a test class that won't compile or doesn't drive state from outside.
- Grade
- C
- Quality
- 71 / 100
- Safety
- Passed
- GitHub stars
- 296
Unproven: rated by static analysis only, not yet compared head-to-head.
This rating describes the version of the repository we crawled; it may have changed since, so go by its current files.
Our review
- Architecture
- 94 / 100
- Maturity
- Basic: a single SKILL.md
- Security scan
- No issues found
- License
- Apache-2.0
- Adoption
- Adopted by 1 other repositories, in 0 collections
- Scope
- Vendor-specific: built around one product. Compose test class structure using public AndroidX APIs
Not checked yet
- Not judged on the rubric yet (not a contender in its category)
- No blind task eval yet
- Sibling files (scripts, references) not fetched; security scan covers SKILL.md only
Skillspace indexes and rates this skill; it does not host or endorse it. Run third-party skills at your own risk.