---
name: run-automated-mobile-ui-tests-in-containerized
description: "Runs automated mobile UI test suites in containerized emulators on pull requests or test dispatches, capturing logs, screenshots and traces for failed runs. Use when a mobile build needs automated UI validation and diagnostic summaries."
license: CC-BY-4.0
compatibility: "Needs access to: Terminal, GitHub, Slack."
metadata:
  author: "BotBento Editorial"
  version: "2026-10-15"
  source: "https://botbento.com/usecases/run-automated-mobile-ui-tests-in-containerized/"
  kind: workflow
  hermes:
    tags: ["android", "testing", "mobile", "ci-cd", "docker"]
    category: coding
    requires_toolsets: ["terminal", "connections"]
---
# Run automated mobile UI tests in containerized emulators

Execute mobile test suites against virtual devices and capture failure diagnostics

## When to use

Launch isolated virtual mobile environments in containers to run automated test suites on pull requests. Collect test output, system logs, and UI interaction traces when assertions fail, producing structured diagnostic summaries for engineering teams.

## Inputs

- `repository`: GitHub repository containing the mobile application and UI test suite.
- `pull_request`: Pull request reference or test dispatch event that identifies the code to test.
- `test_suite`: Mobile UI test suite or command to execute inside the emulator container.

## Steps

1. When something happens: PR opened or test dispatched (Pull request opened or a test run is manually dispatched.)
2. Run UI test suite in emulator
3. Review and post test diagnostics

## Instructions

When triggered by a new build or test dispatch, execute terminal commands to boot the virtual device container and run test suites. Capture device logs, screenshots, and execution traces for any failed runs. Draft a report detailing pass rates and failure stack traces. Always require user approval before publishing comments to GitHub or sending notifications to team chat channels.

## Approvals

- Publishing comments to GitHub must wait for user approval.
- Sending notifications to team chat channels must wait for user approval.

## Output

Structured diagnostic summary with pass rates, failure stack traces, device logs, screenshots and UI interaction traces. (format: markdown)

## Source

Summarized in our own words from [docker-android: Android in docker solution with noVNC supported, video recording, mcp server and AI-agent](https://github.com/budtmo/docker-android) (GitHub, checked 2026-10-15). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/run-automated-mobile-ui-tests-in-containerized/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
