testing-with-espresso-interop

Community

Mix Compose tests with Espresso safely

Authorskydoves
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It solves the coordination problem when Compose UI testing needs to interact with Android View and system-level UI elements using Espresso, such as Dialog windows and soft keyboard behavior.

Core Features & Use Cases

  • Compose ↔ Espresso synchronization bridge: Uses the built-in EspressoLink bridge so Compose idling resources are automatically recognized by Espresso without manual IdlingRegistry wiring.
  • Correct threading for Espresso calls: Ensures Espresso.onView(...) runs from the test thread and only after rule.waitForIdle() to prevent deadlocks or main-thread failures.
  • Hybrid Activity interaction patterns: Supports one-Activity, two-framework tests where Compose semantics and View hierarchy interactions must both be verified, including optional scoping via onRootWithViewInteraction for multiple ComposeView hosts.
  • Use cases: Dialog focus, IME (soft keyboard) tests, ComposeView embedded in View hierarchies, and focus interactions that cross the Compose/View boundary.

Quick Start

Use an Android Compose test rule with the host Activity, call rule.waitForIdle(), and then interact with Views using Espresso.onView(...) on the test thread for the target window or IME behavior.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: testing-with-espresso-interop
Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#testing-with-espresso-interop

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.