Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

ha-android-testing

Skill by home-assistant

Gives AI assistants Home Assistant Android testing guidance for unit, Robolectric, Flow, and screenshot tests. It is for developers writing or reviewing tests in the Home Assistant Android project.

  • Score 82
  • 4.1k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install ha-android-testing

Built from the published package, never by AI.

git clone --depth 1 https://github.com/home-assistant/android /tmp/android && mkdir -p ~/.claude/skills && cp -r /tmp/android/.agents/skills/ha-android-testing ~/.claude/skills/ha-android-testing

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install ha-android-testing in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill, published by home-assistant, holds the testing conventions for the Home Assistant Android app. It tells the assistant how to run unit and screenshot tests with Gradle, how to update reference screenshots, and which frameworks to use: JUnit Jupiter, MockK, Robolectric, and Turbine for Flows. It also describes module-wide test rules registered through JUnit Platform and ServiceLoader, and the shared helpers in the :testing-unit module.

The skill is written for developers who work on the Home Assistant Android codebase. It sets rules for test naming in GIVEN-WHEN-THEN form, dispatcher swaps for ViewModel tests, Flow testing without sleeps or latches, and screen tests that verify callbacks and visibility. It is useful when writing new tests or reviewing existing ones in that project.

Written from the project's SKILL.md and checked against it.

What it can do

  • Unit and screenshot test commandsLists the Gradle commands for running unit tests and screenshot tests, and for updating reference images.
  • Robolectric setupRequires the RobolectricTestRunner and HiltTestApplication annotations on every Robolectric test class.
  • Module-wide test rulesExplains how cross-cutting rules are registered as JUnit Platform listeners and Robolectric lifecycle plugins.
  • Shared test utilitiesDescribes helpers in :testing-unit, including main dispatcher swap rules, FakeClock, and TestSharedFlow.
  • Flow testing with TurbineSets rules for testing Flows with Turbine, including testIn, awaitItem, and buffering checks.
  • Test conventionsCovers test naming, parameterized tests, avoiding Thread.sleep, and keeping a feature's tests in one class.
  • Screen and navigation testsGuides Compose interaction tests, screenshot coverage of states, and back and forward navigation stack tests.

What you need

  • Home Assistant Android project with the Gradle wrapper (./gradlew)

Try asking

  • Write a Turbine test for this ViewModel's StateFlow
  • Review my Robolectric test class for the required annotations
  • Help me write GIVEN-WHEN-THEN tests for this use case

Good to know

  • Screenshot rendering can differ between hosts, so CI results are the reference
  • Reference screenshots are regenerated on the CI host by a maintainer through the Update Screenshots workflow

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/ha-android-testing/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md9 KB

Alternatives to ha-android-testing

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

ha-android-testing: common questions

Which test frameworks does the Home Assistant Android skill recommend?

It recommends JUnit Jupiter for unit tests, JUnit 4 only when Robolectric requires it, MockK for mocking, and Turbine for Flows. It prefers real objects or fakes over mocks.

When should the main dispatcher swap be used?

The source says to apply MainDispatcherJUnit5Extension or MainDispatcherJUnit4Rule only when the code under test runs on the Main dispatcher, such as code launched on viewModelScope. It should not be added to plain repository or use case tests.

How are screenshot tests run in this project?

Screenshot tests are run with a Gradle screenshot test task for the default test suite. Reference images are stored in each module's screenshotTest reference folders and updated with a separate update task.

How do I install ha-android-testing?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is ha-android-testing free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is ha-android-testing safe to use?

It scores 82 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to ha-android-testing?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

ha-android-testing Install

Add to stack

Loading.