configuring-test-dependencies

Installation
SKILL.md

Configuring Test Dependencies — Get the Gradle Matrix Right

Compose UI tests fail at the dependency layer in three predictable ways: the JUnit4 surface is on the wrong source set, the ui-test-manifest artifact is missing or on the wrong configuration, or the host-test trio is incomplete. This skill encodes the exact matrix and the lint warning that polices it. Subsequent skills (choosing-test-rule-vs-runtest/SKILL.md, setting-up-host-vs-device-tests/SKILL.md) assume the dependencies are correct.

When to use this skill

  • The user reports java.lang.RuntimeException: Could not launch activity within 45 seconds. Examined activities: ... androidx.activity.ComponentActivity or ActivityNotFoundException.
  • The IDE flags createComposeRule as unresolved or import androidx.compose.ui.test.junit4.createComposeRule as red.
  • Lint surfaces TestManifestGradleConfiguration (severity WARNING) on a build.gradle.kts line.
  • The user wants to add Robolectric / host (JVM) tests for Compose and asks which artifacts to depend on.
  • The user wants to opt into enableAccessibilityChecks(...) and is unsure which artifact owns it.

When NOT to use this skill

  • Dependencies are already correct and the user is choosing between createComposeRule() and runComposeUiTest { } — use ./choosing-test-rule-vs-runtest/SKILL.md.
  • Dependencies compile but the test runs in the wrong source set (test/ vs androidTest/) — use ./setting-up-host-vs-device-tests/SKILL.md.
  • The test compiles and runs but is flaky/timing-out — start with ../../synchronization/synchronizing-with-idle/SKILL.md.

Prerequisites

Installs
36
GitHub Stars
319
First Seen
May 26, 2026
configuring-test-dependencies — skydoves/android-testing-skills