From 71c7f84c05fe49135ef70617938e779f64ee7476 Mon Sep 17 00:00:00 2001 From: salmank Date: Sun, 4 Oct 2026 00:24:30 +0530 Subject: [PATCH 1/5] docs(espresso): migrate EspressoTestingSidebar docs, sidebar, and device-tag styling Migrate the EspressoTestingSidebar doc set and restructured sidebar from restructure-docs onto a fresh stage base, matching the AppiumTesting migration. - Restructure EspressoTestingSidebar in sidebars.js (Getting Started category) - Make Espresso Testing a link in sidebars-unified.js with a dedicated EspressoTestingSidebar export (mirrors the Appium / Test Manager pattern) - Add docs/espresso-agent-skills.md - Merge the troubleshoot page into debugging-espresso-tests.md and delete docs/troubleshoot-espresso-tests.md; retarget its two inbound links (error-messages.md, hyperexecute-espresso-testing.md) - Restyle .realDeviceColor / .virtualDeviceColor device tags in custom.css to the subtle, theme-aware chips used on the Appium pages Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/debugging-espresso-tests.md | 88 ++++++-- docs/error-messages.md | 2 +- docs/espresso-agent-skills.md | 203 ++++++++++++++++++ docs/espresso-env-variables-settings.md | 9 +- docs/espresso-mockwebserver-localhost.md | 15 +- docs/espresso-supported-capabilities.md | 20 +- docs/getting-started-with-espresso-testing.md | 92 +++----- docs/hyperexecute-espresso-testing.md | 2 +- docs/junit-report.md | 17 +- docs/regular-expression-espresso.md | 8 +- docs/sharding-espresso.md | 44 ++-- docs/speedup-espresso.md | 32 ++- docs/supported-locales-espresso.md | 7 +- docs/troubleshoot-espresso-tests.md | 142 ------------ sidebars-unified.js | 8 +- sidebars.js | 67 ++---- src/css/custom.css | 23 +- 17 files changed, 436 insertions(+), 343 deletions(-) create mode 100644 docs/espresso-agent-skills.md delete mode 100644 docs/troubleshoot-espresso-tests.md diff --git a/docs/debugging-espresso-tests.md b/docs/debugging-espresso-tests.md index 1a58a1ec8..621d19118 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/` }] }) @@ -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/). + +Image
+ + + +| 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. + +Image
+ + + +| 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/error-messages.md b/docs/error-messages.md index 816b47f0f..4c57fb2dd 100644 --- a/docs/error-messages.md +++ b/docs/error-messages.md @@ -172,7 +172,7 @@ Find your error by what your test printed. The **W3C error code** is the string | KaneAI | [KaneAI Errors](/support/docs/error-handling-kaneai/) | | Tunnel | [Tunnel Error Messages](/support/docs/troubleshooting-lambda-tunnel/#error-messages) | | SmartUI CLI | [SmartUI Error Message Reference](/support/docs/smartui-troubleshooting-guide/#error-message-reference) | -| Espresso and iOS app tests | [Troubleshoot Espresso Tests](/support/docs/troubleshoot-espresso-tests/) · [Troubleshooting iOS App Testing](/support/docs/troubleshooting-ios-app-testing/) | +| Espresso and iOS app tests | [Troubleshoot Espresso Tests](/support/docs/debugging-espresso-tests/#troubleshooting-espresso-tests) · [Troubleshooting iOS App Testing](/support/docs/troubleshooting-ios-app-testing/) | ## Authentication Error at the Time of Test Execution 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..3356c7fd2 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/` }] }) @@ -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..761c90726 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/` }] }) @@ -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. diff --git a/docs/hyperexecute-espresso-testing.md b/docs/hyperexecute-espresso-testing.md index f891d8cd5..76e755614 100644 --- a/docs/hyperexecute-espresso-testing.md +++ b/docs/hyperexecute-espresso-testing.md @@ -500,7 +500,7 @@ OR use this command if you have not exported your username and access key in the :::tip Troubleshoot Guide -If you are stumbling upon errors during Espresso test execution, then refer to the [**Espresso Troubleshoot**](/support/docs/troubleshoot-espresso-tests/#sharded-espresso-errors) guide for detailed explanations to your common errors. +If you are stumbling upon errors during Espresso test execution, then refer to the [**Espresso Troubleshoot**](/support/docs/debugging-espresso-tests/#espresso-via-hyperexecute-shard-errors) guide for detailed explanations to your common errors. ::: ## Additional Details diff --git a/docs/junit-report.md b/docs/junit-report.md index f1493cc16..8c1c8c38c 100644 --- a/docs/junit-report.md +++ b/docs/junit-report.md @@ -1,8 +1,8 @@ --- id: espresso-junit-report -title: Espresso JUnit XML Reports +title: How to Get Espresso JUnit XML Reports on TestMu AI sidebar_label: JUnit XML Reports -description: Espresso Junit Report +description: Retrieve JUnit XML reports for Espresso tests on TestMu AI, including non-shard builds and shard builds for individual shards or all shards collectively. keywords: - espresso - java @@ -17,6 +17,7 @@ url: https://www.testmuai.com/support/docs/espresso-junit-report/ site_name: TestMu AI slug: espresso-junit-report/ canonical: https://www.testmuai.com/support/docs/espresso-junit-report/ +toc_max_heading_level: 2 --- import CodeBlock from '@theme/CodeBlock'; @@ -42,7 +43,7 @@ import VerifiedTag from '@site/src/component/verifiedTag'; },{ "@type": "ListItem", "position": 3, - "name": "Report", + "name": "How to Get Espresso JUnit XML Reports on TestMu AI", "item": `${BRAND_URL}/support/docs/espresso-junit-report/` }] }) @@ -108,14 +109,12 @@ import VerifiedTag from '@site/src/component/verifiedTag'; --- -## Introduction ---- - -JUnit reports provide a detailed summary of test execution, allowing you to better understand your test outcomes. This document aims to guide you through the process of retrieving JUnit reports for Espresso tests executed on the platform. +Espresso JUnit XML reports on TestMu AI give a detailed summary of your test execution outcomes. Using the report APIs, you can fetch JUnit reports for non-shard Espresso builds and for shard builds, retrieving results per individual shard or collectively. ## Objective --- -### By the end of this document, you should be able to: + +By the end of this document, you should be able to: 1. Fetch JUnit reports for non-shard Espresso builds. @@ -188,7 +187,7 @@ To fetch the JUnit reports for `all shards` in a shard build, use:
  • - espresso Testing + How to Get Espresso JUnit XML Reports on TestMu AI
  • diff --git a/docs/regular-expression-espresso.md b/docs/regular-expression-espresso.md index 508973502..b5d3ed81d 100644 --- a/docs/regular-expression-espresso.md +++ b/docs/regular-expression-espresso.md @@ -1,6 +1,6 @@ --- id: regular-expression-espresso -title: Regular Expression - Espresso +title: How to Use REGEX for Espresso Devices on TestMu AI # hide_title: true sidebar_label: Regular Expression description: If your chosen device for testing on TestMu AI is unavailable, use REGEX to broaden the search for alternative devices to run espresso test. @@ -11,6 +11,7 @@ url: https://www.testmuai.com/support/docs/regular-expression-espresso/ site_name: TestMu AI slug: regular-expression-espresso/ canonical: https://www.testmuai.com/support/docs/regular-expression-espresso/ +toc_max_heading_level: 2 --- import BrandName, { BRAND_URL } from '@site/src/component/BrandName'; import VerifiedTag from '@site/src/component/verifiedTag'; @@ -33,7 +34,7 @@ import VerifiedTag from '@site/src/component/verifiedTag'; },{ "@type": "ListItem", "position": 3, - "name": "App Automation: Regular Expression", + "name": "How to Use REGEX for Espresso Devices on TestMu AI", "item": `${BRAND_URL}/support/docs/regular-expression-espresso/` }] }) @@ -113,6 +114,8 @@ import VerifiedTag from '@site/src/component/verifiedTag'; }) }} /> +Using REGEX for Espresso device selection on TestMu AI lets you match any available device instead of a fixed one. When your chosen device is busy, pass a pattern in the `deviceName` capability so TestMu AI allots any match automatically. + Regular Expression or REGEX is widely used to make searching/find characters in a string. When you run a test on using a specific device, there may be scenarios, in which the particular device that you selected isn’t available. In these scenarios, REGEX will help you widen the search request for devices to run the test on. @@ -130,7 +133,6 @@ Usual way to pass the `deviceName` and `platformVersion` looks like this:
    ``` Passing `deviceName` using REGEX:
    - ```java diff --git a/docs/sharding-espresso.md b/docs/sharding-espresso.md index 3ca73d159..e4c56e1c4 100644 --- a/docs/sharding-espresso.md +++ b/docs/sharding-espresso.md @@ -1,8 +1,9 @@ --- id: sharding-espresso -title: Sharding for Espresso -sidebar_label: Sharding for Espresso -description: This document will cover how to execute Espresso Tests on real devices with HyperExecute. Before starting, please make sure you have App Automation plans on your account. +title: How to Shard Espresso Tests on TestMu AI +hide_title: true +sidebar_label: Sharding +description: Shard Espresso tests to run in parallel on real devices with HyperExecute on TestMu AI, cutting execution time using a simple YAML configuration. keywords: - sharding - Espresso @@ -17,16 +18,17 @@ url: https://www.testmuai.com/support/docs/sharding-espresso-rd-hyperexecute/ site_name: TestMu AI slug: sharding-espresso-rd-hyperexecute/ canonical: https://www.testmuai.com/support/docs/sharding-espresso-rd-hyperexecute/ +toc_max_heading_level: 2 --- import CodeBlock from '@theme/CodeBlock'; import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys"; -import RealDeviceTag from '../src/component/realDevice'; -import VirtualDeviceTag from '../src/component/virtualDevice'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import BrandName, { BRAND_URL } from '@site/src/component/BrandName'; import { CookieTrackingSignup } from '@site/src/component/CookieTracking'; +import RealDeviceTag from '@site/src/component/realDevice'; +import VirtualDeviceTag from '@site/src/component/virtualDevice'; import VerifiedTag from '@site/src/component/verifiedTag'; @@ -47,7 +49,7 @@ import VerifiedTag from '@site/src/component/verifiedTag'; },{ "@type": "ListItem", "position": 3, - "name": "Sharding in Espresso", + "name": "How to Shard Espresso Tests on TestMu AI", "item": `${BRAND_URL}/support/docs/sharding-espresso-rd-hyperexecute/` }] }) @@ -190,11 +192,18 @@ import VerifiedTag from '@site/src/component/verifiedTag'; } ]) }} /> + +# How to Shard Espresso Tests on TestMu AI + + +Sharding Espresso tests on TestMu AI splits your suite into shards that run in parallel across real devices with HyperExecute, cutting total execution time. Configure a simple YAML file to distribute tests, orchestrate runs, and review results on the dashboard. + + Running **Espresso** tests sequentially can be laborious and time-intensive. This guide offers an efficient solution by introducing the concept of **sharding**. By breaking down tests into shards, they can be executed in parallel, significantly trimming down the total testing duration. -Furthermore, this document provides insights on executing Espresso Tests on real devices using the innovative **HyperExecute** platform. Designed with precision, HyperExecute stands out as a test orchestration solution, tailored to execute end-to-end tests at breakneck speed. To streamline its setup and configuration, a user-friendly `YAML` file is employed. Dive into this guide to make your testing process more agile and efficient. +**HyperExecute** is a test orchestration platform that executes Espresso end-to-end tests on real devices at high speed, configured through a `YAML` file. :::tip Note You can learn more about the HyperExecute portal and UI by going through our [Guided Walkthrough](/support/docs/hyperexecute-guided-walkthrough/) page. It contains all the relevant information that you need to optimize your testing process with HyperExecute. @@ -312,7 +321,7 @@ Upload your **test suite** (.apk file) to the servers using our ** 1. Firstly, create a folder on your local. 2. Download the **HyperExecute CLI** file and put it under this folder based on your platform. -### Download HyperExecute CLI +#### Download HyperExecute CLI | Platform | HyperExecute CLI download location | | ---------| --------------------------- | @@ -328,11 +337,11 @@ Sharding can be categorized into two types: Refer to the sample `.yaml` file here - - + +
    @@ -398,6 +407,8 @@ framework: + +
    @@ -485,11 +496,11 @@ If you are using the `deviceSelectionStrategy: any`, then in that case all the m Refer to the sample `.yaml` file here - - + +
    @@ -532,6 +543,8 @@ framework: + +
    @@ -601,7 +614,6 @@ chmod u+x ``` You can refer to this example and screenshot below: - ``` @@ -695,7 +707,9 @@ To download these artifacts in your local machine, you can pass the `--download-
  • - Sharding in XCUIT + + How to Shard Espresso Tests on TestMu AI +
  • - \ No newline at end of file + diff --git a/docs/speedup-espresso.md b/docs/speedup-espresso.md index 9ddb347a7..2a04cb36b 100644 --- a/docs/speedup-espresso.md +++ b/docs/speedup-espresso.md @@ -1,8 +1,8 @@ --- id: speedup-espresso -title: Filters for Espresso Tests -sidebar_label: Filters for Espresso Tests -description: This document helps you learn how to speed up your Espresso Tests. +title: How to Filter Espresso Tests on TestMu AI +sidebar_label: Test Filters +description: Filter Espresso test cases on TestMu AI using package, class, annotation, and size parameters passed to the REST API to run only the tests you need. keywords: - espresso test filters - app test automation @@ -17,6 +17,7 @@ url: https://www.testmuai.com/support/docs/speedup-espresso/ site_name: TestMu AI slug: speedup-espresso/ canonical: https://www.testmuai.com/support/docs/speedup-espresso/ +toc_max_heading_level: 2 --- import CodeBlock from '@theme/CodeBlock'; @@ -45,7 +46,7 @@ import VerifiedTag from '@site/src/component/verifiedTag'; },{ "@type": "ListItem", "position": 3, - "name": "Filters for Espresso Test", + "name": "How to Filter Espresso Tests on TestMu AI", "item": `${BRAND_URL}/support/docs/speedup-espresso/` }] }) @@ -141,6 +142,7 @@ import VerifiedTag from '@site/src/component/verifiedTag'; /> --- +Filtering Espresso tests on lets you run only selected test cases instead of running the entire suite, speeding up execution. Pass parameters like package, class, annotation, and size to the REST API request through your AndroidJUnitRunner test runner. Usually, all the test cases of your Espresso test suite are executed, but there is a way to filter these. You can use Espresso test runner (typically `AndroidJUnitRunner`), which provides you with multiple options to filter the test cases which you want to execute. @@ -184,11 +186,11 @@ Please refer to the example `cURL` requests given below for your reference. ### 1. To run specifically defined packages - - + +
    {`curl --location --request POST 'https://mobile-api.lambdatest.com/framework/v1/espresso/build' \\ @@ -210,6 +212,8 @@ Please refer to the example `cURL` requests given below for your reference. + +
    @@ -224,11 +228,11 @@ Please refer to the example `cURL` requests given below for your reference. ### 2. To run specifically defined classes - - + +
    {`curl --location --request POST 'https://mobile-api.lambdatest.com/framework/v1/espresso/build' \\ @@ -250,6 +254,8 @@ Please refer to the example `cURL` requests given below for your reference. + +
    @@ -264,11 +270,11 @@ Please refer to the example `cURL` requests given below for your reference. ### 3. To run specifically defined annotations - - + +
    {`curl --location --request POST 'https://mobile-api.lambdatest.com/framework/v1/espresso/build' \\ @@ -294,6 +300,8 @@ Please refer to the example `cURL` requests given below for your reference. + +
    @@ -324,7 +332,9 @@ This configuration will run tests annotated with multiple annotations, i.e., onl
  • - Speeding up Espresso Tests + + How to Filter Espresso Tests on TestMu AI +
  • diff --git a/docs/supported-locales-espresso.md b/docs/supported-locales-espresso.md index 7f9e12ff8..a0bd490d3 100644 --- a/docs/supported-locales-espresso.md +++ b/docs/supported-locales-espresso.md @@ -1,6 +1,6 @@ --- id: supported-locales-espresso -title: Supported Locales And Languages - Espresso +title: Supported Espresso Locales & Languages on TestMu AI hide_title: false sidebar_label: Supported Locales And Languages description: Checkout the list of all supported locales for espresso. @@ -13,6 +13,7 @@ url: https://www.testmuai.com/support/docs/supported-locales-espresso/ site_name: TestMu AI slug: supported-locales-espresso/ canonical: https://www.testmuai.com/support/docs/supported-locales-espresso/ +toc_max_heading_level: 2 --- import BrandName, { BRAND_URL } from '@site/src/component/BrandName'; import VerifiedTag from '@site/src/component/verifiedTag'; @@ -35,7 +36,7 @@ import VerifiedTag from '@site/src/component/verifiedTag'; },{ "@type": "ListItem", "position": 3, - "name": "List of Supported Locales", + "name": "Supported Espresso Locales & Languages on TestMu AI", "item": `${BRAND_URL}/support/docs/supported-locales-espresso/` }] }) @@ -109,7 +110,7 @@ import VerifiedTag from '@site/src/component/verifiedTag'; }) }} /> -Use the given below list of supported locale and language codes for app testing. +Espresso testing on TestMu AI supports a wide range of Android and iOS locales and language codes. Use the tables to find the correct code, then configure Appium's language capability to test how your app renders localized strings across regions. ## Android Locales and Language Codes diff --git a/docs/troubleshoot-espresso-tests.md b/docs/troubleshoot-espresso-tests.md deleted file mode 100644 index d458d23a8..000000000 --- a/docs/troubleshoot-espresso-tests.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -id: troubleshoot-espresso-tests -title: Troubleshoot Your Espresso Tests -hide_title: false -sidebar_label: Troubleshoot Espresso Tests -description: Look up the error messages shown when Espresso builds and shards fail on TestMu AI, with the root cause and how to fix each one. -keywords: -- debug espresso tests -- how to debug espresso tests -- mobile app testing -- espresso error messages -- espresso build errors -url: https://www.testmuai.com/support/docs/troubleshoot-espresso-tests/ -site_name: TestMu AI -slug: troubleshoot-espresso-tests/ -canonical: https://www.testmuai.com/support/docs/troubleshoot-espresso-tests/ ---- -import BrandName, { BRAND_URL } from '@site/src/component/BrandName'; - - - -