Testing Skill
TypeCellOS/BlockNote
Instructions for writing, running, and updating unit/end-to-end tests.
Home Assistant Android testing guidance. An agent skill from home-assistant/android.
$ npx skills add home-assistant/android --skill ha-android-testing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install home-assistant/android ha-android-testing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/home-assistant/android.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ha-android-testing .claude/skills/ha-android-testing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "ha-android-testing" agent skill from https://github.com/home-assistant/android/tree/main/.agents/skills/ha-android-testing into .claude/skills/ha-android-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ha-android-testing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/home-assistant/android/tree/main/.agents/skills/ha-android-testingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add home-assistant/android --skill ha-android-testing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install home-assistant/android ha-android-testing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/home-assistant/android.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/ha-android-testing .agents/skills/ha-android-testing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ha-android-testing" agent skill from https://github.com/home-assistant/android/tree/main/.agents/skills/ha-android-testing into .agents/skills/ha-android-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ha-android-testing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add home-assistant/android --skill ha-android-testing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install home-assistant/android ha-android-testing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/home-assistant/android.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/ha-android-testing .cursor/skills/ha-android-testing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ha-android-testing" agent skill from https://github.com/home-assistant/android/tree/main/.agents/skills/ha-android-testing into .cursor/skills/ha-android-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ha-android-testing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/home-assistant/android.git --path .agents/skills/ha-android-testing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add home-assistant/android --skill ha-android-testing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install home-assistant/android ha-android-testing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/home-assistant/android.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/ha-android-testing .gemini/skills/ha-android-testing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ha-android-testing" agent skill from https://github.com/home-assistant/android/tree/main/.agents/skills/ha-android-testing into .gemini/skills/ha-android-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ha-android-testing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install home-assistant/android ha-android-testingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add home-assistant/android --skill ha-android-testing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/home-assistant/android.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/ha-android-testing .github/skills/ha-android-testing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ha-android-testing" agent skill from https://github.com/home-assistant/android/tree/main/.agents/skills/ha-android-testing into .github/skills/ha-android-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ha-android-testing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add home-assistant/android --skill ha-android-testing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install home-assistant/android ha-android-testing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/home-assistant/android.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/ha-android-testing .opencode/skills/ha-android-testing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ha-android-testing" agent skill from https://github.com/home-assistant/android/tree/main/.agents/skills/ha-android-testing into .opencode/skills/ha-android-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ha-android-testing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ha-android-testingHome Assistant Android testing guidance. An agent skill from home-assistant/android.
Ha Android Testing is an agent skill from home-assistant/android. Home Assistant Android testing guidance. Use when writing or reviewing unit tests, Robolectric tests, Flow tests with Turbine, screenshot tests, fakes from testing-unit, or module-wide test rules.
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Unit testing. It works with Android and Home Assistant. The repository describes itself as: Home Assistant Companion for Android. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit eaa2122. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin and bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Ha Android Testing loads about 2k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 972 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from home-assistant/android at commit eaa2122, republished under its Apache-2.0 licence (© home-assistant). 972 words, ~2,002 tokens.
.claude/skills/ha-android-testing/SKILL.md (or your agent's skills folder).Use this skill when writing, changing, or reviewing tests.
./gradlew test # Unit tests (:common:test for one module)
./gradlew validateDebugScreenshotTest # Screenshot testsAfter an intentional UI change, update the reference screenshots (stored under src/screenshotTestFullDebug/reference in :app, src/screenshotTestDebug/reference in :common and :wear) with ./gradlew updateDebugScreenshotTest updateFullDebugScreenshotTest. Rendering differs subtly between hosts, so if CI still fails on thresholds, a maintainer triggers the Update Screenshots workflow to regenerate them on the CI host — don't chase pixel diffs locally.
Don't run a validate task after an update run: the update will update the screenshots from the code you just built, so validation can only confirm that or resurface the subtle host differences in rendering. Check that the images were updated and have changed instead, that is what tells you the change is right. Validate only when you have not regenerated, to find out if a change unintentionally changed the UI.
ServerDiscoveryScreenshotTest could fails validation because of host rendering differences. CI is the source of truth, so treat its failure as expected output, not a result:
HomeAssistantApplication, enabling StrictMode and FailFast and leaking process-wide state that can crash the test JVM:@RunWith(RobolectricTestRunner::class)
@Config(application = HiltTestApplication::class)
class MyTest { ... }Rules that must apply to every test in a module are JUnit Platform TestExecutionListeners registered through ServiceLoader (src/test/resources/META-INF/services/org.junit.platform.launcher.TestExecutionListener). They run for both JUnit 4 (Vintage) and Jupiter tests — use this mechanism instead of per-class setup when introducing a new cross-cutting rule:
TestStateResetPlatformListener (per test module) resets process-wide singletons before every test: it installs a FailFast handler that rethrows as AssertionError, so any FailFast trigger surfaces as a test failure instead of crashing the JVM, and resets SdkVersion.ConsoleLogPlatformListener (from :testing-unit) plants a Timber tree that prints to stderr so logs are visible during tests.Robolectric runs tests in a sandbox class loader with its own copy of every app class, so a JUnit Platform listener never reaches the singletons a Robolectric test sees. A reset that must also apply to Robolectric tests needs a TestEnvironmentLifecyclePlugin too, registered in src/test/resources/META-INF/services/org.robolectric.pluginapi.TestEnvironmentLifecyclePlugin: Robolectric loads it inside the sandbox and calls it before every test. TestStateResetRobolectricPlugin does this for the FailFast and SdkVersion reset, and ConsoleLogRobolectricPlugin (from :testing-unit) plants the Timber console tree.
:testing-unitCode needed by tests in several modules goes in :testing-unit (which must stay independent from :common). Check it before writing a new helper. It provides among others:
Dispatchers.Main with a TestDispatcher. Pick the helper matching the test's framework: MainDispatcherJUnit5Extension for JUnit Jupiter, applied with @ExtendWith(MainDispatcherJUnit5Extension::class) on the class (or @JvmField @RegisterExtension val ext = MainDispatcherJUnit5Extension() on a field); MainDispatcherJUnit4Rule for JUnit 4 / Robolectric, applied with @get:Rule val mainDispatcherRule = MainDispatcherJUnit4Rule(). Both default to a StandardTestDispatcher. Apply the swap only when the code under test actually runs on the Main dispatcher, typically because it launches on viewModelScope (which uses Dispatchers.Main.immediate). Without it those tests throw "Module with the Main dispatcher had failed to initialize" since there is no Android main looper on the JVM. Don't add it to tests that never touch Main (a plain repository, use case, or pure suspend function) — it's noise there. Use the default StandardTestDispatcher; do not use UnconfinedTestDispatcher. Reaching for it to make a test pass hides ordering the test should assert explicitly (advance the scheduler with runTest/advanceUntilIdle), and needing it usually signals a design problem in the code under test — fix that instead.FakeClock — controllable kotlin.time.Clock.TestSharedFlow — non-suspending SharedFlow test double that avoids cross-scheduler deadlocks.stringResource(...) on AndroidComposeTestRule, seedFakeAndroidId(), and fakes for Wear OS clients.Turbine is available in all modules and must be used for testing Flows:
turbineScope with testIn for multi-collector tests; assert with awaitItem/awaitComplete/expectNoEvents.CountDownLatch, Thread.sleep, verify(timeout = ...), or raw launch/async.shareIn never complete — use expectNoEvents() + cancelAndConsumeRemainingEvents() instead of awaitComplete().src/test/kotlin/.@Test
fun `Given user authenticated when opening app then show dashboard`() { ... }onCreate, the ViewModel API). When access is truly unavoidable, use @VisibleForTesting (for example a secondary constructor taking a CoroutineScope or Clock).Thread.sleep in tests — it makes them slow and flaky. Run coroutines under runTest so the TestDispatcher fakes time.@ParameterizedTest when tests repeat with only a value change; in JUnit 4, extract a private function and call it from separately named tests. Merge near-duplicate single-assertion tests into one meaningful test, and add a small helper in the test file for repeated setup.TagReaderScreenTest); prefer matching on visible text over test tags. Screenshot tests cover looks only, never logic — and must render the real composable (not a simplified stand-in) across its meaningful states (loading, empty, error, multi-server). Navigation tests must cover back and forward stack behavior.TestDispatcher — see the ha-android-concurrency skill.© home-assistant, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/ha-android-testing of home-assistant/android.
Open the folder on GitHubat commit eaa2122
Ha Android Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ha Android Testing this skillhome-assistant/android | 4k | — | ~2k | Automated safety check: Pass | Apache-2.0 | |
| Testing SkillTypeCellOS/BlockNote | 10k | — | ~2.6k | Automated safety check: Pass | Custom licence | |
| Mesh Labpermissionlesstech/bitchat-android | 7.8k | — | ~2.9k | Automated safety check: Pass | GPL-3.0 | |
| Ha Frontend Testinghome-assistant/frontend | 5.7k | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Add Library Testosama-raddad/FireCrasher | 147 | — | ~612 | Automated safety check: Pass | Apache-2.0 | |
| Ha Integration TestingFutureTense/keymaster | 349 | — | ~522 | Automated safety check: Pass | MIT |
TypeCellOS/BlockNote
Instructions for writing, running, and updating unit/end-to-end tests.
permissionlesstech/bitchat-android
Run, diagnose, and extend bitchat Android Mesh Lab physical-device tests.
home-assistant/frontend
Home Assistant frontend testing and validation workflow. An agent skill from home-assistant/frontend.
osama-raddad/FireCrasher
Add or update a Robolectric JVM unit test for the FireCrasher library.
FutureTense/keymaster
Workflows, conventions, and commands for writing and running async Home Assistant unit and integration tests using pytest, tox, pytest-homeassistant-custom-component, and coverage tools.
cognitivegears/ha-escpos-thermal-printer
A skill your agent uses when bumping any dependency, upgrading the HA test harness (pytest-homeassistant-custom-component) or HA floor, or handling Dependabot PRs/security alerts — per-package pin…
home-assistant/android
Home Assistant Android module and layer architecture. An agent skill from home-assistant/android.
home-assistant/android
Home Assistant Android coroutine and threading guidance. An agent skill from home-assistant/android.
home-assistant/android
Home Assistant Android end-to-end (Maestro) failure triage. An agent skill from home-assistant/android.
home-assistant/android
Home Assistant Android Kotlin style. An agent skill from home-assistant/android.
home-assistant/android
Home Assistant Android logging and error handling. An agent skill from home-assistant/android.
home-assistant/android
Home Assistant Android UI guidance. An agent skill from home-assistant/android.
Works with
Categories
Home Assistant Android testing guidance. An agent skill from home-assistant/android. Ha Android Testing is an agent skill from home-assistant/android. Home Assistant Android testing guidance.
Ha Android Testing fits situations like: reviewing unit tests; robolectric tests; flow tests with Turbine; screenshot tests.
Run `npx skills add home-assistant/android --skill ha-android-testing -a claude-code`. Or copy the skill folder (.agents/skills/ha-android-testing in home-assistant/android) into .claude/skills/ha-android-testing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add home-assistant/android --skill ha-android-testing -a codex`. Or copy the skill folder (.agents/skills/ha-android-testing in home-assistant/android) into .agents/skills/ha-android-testing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add home-assistant/android --skill ha-android-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ha-android-testing, .gemini/skills/ha-android-testing, .github/skills/ha-android-testing and .opencode/skills/ha-android-testing in your project.
SKILL.md names no scripts, command-line tools or credentials: Ha Android Testing is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Ha Android Testing is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Ha Android Testing: Testing Skill (TypeCellOS/BlockNote, 10k stars), Mesh Lab (permissionlesstech/bitchat-android, 7.8k stars), Ha Frontend Testing (home-assistant/frontend, 5.7k stars) and Add Library Test (osama-raddad/FireCrasher, 147 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
home-assistant (a GitHub organization) maintains it in home-assistant/android, which has 3,954 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.
Source: home-assistant/android on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.