configuring-test-dependencies
CommunityGet Compose UI test Gradle deps right.
System Documentation
What problem does it solve?
This Skill prevents Jetpack Compose UI tests from failing at build/run time by correcting the Gradle dependency matrix across instrumentation and host (Robolectric) source sets.
Core Features & Use Cases
- Installs the exact dependency set for Compose UI testing: wires
androidx.compose.ui:ui-test-junit4for instrumentation and placesandroidx.compose.ui:ui-test-manifeston the correct configuration socreateComposeRule()can launch. - Sets up host (JVM) Compose tests with Robolectric: ensures the Robolectric “host trio” is complete so Compose testing APIs resolve and activity launching works under test.
- Adds accessibility validation correctly: installs the appropriate accessibility artifacts only when using
enableAccessibilityChecks(...), aligned with the right test surface. - Fixes the specific lint warning correctly: resolves
TestManifestGradleConfigurationby movingui-test-manifesttodebugImplementation(instrumentation) ortestImplementation(host), avoiding silent misconfiguration.
Quick Start
Ask your AI coding agent to configure the correct Gradle dependencies for Jetpack Compose UI tests by using ui-test-junit4 plus ui-test-manifest on debugImplementation (for androidTest) and the ui-test/ui-test-junit4/ui-test-manifest trio on testImplementation (for Robolectric), including accessibility artifacts only if enableAccessibilityChecks is needed.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: configuring-test-dependencies Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#configuring-test-dependencies Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.