
Android UI Journey Testing
FreeAutomate and verify Android UI journeys with XML specs.
Free · Opens the source repo
What Android UI Journey Testing does
The Android UI Journey Testing skill provides a structured approach to automate the testing of Android applications' user interfaces. By utilizing XML-specified journey definitions, this skill allows developers and testers to define a series of user actions and expectations in a clear, standardized format. Each journey consists of a sequence of actions, such as taps and swipes, followed by assertions to verify the application's state at each step. This ensures that the app behaves as expected across various user flows.
The skill operates by parsing the provided XML file to extract the defined actions and assertions. It executes each action in the specified order using ADB commands, which interact directly with the Android device or emulator. If an action fails—whether due to a missing UI element or a crash—the journey is marked as failed, and the subsequent steps are skipped. This immediate feedback helps streamline the debugging process, allowing developers to quickly identify issues in their applications.
Upon completion of a journey, the skill generates a standardized JSON report summarizing the results of each action, including whether it passed or failed. This report can be invaluable for tracking the success of automated tests over time and for integrating with CI/CD pipelines. By automating the verification of multi-step user flows, this skill significantly enhances the efficiency of the testing process, making it easier to maintain high-quality user experiences in Android applications.
When to use it
Use this skill when you need to automate the testing of user interactions in Android applications based on predefined XML specifications.
When not to use it
This skill may not be suitable for testing non-UI aspects of applications or for developers who prefer manual testing methods.
What you can build with it
Automating User Flows
Use this skill to automate complex user flows in your Android app, such as login and checkout processes.
Verifying UI Behavior
Employ this skill to ensure that your app's UI behaves as expected by verifying state assertions at each step.
Generating Test Reports
Leverage the JSON outcome reports generated by this skill for easy integration into your CI/CD pipeline.
How to install Android UI Journey Testing
View source1. Install with the skills CLI
npx skills add sickn33/agentic-awesome-skills/android-ui-journey-testing --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by sickn33Android UI Journey Testing
Overview
This skill outlines the standard workflow for running XML-specified User Journey tests on Android applications. A "journey" is a sequenced set of user actions and state assertions designed to verify end-to-end functionality. The journey XML acts as the source of truth for the app's behavior. The executor proceeds sequentially, performing UI interactions, checking state assertions, and writing a standardized JSON outcome report.
When to Use
- Use when evaluating an Android application's UI behavior against an XML test specification.
- Use when automating multi-step user flows (e.g., login, checkout, navigation) and verifying expectations.
- Use when running verification tests and generating standardized JSON test reports.
- Use when debugging application flows on physical devices or emulators using ADB commands.
How It Works
graph TD
A[Parse Journey XML] --> B[Execute Action / Interaction]
B --> C{Success?}
C -- Yes --> D[Verify State Expectation / Assertion]
C -- No/Crash --> G[Mark FAILED & Exit]
D -- Passed --> E{More Steps?}
D -- Failed --> G
E -- Yes --> B
E -- No --> F[Output JSON Summary]
Step 1: Parse the Journey Specification
Read and parse the XML test suite structure. The root node <journey> defines the test case name, and the <actions> block contains the sequence of test steps.
<journey name="Search and Cart Flow">
<description>Verify that searching for an item and adding it to the cart succeeds.</description>
<actions>
<action>Search for soda</action>
<action>Tap the first search result</action>
<action>Verify that the product detail screen is shown</action>
</actions>
</journey>
Step 2: Sequential Step Evaluation
Process each <action> element in the exact order specified. Test steps are classified into two groups:
A. Interactive Actions (Taps, Swipes, Text Input)
Perform the physical UI interaction using ADB.
- Tapping: Tap the center of the target element's bounds:
adb shell input tap <x> <y> - Swiping/Scrolling: Swipe from coordinate to coordinate with a duration:
adb shell input swipe <x1> <y1> <x2> <y2> <duration_ms> - Text Typing: Type text into the active input field:
adb shell input text "<string>"
If the element is missing or the action cannot be performed, the action and the journey fail.
B. State Assertions (Expectation Verification)
Steps beginning with "verify", "check", or "ensure" represent state assertions.
- Inspect the current screen (using screenshots or
uiautomator dump) without interacting or scrolling. - Confirm all sub-assertions are met. For example, "Verify that the app is on the Home screen and the logo is visible" fails if the home screen is not displayed or the logo is missing.
Step 3: Handle Failures and Crashes
If the application crashes, exits, freezes, or fails an assertion:
- Immediately stop journey execution.
- Mark the failed step as
FAILED. - Mark any subsequent steps as
SKIPPED. - Document the exact reason for failure.
Step 4: Generate JSON Report
Format the execution results into a standardized JSON schema and write it to the output log.
Examples
Example 1: Full Journey XML Specification
<journey name="Login and Profile Edit">
<description>Logs into the app, navigates to settings, and changes user profile information.</description>
<actions>
<action>Verify that the username input field is visible</action>
<action>Tap the username input field</action>
<action>Type "testuser" into the input</action>
<action>Tap the password input field</action>
<action>Type a redacted test password into the input</action>
<action>Tap the "Login" button</action>
<action>Verify that the Home dashboard is visible and user profile photo is shown</action>
</actions>
</journey>
Example 2: Standard JSON Outcome Report
{
"journey": "Login and Profile Edit",
"results": [
{
"action": "Verify that the username input field is visible",
"status": "PASSED",
"commands": [],
"comment": "Username input detected at bounds [100,200][980,300] via UI dump."
},
{
"action": "Tap the username input field",
"status": "PASSED",
"commands": [
"adb shell input tap 540 250"
],
"comment": "Tapped center coordinates of username input."
},
{
"action": "Type \"testuser\" into the input",
"status": "PASSED",
"commands": [
"adb shell input text \"testuser\""
],
"comment": "Username typed successfully."
},
{
"action": "Tap the password input field",
"status": "PASSED",
"commands": [
"adb shell input tap 540 370"
],
"comment": "Tapped center of password input."
},
{
"action": "Type a redacted test password into the input",
"status": "PASSED",
"commands": [
"adb shell input text \"[REDACTED_PASSWORD]\""
],
"comment": "Password typed successfully. The actual input value was not stored in the report."
},
{
"action": "Tap the \"Login\" button",
"status": "PASSED",
"commands": [
"adb shell input tap 540 500"
],
"comment": "Login button clicked."
},
{
"action": "Verify that the Home dashboard is visible and user profile photo is shown",
"status": "FAILED",
"commands": [],
"comment": "Dashboard loaded but profile photo was missing from the UI header."
}
]
}
Best Practices
- ✅ Calculate Centers for Taps: When parsing element bounds like
[x1,y1][x2,y2], always compute the middle coordinate: $$x_{center} = \frac{x_1 + x_2}{2}, \quad y_{center} = \frac{y_1 + y_2}{2}$$ - ✅ Include Sleep Buffers: Always add a short delay (e.g., 1-2 seconds) after interactive actions (like button taps) to let layouts and transitions render before executing assertions.
- ✅ Fail Fast: Stop the test immediately upon encountering the first failure. Continuing after a failure leads to invalid results.
- ✅ Log Precise Commands Safely: Include non-sensitive raw commands (such as
adb shell input tap) in the JSON output list for diagnostics. Redact text entered into password, OTP, token, payment, or personal-data fields; never persist the literal secret in reports, CI logs, or shared artifacts.
Limitations
- The parser only evaluates the static screen hierarchy (e.g.
uiautomator dump). Elements that require scrolling are marked as not visible unless a scrolling action is explicitly performed. - Non-standard UI components (like custom OpenGL canvas views) cannot be read via standard accessibility trees and may require screenshot analysis or hardcoded click maps.
- Key events and text typing via ADB do not trigger standard soft keyboard events on all emulator images, which can lead to input validation issues.
Related Skills
@android-cli- General CLI tool syntax, package install, and device queries.@android_ui_verification- Direct ADB script templates for general UI checks.
Frequently asked questions about Android UI Journey Testing
Similar skills
Android App Development
Comprehensive guide for Android and cross-platform app development.
Add App Clip to Expo App
Integrate lightweight iOS App Clips into your Expo project.
APK Reverse
Streamline your Android APK reverse engineering process.
Swift Expert
Master iOS/macOS development with Swift and SwiftUI.
React Native Expert
Build and optimize mobile apps with React Native and Expo.
Kotlin Specialist
Master idiomatic Kotlin with expert patterns and practices.
