configuring-test-dependencies

Community

Get Compose UI test Gradle deps right.

Authorskydoves
Version1.0.0
Installs0

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-junit4 for instrumentation and places androidx.compose.ui:ui-test-manifest on the correct configuration so createComposeRule() 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 TestManifestGradleConfiguration by moving ui-test-manifest to debugImplementation (instrumentation) or testImplementation (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 required

Components

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.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.