One-click install
npx skills add https://github.com/skydoves/android-testing-skills --skill configuring-test-dependencies
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: configuring-test-dependencies
Source: https://github.com/skydoves/android-testing-skills/tree/main/compose/setup/configuring-test-dependencies
Command: npx skills add https://github.com/skydoves/android-testing-skills --skill configuring-test-dependencies

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about configuring-test-dependencies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does createComposeRule fail to launch activities in Jetpack Compose UI tests?

The ui-test-manifest dependency belongs on debugImplementation for androidTest source sets and on testImplementation for Robolectric host tests, resolving the TestManifestGradleConfiguration lint warning and ensuring proper test API resolution.

How do I configure Gradle dependencies for Robolectric Compose UI tests?

Add the ui-test, ui-test-junit4, and ui-test-manifest trio to testImplementation to ensure Compose testing APIs resolve and activity launching works under host tests.

Do I need accessibility artifacts for Jetpack Compose UI testing?

Accessibility artifacts are only required when calling enableAccessibilityChecks in your tests. Install the appropriate accessibility artifacts aligned with the correct test surface, instrumentation or host.

What is the correct Gradle configuration for the Compose ui-test-manifest?

The ui-test-manifest dependency belongs on debugImplementation for androidTest source sets and on testImplementation for Robolectric host tests, resolving the TestManifestGradleConfiguration lint warning and ensuring proper test API resolution.

Can I use the same Compose UI test dependencies for both instrumentation and Robolectric tests?

Use debugImplementation for ui-test-manifest in instrumentation tests, but switch to testImplementation for Robolectric host tests while keeping ui-test-junit4 on the matching source set.