diff --git a/docs/debugging-espresso-tests.md b/docs/debugging-espresso-tests.md
index 1a58a1ec8..75b9ed7a9 100644
--- a/docs/debugging-espresso-tests.md
+++ b/docs/debugging-espresso-tests.md
@@ -1,12 +1,16 @@
---
id: debug-espresso-tests
-title: How to debug your Espresso tests
+title: How to Debug and Troubleshoot Espresso Tests on TestMu AI
hide_title: true
+toc_max_heading_level: 2
sidebar_label: Debug Espresso Tests
-description: Learn how to debug Espresso tests for your mobile applications to resolve different kinds of bugs for your failed test builds.
+description: Debug and troubleshoot Espresso tests on TestMu AI using instrumentation, network logs, video recordings, and a reference of build and shard errors.
keywords:
- debug espresso tests
- how to debug espresso tests
+- troubleshoot espresso tests
+- espresso build errors
+- espresso shard errors
- mobile app testing
url: https://www.testmuai.com/support/docs/debugging-espresso-tests/
site_name: TestMu AI
@@ -33,7 +37,7 @@ import VerifiedTag from '@site/src/component/verifiedTag';
},{
"@type": "ListItem",
"position": 3,
- "name": "Debugging your Espresso Tests",
+ "name": "How to Debug Espresso Tests on TestMu AI",
"item": `${BRAND_URL}/support/docs/debugging-espresso-tests/`
}]
})
@@ -51,7 +55,7 @@ import VerifiedTag from '@site/src/component/verifiedTag';
"@type": "WebPage",
"@id": "https://www.testmuai.com/support/docs/debugging-espresso-tests/"
},
- "headline": "How to debug your Espresso tests",
+ "headline": "How to Debug and Troubleshoot Espresso Tests on TestMu AI",
"description": "Learn how to debug Espresso tests for your mobile applications to resolve different kinds of bugs for your failed test builds.",
"url": "https://www.testmuai.com/support/docs/debugging-espresso-tests/",
"image": {
@@ -114,13 +118,13 @@ import VerifiedTag from '@site/src/component/verifiedTag';
}) }}
/>
-# Debugging Your Espresso Tests
-***
+# How to Debug and Troubleshoot Espresso Tests on TestMu AI
+---
-Learn how to debug Espresso tests for your mobile applications to resolve different kinds of bugs for your failed tests/builds.
+Debugging Espresso tests on uses instrumentation, device, and network logs plus video recordings to pinpoint the root cause of failed tests and builds. A reference of common build and shard errors with explanations helps you diagnose issues fast.
## Objective
-***
+---
By the end of this guide, you will be able to:
@@ -128,7 +132,7 @@ By the end of this guide, you will be able to:
* Understand the reasoning behind the same.
## Debugging Tests
-***
+---
offers a variety of logs to help you locate the root cause:
@@ -161,7 +165,6 @@ curl -u "YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESSKEY" \
Replace `` with your actual build ID.
#### Sharded Builds
For sharded builds, use the following curl command:
-
```bash
@@ -209,11 +212,66 @@ KEY|VALUE|DESCRIPTION
--|--|--
| video | TYPE: BOOLEAN DEFAULT: TRUE `video= TRUE` OR `video = FALSE` | Video recording of the complete screen |
-Refer to our [Espresso testing documentation](/support/docs/getting-started-with-espresso-testing/#capabilities-supported) for more capabilities.
+Refer to our [Espresso testing documentation](/support/docs/espresso-supported-capabilities/) for more capabilities.
->
-If you still have any questions for us, please feel free to let us know via our window.openLTChatWidget()}>**24X7 Chat Portal** or mail us to support@testmuai.com
+## Troubleshooting Espresso Tests
+---
+
+Beyond the logs above, the tables below list the common errors encountered when running Espresso tests on . Understanding these errors and their explanations can help you diagnose and resolve issues during your test execution on .
+
+### Espresso Build Errors
+
+This table highlights the errors encountered when running tests on [ Real Devices without shards](/support/docs/getting-started-with-espresso-testing/).
+
+
+
+
+
+| Build Execution Errors | Root Cause of Error | How to Fix |
+|--------------------------------------------|--------------------------|----------|
+|Application under test provided by you did not get installed. Please check the application.| The target application failed to install on the selected device during test execution. This indicates an issue with the provided application file or incompatibility with the chosen device configuration.| Check the application file, and that it is compatible with the device you chose, then upload it again. |
+|Test Suite provided by you did not get installed. Please check the application.| This indicates that the test suite you provided could not be installed on the chosen environment. This might be due to invalid test suite files, incompatibility issues, or missing dependencies.| Check the test suite file for problems, compatibility issues, and missing dependencies, then upload it again. |
+|Failed to fetch runner class for test extraction. Please recheck your test suite.| Test discovery failed. The system couldn't extract test cases or classes from the provided test suite application. This might be due to issues with the test suite app itself or its configuration.| Check the test suite app and its configuration, then upload it again. |
+|Failed to extract classes or tests from runner app - test discovery failed.| Test discovery failed. The system couldn't extract test cases or classes from the provided runner application. This might be due to issues with the test suite app itself or an incompatibility with the testing framework used. | Check the test suite app and that it works with your testing framework, then upload it again. |
+|No tests found in the test suite. Please check your test suite or applied filters.| The test execution framework couldn't locate any test cases to run due to: Empty Test Suite: Ensure your test suite contains at least one test class with a @Test annotated method. Incorrect Filtering: Verify that any applied test filters aren't accidentally excluding all tests. You can see more on espresso test filtering [here](/support/docs/speedup-espresso/).| Add at least one `@Test` method, and check that your filters do not exclude every test. |
+|Tests could not be run as localization setup failed. Please check locale and try again.| The test suite encountered a localization setup error. This means the system's locale or language settings could not be configured correctly. Please verify your locale settings and try re-running the tests. | Check your locale settings, then run the tests again. |
+|Oops! An error occurred at our end. Please try again.| A temporary infrastructure issue arose. While a device was allocated for your test, it became unavailable before the test execution started. Please retry the test or reach out to support@testmuai.com if the issue persists. | Run the test again. If it keeps happening, contact support@testmuai.com. |
+|Desired Capabilities Error. Please check the desired capabilities that you have passed.| The test encountered a [`Desired Capabilities`](/support/docs/espresso-supported-capabilities/) Error. This indicates an issue with the configuration provided for the test execution. Please verify the values you have set for desired capabilities like device, platform, or application path. | Check the device, platform, and application path values against the [supported capabilities](/support/docs/espresso-supported-capabilities/). |
+
+### Espresso via HyperExecute Shard Errors
+This table highlights the errors encountered when running espresso tests with [Shards via HyperExecute](/support/docs/sharding-espresso-rd-hyperexecute/) on Real Device Cloud.
+
+
+
+
+
+| Shard Execution Errors | Root Cause of Error | How to Fix |
+|--------------------------------------------|--------------------------|----------|
+|Application under test provided by you did not get installed. Please check the application.| The target application failed to install on the selected device during test execution. This indicates an issue with the provided application file (APK/IPA) or incompatibility with the chosen device configuration.| Check the application file, and that it is compatible with the device you chose, then upload it again. |
+|Test Suite provided by you did not get installed. Please check the application.| This indicates that the test suite you provided could not be installed on the chosen environment. This might be due to invalid test suite files, incompatibility issues, or missing dependencies.| Check the test suite file for problems, compatibility issues, and missing dependencies, then upload it again. |
+|Failed to fetch runner class for test extraction. Please recheck your test suite.| Test discovery failed. The system couldn't extract test cases or classes from the provided runner application. This might be due to issues with the runner app itself or its configuration.| Check the test suite app and its configuration, then upload it again. |
+|Failed to extract classes or tests from runner app - test discovery failed.| Test discovery failed. The system couldn't extract test cases or classes from the provided runner application. This might be due to issues with the runner app itself or an incompatibility with the testing framework used. | Check the test suite app and that it works with your testing framework, then upload it again. |
+|No tests found in the test suite. Please check your test suite or applied filters.| The test execution framework couldn't locate any test cases to run due to: Empty Test Suite: Ensure your test suite contains at least one test class with a @Test annotated method. Incorrect Filtering: Verify that any applied test filters aren't accidentally excluding all tests. You can see more on espresso test filtering [here](/support/docs/speedup-espresso/).| Add at least one `@Test` method, and check that your filters do not exclude every test. |
+|Tests could not be run as localization setup failed. Please check locale and try again.| The test suite encountered a localization setup error. This means the system's locale or language settings could not be configured correctly. Please verify your locale settings and try re-running the tests. | Check your locale settings, then run the tests again. |
+|Oops! An error occurred at our end. Please try again.| A temporary infrastructure issue arose. While a device was allocated for your test, it became unavailable before the test execution started. Please retry the test. | Run the test again. If it keeps happening, contact support@testmuai.com. |
+|Desired Capabilities Error. Please check the desired capabilities that you have passed.| The test encountered a [`Desired Capabilities`](/support/docs/espresso-supported-capabilities/) Error. This indicates an issue with the configuration provided for the test execution. Please verify the values you have set for desired capabilities like device, platform, or application path. | Check the device, platform, and application path values against the [supported capabilities](/support/docs/espresso-supported-capabilities/). |
+| Oops! An error occurred at our end. Please try again. | An internal error occurred while retrieving configuration details for the test execution environment (HyperExecute API). A temporary glitch might be preventing communication with the API. Please retry the test execution. If the issue persists, contact support for further assistance. | Run the test again. If it keeps happening, contact support@testmuai.com. |
+|Build has been stopped. | The build process was terminated prematurely. User intervention caused this stoppage, likely due to errors encountered during the build phase. | Check why the build was stopped, then run it again. |
+|Build breached queue timeout| The test execution encountered a "Build breached queue timeout" error. This indicates the build exceeded the maximum allowed wait time while in a queue. This could be due to high system load or insufficient resources on the platform. | Run the build again. |
+
+## Next Steps
+---
+
+Continue with these related guides:
+
+- [Getting started with Espresso testing](/support/docs/getting-started-with-espresso-testing/)
+- [Espresso automation capabilities](/support/docs/espresso-supported-capabilities/)
+- [Speed up your Espresso tests with filtering](/support/docs/speedup-espresso/)
+- [Sharding Espresso tests via HyperExecute](/support/docs/sharding-espresso-rd-hyperexecute/)
+
+>
+If you still have any questions for us, please feel free to let us know via our window.openLTChatWidget()}>**24X7 Chat Portal** or mail us to support@testmuai.com
-
-
-
-
diff --git a/docs/espresso-agent-skills.md b/docs/espresso-agent-skills.md
new file mode 100644
index 000000000..5db59ce82
--- /dev/null
+++ b/docs/espresso-agent-skills.md
@@ -0,0 +1,203 @@
+---
+id: espresso-agent-skills
+title: How to Run Espresso Tests With Agent Skills on TestMu AI
+toc_max_heading_level: 2
+hide_title: true
+sidebar_label: "Run Tests With Agent Skills"
+description: Run Espresso tests using AI agent skills on TestMu AI. Generate and execute Android UI automation on real devices from natural-language prompts.
+keywords:
+ - espresso agent skills
+ - ai android test automation
+ - espresso ai coding
+ - agent skills espresso
+ - testmu ai agent skills
+ - espresso real device ai
+image: /assets/images/og-images/automation-testing-og.png
+url: https://www.testmuai.com/support/docs/espresso-agent-skills/
+site_name: TestMu AI
+slug: espresso-agent-skills/
+canonical: https://www.testmuai.com/support/docs/espresso-agent-skills/
+---
+
+import BrandName, { BRAND_URL } from '@site/src/component/BrandName';
+
+
+
+# How to Run Espresso Tests With Agent Skills on TestMu AI
+---
+
+
+Running Espresso tests with Agent Skills on TestMu AI lets your AI coding assistant generate Android UI automation from natural-language prompts, scaffolding Gradle configuration, test code, and cloud execution so you run Espresso suites on real devices without manual setup.
+
+Instead of manually wiring up your Espresso project, use **Agent Skills** to let your AI coding assistant generate production-ready Android UI automation for you. The [espresso-skill](https://github.com/LambdaTest/agent-skills/tree/main/espresso-skill) is part of [TestMu AI Agent Skills](https://github.com/LambdaTest/agent-skills/) - structured packages that teach AI assistants how to write production-grade test code and run it on real devices.
+
+## What Agent Skills Are
+---
+
+Self-contained packages of instructions, code patterns, and configurations for a specific testing framework.
+
+Once installed, your AI assistant works like a senior Android QA automation architect with knowledge of:
+
+- Proper Espresso project structure in Java and Kotlin
+- Correct Gradle dependencies and build configuration
+- Both local and TestMu AI real-device cloud execution patterns
+- Common pitfalls and debugging approaches
+- CI/CD integration with GitHub Actions
+
+## Prerequisites
+---
+
+Make sure you have the following set up before you start.
+
+1. [Create a TestMu AI account](https://www.testmuai.com/register/) if you don't have one.
+2. Get your **Username** and **Access Key** from the [TestMu AI Dashboard](https://www.testmuai.com/login/?redirectTo=https://accounts.lambdatest.com/dashboard).
+3. Install an AI coding assistant: [Claude Code](https://claude.ai/code), [GitHub Copilot](https://github.com/features/copilot), [Cursor](https://cursor.sh/), [Gemini CLI](https://github.com/google-gemini/gemini-cli), or any compatible tool.
+
+## Step 1: Install the Espresso Agent Skill
+---
+
+Clone the repository and copy the Espresso skill into your AI tool's skills directory.
+
+```bash
+git clone https://github.com/LambdaTest/agent-skills.git
+
+# For Claude Code
+cp -r agent-skills/espresso-skill .claude/skills/
+
+# For Cursor
+cp -r agent-skills/espresso-skill .cursor/skills/
+
+# For GitHub Copilot
+cp -r agent-skills/espresso-skill .github/skills/
+
+# For Gemini CLI
+cp -r agent-skills/espresso-skill .gemini/skills/
+```
+
+:::tip
+Install **all available framework skills** at once by cloning the repository directly into your tool's skills directory (e.g., `.claude/skills/`, `.cursor/skills/`).
+:::
+
+## Step 2: Set Your Credentials
+---
+
+Add your TestMu AI credentials as environment variables so the generated tests can authenticate with the real device cloud.
+
+Visit the [TestMu AI Dashboard](https://www.testmuai.com/login/?redirectTo=https://accounts.lambdatest.com/dashboard), navigate to the left sidebar, and select **Credentials**. Copy your **Username** and **Access Key**, then run:
+
+```bash
+export LT_USERNAME="YOUR_LAMBDATEST_USERNAME"
+export LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"
+```
+
+## Step 3: Run Your First Test
+---
+
+Ask your AI assistant to write tests in natural language.
+
+```
+"Write an Espresso test for my Android app's login screen and run it on TestMu AI real devices"
+```
+
+```
+"Set up an Espresso project in Kotlin with a RecyclerView test and run it on TestMu AI"
+```
+
+```
+"Run my Espresso test suite across a Pixel 7 and a Galaxy S23 in parallel on TestMu AI, tag the build as 'release-v1.0'"
+```
+
+The Agent Skill automatically handles:
+
+1. **Project setup** - Creates the right Gradle configuration, dependencies, and instrumentation runner
+2. **Language detection** - Maps your request to Java or Kotlin
+3. **Execution target** - Configures local or TestMu AI real-device execution based on your request
+4. **Best practices** - Uses Espresso idioms (ViewMatchers, ViewActions, ViewAssertions) and IdlingResource for synchronization
+
+## What's Included in the Espresso Skill
+---
+
+A breakdown of everything the skill package contains.
+
+```
+espresso-skill/
+├── SKILL.md
+└── reference/
+ ├── playbook.md
+ └── advanced-patterns.md
+```
+
+| Section | Details |
+|---------|---------|
+| **Project Setup** | Gradle dependencies, instrumentation runner, project structure |
+| **Core Patterns** | Complete, runnable code examples with best practices |
+| **Cloud Integration** | TestMu AI real-device capabilities and app-upload configuration |
+| **CI/CD Integration** | GitHub Actions workflows with reporting and parallel execution |
+| **Debugging Guide** | Common build and shard errors mapped to solutions |
+| **Best Practices** | Actionable recommendations for production Android test code |
+
+## Supported AI Tools
+---
+
+Pick the tool you use and install the skill to the corresponding path.
+
+| Tool | Type | Installation Path |
+|------|------|-------------------|
+| Claude Code | CLI | `.claude/skills/` |
+| GitHub Copilot | Extension | `.github/skills/` |
+| Cursor | IDE | `.cursor/skills/` |
+| Gemini CLI | CLI | `.gemini/skills/` |
+| Codex CLI | CLI | `.codex/skills/` |
+| OpenCode | CLI | `.opencode/skills/` |
+| Claude.ai | Web | Settings > Features > Skills |
+
+## Next Steps
+---
+
+Continue with these related guides:
+
+- [Run Your First Espresso Test](/support/docs/getting-started-with-espresso-testing/)
+- [Espresso Supported Capabilities](/support/docs/espresso-supported-capabilities/)
+- [Debug Espresso Tests](/support/docs/debugging-espresso-tests/)
+
+
diff --git a/docs/espresso-env-variables-settings.md b/docs/espresso-env-variables-settings.md
index 6262a3cb7..64f2efab3 100644
--- a/docs/espresso-env-variables-settings.md
+++ b/docs/espresso-env-variables-settings.md
@@ -1,8 +1,8 @@
---
id: espresso-env-variables-settings
-title: Setting Up Espresso Environment Variables
+title: How to Set Espresso Env Variables on TestMu AI
sidebar_label: Environment Variable Settings
-description: Now you can run your Espresso framework on TestMu AI and this particular feature allows users to pass and retrieve environment variables (like STAGE, PROD, or DEV) during automated Android tests.
+description: Pass and retrieve environment variables like STAGE, PROD, or DEV during automated Espresso Android tests on TestMu AI's Real Device Cloud.
keywords:
- espresso
- environment
@@ -16,6 +16,7 @@ url: https://www.testmuai.com/support/docs/espresso-env-variables-settings/
site_name: TestMu AI
slug: espresso-env-variables-settings/
canonical: https://www.testmuai.com/support/docs/espresso-env-variables-settings/
+toc_max_heading_level: 2
---
import CodeBlock from '@theme/CodeBlock';
@@ -44,7 +45,7 @@ import VerifiedTag from '@site/src/component/verifiedTag';
},{
"@type": "ListItem",
"position": 3,
- "name": "Environment Variable Settings",
+ "name": "How to Set Espresso Env Variables on TestMu AI",
"item": `${BRAND_URL}/support/docs/espresso-env-variables-settings/`
}]
})
@@ -62,7 +63,7 @@ import VerifiedTag from '@site/src/component/verifiedTag';
"@type": "WebPage",
"@id": "https://www.testmuai.com/support/docs/espresso-env-variables-settings/"
},
- "headline": "Setting Up Espresso Environment Variables",
+ "headline": "How to Set Espresso Env Variables on TestMu AI",
"description": "Now you can run your Espresso framework on TestMu AI and this particular feature allows users to pass and retrieve environment variables (like STAGE, PROD, or DEV) during automated Android tests.",
"url": "https://www.testmuai.com/support/docs/espresso-env-variables-settings/",
"image": {
@@ -173,7 +174,7 @@ import VerifiedTag from '@site/src/component/verifiedTag';
]) }}
/>
-This feature allows you to dynamically set and test environment variables during Espresso test execution on .
+Setting Espresso environment variables on TestMu AI lets you pass values like STAGE, PROD, or DEV into automated Android tests at runtime. Define variables in your test suite, supply them during execution, and switch environments dynamically without rebuilding your APK.
## Step 1: Create Variables in Your Test Suite
Define environment variables in your Espresso test suite to fetch the variable values during execution.
diff --git a/docs/espresso-mockwebserver-localhost.md b/docs/espresso-mockwebserver-localhost.md
index 0fac50c0b..2a5f0e11f 100644
--- a/docs/espresso-mockwebserver-localhost.md
+++ b/docs/espresso-mockwebserver-localhost.md
@@ -1,6 +1,6 @@
---
id: espresso-mockwebserver-localhost
-title: Testing with MockWebServer & Localhost
+title: How to Run Espresso Test with MockWebServer on TestMu AI
sidebar_label: MockWebServer & Localhost
description: Test applications using MockWebServer or localhost-based mock servers with Espresso on TestMu AI real devices.
keywords:
@@ -14,6 +14,7 @@ url: https://www.testmuai.com/support/docs/espresso-mockwebserver-localhost/
site_name: TestMu AI
slug: espresso-mockwebserver-localhost/
canonical: https://www.testmuai.com/support/docs/espresso-mockwebserver-localhost/
+toc_max_heading_level: 2
---
import CodeBlock from '@theme/CodeBlock';
@@ -38,7 +39,7 @@ import VerifiedTag from '@site/src/component/verifiedTag';
},{
"@type": "ListItem",
"position": 3,
- "name": "MockWebServer & Localhost",
+ "name": "How to Run Espresso Test with MockWebServer on TestMu AI",
"item": `${BRAND_URL}/support/docs/espresso-mockwebserver-localhost/`
}]
})
@@ -56,7 +57,7 @@ import VerifiedTag from '@site/src/component/verifiedTag';
"@type": "WebPage",
"@id": "https://www.testmuai.com/support/docs/espresso-mockwebserver-localhost/"
},
- "headline": "Testing with MockWebServer & Localhost",
+ "headline": "How to Run Espresso Test with MockWebServer on TestMu AI",
"description": "Test applications using MockWebServer or localhost-based mock servers with Espresso on TestMu AI real devices.",
"url": "https://www.testmuai.com/support/docs/espresso-mockwebserver-localhost/",
"image": {
@@ -119,7 +120,7 @@ import VerifiedTag from '@site/src/component/verifiedTag';
}) }}
/>
- supports testing apps that use MockWebServer or similar localhost-based mock servers in Android Espresso tests.
+Testing with MockWebServer on TestMu AI lets Espresso apps reach localhost-based mock servers on real Android devices. When network capture routes traffic through a proxy, use Localhost Bypass or Port Forwarding so your device resolves mock endpoints and requests succeed.
## Why Special Configuration is Needed
@@ -184,12 +185,12 @@ Best when localhost network logs need to be captured and there are no port confl
| Capability | Data Type | Description |
|------------|-----------|-------------|
| `portForwarding` | Object | Configure port forwarding for localhost services on the device |
-| `portForwarding.ports` | Array | Ports to forward (max 5 unique ports, must be 1024–65535) |
+| `portForwarding.ports` | Array | Ports to forward (max 5 unique ports, must be 1024-65535) |
Port forwarding works at the network level, so **all HTTP libraries are supported**.
:::note
-- Ports must be in the range 1024–65535. Privileged ports (1–1023) are blocked.
+- Ports must be in the range 1024-65535. Privileged ports (1-1023) are blocked.
- Maximum 5 unique ports. No duplicate ports allowed.
- Invalid port formats (e.g., strings like `"abc"`) are rejected.
- Cannot be used together with `localhost`.
@@ -201,7 +202,7 @@ Port forwarding works at the network level, so **all HTTP libraries are supporte
- **Connection errors**: Ensure `network: true` is set when using `localhost: true`. For `portForwarding`, `network: true` is optional.
- **Cannot use localhost and portForwarding together**: These are mutually exclusive. Pick one.
-- **Port validation errors**: Ports must be 1024–65535, max 5 unique ports, no duplicates allowed.
+- **Port validation errors**: Ports must be 1024-65535, max 5 unique ports, no duplicates allowed.