Skip to content

Android Testing Setup

Lets an agent analyze an Android project's tests and set up unit, UI, screenshot and end-to-end testing.

Repository
android/skills
Stars
10,278
Licence
Apache-2.0
Files
5 files

What it does

When installed, the agent reviews an Android app's build files to see which testing libraries and dependency injection tools are already in use, then produces a Markdown report of the current testing setup. It can then install and configure missing pieces such as JUnit, Espresso or Compose testing APIs, Robolectric, screenshot testing tools, and fakes for dependencies, following step-by-step guidance bundled with the skill. Without this skill the agent would have to rediscover these conventions each time.

Great for

  • Android developers adding a test strategy to an existing app
  • Teams standardizing testing libraries across Compose or View-based projects
  • Developers who want an agent to write Hilt or Compose UI test scaffolding

Skip it if

  • Non-Android projects, since the guidance is specific to Android and Gradle builds
  • Projects where the agent edits build files without review, because it modifies Gradle dependencies and test configuration that can break builds if applied blindly

Try asking

  • “Analyze the testing setup of this Android project and write a Markdown report”
  • “Set up Hilt for instrumented tests and add the HiltAndroidRule to my test classes”
  • “Add Compose screenshot testing to this module using the test suites setup if my AGP version supports it”
  • “Add unit tests for the ViewModels and repositories in this app”
Step-by-step guide: how to use Android Testing SetupInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 5 original files, the Apache-2.0 licence and an attribution note.

    testing-setup.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip testing-setup.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip testing-setup.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run the analysis step first and review the generated report before letting the agent change dependencies
  • Ask for a specific framework or AGP-compatible screenshot setup so the agent does not choose defaults you do not want
  • Review the diff to Gradle files and run the test suite yourself, since the skill itself does not execute builds

What's inside

  • references/android/develop/ui/compose/testing/common-patterns.md
  • references/android/studio/preview/compose-screenshot-testing-with-testsuites.md
  • references/android/studio/preview/compose-screenshot-testing.md
  • references/android/training/dependency-injection/hilt-testing.md
  • SKILL.md

Redistributed unmodified from android/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.