android-ui-test
Skill54 starsChanged 21 days agoApache-2.0View on GitHub
Demonstration skill showing how to use uiautomator2-mcp-server for AI-driven Android UI testing. Also serves as the project's own automated UI test suite for continuous validation.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- douyin-searchSkill
- release-managerSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
When developers want to understand how to create Android UI testing skills:
- Very specific: line 41
When validating uiautomator2-mcp-server functionality:
- Distinctive: line 45
Ensure consistent performance across device variations
- Distinctive: line 53
Verify device connectivity and basic info
- Distinctive: line 60
Element Interactions: Wait for elements, get bounds, text extraction, element clicks
- Distinctive: line 62
Clipboard Operations: Read/write clipboard content
- Distinctive: line 116
Ensure all 69 unit tests pass
- Very specific: line 117
Run doctor command: u2mcp doctor -v
- Distinctive: line 119
Verify all 77 MCP tools are registered
- Very specific: line 124
Version Tag: Create a PEP 440 compliant tag (e.g., v0.3.3)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Android UI Test Automation (Demo & Production)
This skill serves a dual purpose:
- Demonstration: Shows how to build AI-driven Android UI testing skills
- Production Testing: Acts as the project's own automated UI test suite
Goals
- Demonstrate best practices for Android UI automation skills
- Provide comprehensive testing for uiautomator2-mcp-server functionality
- Enable AI agents to validate Android device interactions
- Serve as a reference implementation for similar skills
Prerequisites
- Connected Android device with USB debugging enabled
- ADB server running (
adb start-server) - uiautomator2-mcp-server properly configured
Usage Scenarios
Scenario 1: Learning Example
When developers want to understand how to create Android UI testing skills:
- Study the structured approach in this skill
- Learn proper YAML metadata formatting
- Understand test case organization and execution flow
- See how to handle device-specific considerations
Scenario 2: Production Testing
When validating uiautomator2-mcp-server functionality:
- Execute complete test suite automatically
- Generate detailed pass/fail reports
- Validate all core device interaction capabilities
- Ensure consistent performance across device variations
Test Execution Flow
Phase 1: Device Setup and Validation
- List connected devices via
device_list - Select first available device
- Initialize device via
inittool - Verify device connectivity and basic info
Phase 2: Comprehensive Functionality Tests
- Device Operations: Info, screenshot, UI hierarchy dump
- Touch Actions: Click, long press, double click at various positions
- Gesture Operations: Swipe, drag, system key presses
- Application Management: List apps, launch apps, get app info
- Element Interactions: Wait for elements, get bounds, text extraction, element clicks
- Input Operations: Text input, keyboard management
- Clipboard Operations: Read/write clipboard content
Phase 3: Intelligent Reporting
Generate comprehensive test report with:
- Device information and specifications
- Detailed pass/fail/skip status for each test case
- Error messages and troubleshooting guidance
- Performance metrics and recommendations
Key Features Demonstrated
✅ Structured Skill Organization: Clear directory structure and file naming ✅ Proper Metadata: Standard YAML frontmatter with complete information ✅ Progressive Disclosure: Light metadata, detailed content on demand ✅ Error Handling: Graceful handling of device-specific limitations ✅ Comprehensive Testing: Covers all major uiautomator2-mcp-server capabilities ✅ Self-Documentation: Clear instructions for both learning and execution
Expected Outcomes
For Learning:
- Clear understanding of skill structure and best practices
- Working example of Android UI automation implementation
- Reference for creating similar skills
For Testing:
- ✅ All core functionality tests pass
- ✅ Device operations work reliably
- ✅ UI interactions execute correctly
- ✅ Comprehensive test report generated
Best Practices Highlighted
- Modular Design: Separate concerns into scripts, references, and documentation
- Clear Documentation: Self-explanatory structure and comprehensive guides
- Robust Error Handling: Anticipate and handle common failure scenarios
- Scalable Architecture: Easy to extend with additional test cases
- Cross-Platform Considerations: Handle device manufacturer variations
Extension Points
This skill can be easily extended for:
- Additional device types and manufacturers
- Custom test scenarios and workflows
- Integration with CI/CD pipelines
- Advanced reporting and analytics
- Performance benchmarking
Release Workflow
This skill is also used during the release process to validate uiautomator2-mcp-server functionality:
Pre-Release Testing
Before each release:
- Ensure all 69 unit tests pass
- Run doctor command:
u2mcp doctor -v - Execute Android UI tests on physical device
- Verify all 77 MCP tools are registered
Release Process
The project uses automated CI/CD pipeline:
- Version Tag: Create a PEP 440 compliant tag (e.g.,
v0.3.3) - CI Build: GitHub Actions automatically:
- Runs lint, type check, and tests
- Builds distribution packages
- Publishes to PyPI
- Creates GitHub Release with CHANGELOG notes
- Updates server.json version automatically
- Publishes to MCP Registry
- server.json Update:
# CI automatically does this during release: jq --arg v "0.3.3" '.version = $v | .packages[0].version = $v' server.json > server.json.tmp mv server.json.tmp server.json - MCP Registry Publish:
- Uses GitHub OIDC for authentication
- Validates package ownership via PyPI
- Publishes server.json to official MCP registry
For implementation details, see the accompanying scripts and documentation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

