testing-with-espresso-interop

testing-with-espresso-interop is a skill for Claude Code, Codex from skydoves/android-testing-skills. It costs 190 tokens per session (3,106 once invoked), scanned A, original, Apache-2.0.

A guide to using Jetpack Compose test finders and Espresso, Android's traditional view-testing tool, together in one Android test.

In plain words
What is it for?
Use it to test hybrid screens, Android dialogs, soft-keyboard behavior, ComposeView hierarchies, and focus interactions with both testing systems.
Why use it?
It handles cases where the screen mixes Compose and Android views, or where dialogs, keyboard state, or focus cross the boundary between them.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/skydoves/android-testing-skills/testing-with-espresso-interop
Any agent
npx skills add skydoves/android-testing-skills --skill testing-with-espresso-interop
Clone the repo
git clone --depth 1 https://github.com/skydoves/android-testing-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-with-espresso-interop

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/android-testing-skills/testing-with-espresso-interop.svg)](https://agentmods.dev/skills/skydoves/android-testing-skills/testing-with-espresso-interop)
Your own site
<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/testing-with-espresso-interop"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/testing-with-espresso-interop.svg" alt="Measured on agentmods" height="20"></a>
Per session 190 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,106 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00190 $0.03106
Opus 5 $0.00095 $0.01553
Sonnet 5 $0.00038 $0.00621
Haiku 4.5 $0.00019 $0.00311

Measured 6d ago against content hash fa2c29d71aa4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

testing-with-espresso-interop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

compose/interop/testing-with-espresso-interop/SKILL.md · 221 lines

How it starts

The opening of the file, as written. The whole thing — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing with Espresso Interop — One Activity, Two Test Frameworks, One Bridge

The Compose ComposeTestRule and the Espresso onView API operate on the same Activity simultaneously. Compose synchronization (idling resources, frame clock awaits) is bridged into Espresso through a single internal IdlingResource named EspressoLink, so the developer does not register anything manually. The trap is threading: Espresso.onView MUST run on the test thread, not from inside rule.runOnIdle { } or rule.runOnUiThread { }. This skill encodes the canonical interop pattern from androidx.compose.foundation's text-field IME tests.

When to use this skill

  • The test must operate on an Android Dialog window (which lives in its own Window and may not be in the Compose semantic tree).
  • The test must verify IME (soft keyboard) state — only Espresso's onView(supportsInputMethods()).perform(click()) makes the keyboard appear.
  • The screen-under-test is a hybrid Activity with an Android View hierarchy that contains a ComposeView, or vice versa.
  • The developer asks "how do I use Espresso and Compose in the same test".
  • A test calls Espresso.onView(...) from runOnIdle { } and hangs / throws "cannot be run from the main thread".

When NOT to use this skill

  • The test is pure Compose; no Android View interactions exist. Use ../../patterns/structuring-a-compose-test/SKILL.md.
  • The synchronization symptom is "test passes locally, flaky on CI" without any View interop. Use ../../synchronization/synchronizing-with-idle/SKILL.md.
  • The test is for an androidx.compose.ui.window.Dialog (Compose dialog) — that DOES surface in the semantics tree via isDialog() and does NOT need Espresso. Use ../../finders/composing-semantics-matchers/SKILL.md.

Prerequisites

  • androidx.test.espresso:espresso-core on androidTestImplementation.
  • androidx.compose.ui:ui-test-junit4 on androidTestImplementation and androidx.compose.ui:ui-test-manifest on debugImplementation (see ../../setup/configuring-test-dependencies/SKILL.md).
  • An Activity that hosts both layers — FragmentActivity is the standard pick; a custom Activity declared in src/androidTest/AndroidManifest.xml also works.
  • The test class skeleton from ../../patterns/structuring-a-compose-test/SKILL.md.

Read the full file on GitHub · 221 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 221 lines · 190 tokens per session scan A fa2c29d71aa4

Subscribe to this mod's changes

testing-with-espresso-interop is a skill published in the GitHub repository skydoves/android-testing-skills (318 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 190 tokens to every session and 3,106 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

run-integration-tests

Build, pack, and run .NET MAUI integration tests locally. Validates templates, samples, and end-to-end scenarios using the local workload.

dotnet/maui · 35 tokens

cli-e2e-testcase-writer

Use when adding or updating Go CLI E2E coverage for one tests/clie2e/{domain} domain of the compiled lark-cli, especially when the work requires live --help or schema exploration, scenario-based clie2e.RunCmd workflows, and per-domain coverage.md maintenance.

larksuite/cli · 78 tokens

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

every-app/open-seo · 35 tokens

__SKILL_ID__

This fixture verifies that skill content can be written into the target sandbox and queried back immediately.

NVIDIA/NemoClaw · 10 tokens

harness-test-writer

Add regression test cases to the Bifrost provider harness (the Postman collection run via make run-provider-harness-test) based on a merged PR or a GitHub issue. Fetches the PR/issue, traces the affected wire path in the codebase, checks existing harness coverage, designs cases following harness conventions, inserts…

maximhq/bifrost · 133 tokens