$npx skillfedfor your agent

espresso-skill

This skill empowers you to create Espresso test scripts for Android applications, streamlining your UI testing automation. Leverage AI-assisted code generation to build robust test cases faster, reducing manual effort and improving test coverage across your Android projects.

espresso-skill enables you to write Espresso tests by guiding you through the core testing pattern: onView(withId(R.id.view_id)).perform(click()).check(matches(isDisplayed())). espresso-skill teaches you to combine ViewMatchers (like withId, withText) to locate UI elements, ViewActions (like click, typeText) to interact with them, and ViewAssertions (like matches, doesNotExist) to verify results. Start by setting up your test class with @RunWith(AndroidJUnit4.class) and @Rule ActivityTestRule, then use onView chains to build your test logic systematically.

AI-generated summary based on this skill's SKILL.md

339 68 MITupdated by LambdaTest

Decision gist · record as of 2026-07-24

espresso-skill enables you to write Espresso tests by guiding you through the core testing pattern: onView(withId(R.id.view_id)).perform(click()).check(matches(isDisplayed())). espresso-skill teaches you to combine ViewMatchers (like withId, withText) to locate UI elements, ViewActions (like click, typeText) to interact with them, and ViewAssertions (like matches, doesNotExist) to verify results. Start by setting up your test class with @RunWith(AndroidJUnit4.class) and @Rule ActivityTestRule, then use onView chains to build your test logic systematically.

manual: git clone https://github.com/LambdaTest/agent-skills → cp -r agent-skills/espresso-skill ~/.claude/skills/espresso-skill
espresso-skill/SKILL.md · version 1ab93e32

Use it when

  • espresso-skill breaks down Espresso's three core patterns: ViewMatchers locate elements (withId, withText, withContentDescription.
  • espresso-skill guides you through adding Espresso dependencies to your build.gradle file: androidTestImplementation.

Verify before relying

Read SKILL.md below before installing (4 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

LambdaTest/agent-skills/espresso-skill · repository language: Python

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I write Espresso tests for Android?

espresso-skill enables you to write Espresso tests by guiding you through the core testing pattern: onView(withId(R.id.view_id)).perform(click()).check(matches(isDisplayed())). espresso-skill teaches you to combine ViewMatchers (like withId, withText) to locate UI elements, ViewActions (like click, typeText) to interact with them, and ViewAssertions (like matches, doesNotExist) to verify results. Start by setting up your test class with @RunWith(AndroidJUnit4.class) and @Rule ActivityTestRule, then use onView chains to build your test logic systematically.

What are ViewMatchers, ViewActions, and ViewAssertions in Espresso?

espresso-skill breaks down Espresso's three core patterns: ViewMatchers locate elements (withId, withText, withContentDescription, isDisplayed), ViewActions simulate user interactions (click, typeText, scrollTo, swipeLeft, closeSoftKeyboard), and ViewAssertions validate UI state (matches, doesNotExist, check). Together they form the onView(matcher).perform(action).check(assertion) chain. espresso-skill helps you combine these patterns to write fluent, readable test code that mirrors how users interact with your Android app.

How do I set up and configure the Espresso testing environment with Gradle dependencies?

espresso-skill guides you through adding Espresso dependencies to your build.gradle file: androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1', 'androidx.test:runner:1.5.2', and 'androidx.test.ext:junit:1.1.5'. Enable androidTestInstrumentation in your test build variant and ensure your minSdkVersion supports instrumentation testing. espresso-skill helps you configure the test runner in AndroidManifest.xml and set up your project structure so Gradle can compile and execute your Espresso tests on emulators or connected devices.

How do I test Android app UI with Espresso on cloud devices?

espresso-skill supports executing tests on cloud platforms like TestMu AI and LambdaTest by generating test code compatible with their device clouds. After writing your Espresso test suite locally, espresso-skill helps you upload your APK and test APK to the cloud platform, configure device selection (OS version, device model), and trigger test runs. The cloud service executes your Espresso tests on real or virtual devices and returns detailed reports, screenshots, and logs—enabling you to validate your Android UI across multiple device configurations without maintaining physical hardware.

How do I handle async operations and RecyclerView testing in Espresso?

espresso-skill teaches you to manage asynchronous operations using Idling Resources, which pause test execution until background tasks complete. For RecyclerView testing, espresso-skill shows you how to use RecyclerViewActions (like scrollTo, actionOnItem) to navigate large lists and interact with specific items. espresso-skill also covers Intent testing to verify navigation between activities and fragments, and demonstrates best practices like registering custom IdlingResources for network calls or database operations to ensure your tests wait for async work before asserting results.

What are the best practices for Espresso testing on emulators versus real devices?

espresso-skill recommends using emulators for fast local development cycles and CI/CD pipelines, while real devices catch hardware-specific issues and true user behavior. espresso-skill advises running connected Android tests via ./gradlew connectedAndroidTest for local validation, then scaling to cloud device farms for broader coverage. espresso-skill emphasizes writing device-agnostic tests that rely on semantic matchers (withText, withContentDescription) rather than pixel-based assertions, ensuring your Espresso tests remain reliable across different screen sizes, OS versions, and device types.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Espresso Automation Skill

You are a senior Android QA engineer specializing in Espresso UI testing.

Step 1 — Execution Target

├─ Mentions "cloud", "TestMu", "LambdaTest", "device farm"?
│  └─ TestMu AI cloud (upload APK + test APK)
│
├─ Mentions "emulator", "local", "connected device"?
│  └─ Local: ./gradlew connectedAndroidTest
│
└─ Default → Local emulator

Core Patterns — Kotlin (Default)

Basic Test

```kotlin @RunWith(AndroidJUnit4::class) class LoginTest {

@get:Rule
val activityRule = ActivityScenarioRule(LoginActivity::class.java)

@Test
fun loginWithValidCredentials() {
    // Type

(truncated - see the full file via the links below)

File tree — 4 files
espresso-skill/SKILL.md
espresso-skill/reference/advanced-patterns.md
espresso-skill/reference/cloud-integration.md
espresso-skill/reference/playbook.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Write and generate Espresso UI test code for Android applications”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

android-java
by alinaqi · alinaqi/maggy

This skill equips Android developers with a deep understanding of MVVM (Model-View-ViewModel) architecture and ViewModel patterns essential for modern Java-based mobile applications. Learn how to structure your codebase for testability, maintainability, and separation of concerns while implementing lifecycle-aware components that handle configuration changes gracefully.

MITupdated Jul 2026
★ 703repo stars
mobile-app-testing
by secondsky · secondsky/claude-skills

This skill equips you with structured approaches to validate mobile applications across both iOS and Android ecosystems. It provides ready-to-use testing patterns and methodologies that integrate seamlessly with Claude Code CLI, helping you establish robust quality assurance workflows for your mobile projects.

MITupdated Jul 2026
★ 196repo stars
qa-testing-android
by vasilyu1983 · vasilyu1983/AI-Agents-public

This skill guides you through establishing robust UI testing infrastructure for Android applications. It covers framework selection and configuration for Espresso, Compose Testing, and UIAutomator, enabling you to build automated test suites that validate your app's user interface reliably.

MITupdated Jul 2026
★ 69repo stars
detox-skill
by LambdaTest · LambdaTest/agent-skills

This skill leverages the Detox framework to help you write and execute end-to-end tests for React Native mobile applications. It streamlines test generation and automation, enabling faster validation of app functionality across different devices and scenarios.

MITupdated Jul 2026
★ 339repo stars
hyperexecute-skill
by LambdaTest · LambdaTest/agent-skills

This skill enables you to set up and verify HyperExecute YAML configurations for running tests across LambdaTest's cloud infrastructure. Automate your test execution pipeline by defining job parameters, parallelization settings, and validation rules directly within your workflow.

MITupdated Jul 2026
★ 339repo stars
Cometchat Android V6 Testing
by cometchat · cometchat/cometchat-skills

This skill helps developers verify Cometchat Android V6 implementation by running comprehensive tests on messaging features, user interactions, and platform compatibility. Use it to catch integration issues early and ensure your Android chat application performs reliably across different device configurations.

no license declared → metadata onlyupdated Jun 2026
★ 61repo stars

More skills cicd-pipeline-skill (MIT) · testcafe-skill (MIT) · Cometchat Android V5 Testing (unlicensed) · Test Frameworks (unlicensed) · android-native-dev (MIT)

Tags
ui-automationinstrumentation-testingmobile-qatest-frameworkandroid-testingcloud-device-testingtest-synchronizationelement-interactionassertion-verificationgradle-configuration