mobile-testing
Skill157 starsChanged 3 months agoMITView on GitHub
Mobile E2E testing patterns — Flutter integration_test, Patrol, Maestro, golden testing, device matrix, and test data management. Use when writing E2E tests for mobile applications.
- Reads credentials
5 other projects use a version of this.
Adopted by
Most recently taken up by
- mejbaurbahar/faguntheir own version, first seen Jul 5, 2026
- ahmed3elshaer/everything-claude-code-mobiletheir own version, first seen Jun 14, 2026
- BuilderIO/builder-agent-skillstheir own version, first seen May 26, 2026
- ironbee-ai/ironbee-devtools-skillstheir own version, first seen May 16, 2026
- petrkindlmann/qa-skillstheir own version, first seen Mar 23, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- petrkindlmann/qa-skills★ 160same name
- ahmed3elshaer/everything-claude-code-mobile★ 66same name
- BuilderIO/builder-agent-skills★ 16same name
- ironbee-ai/ironbee-devtools-skills★ 3same name
- mejbaurbahar/fagun★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- github-pages/agents.mdAGENTS.md
- adrSkill
- agent-protocolsSkill
- angular-idiomsSkill
- api-documentationSkill
- axum-idiomsSkill
- browser-automationSkill
- chaos-testingSkill
- ci-cdSkill
- cli-developmentSkill
- code-auditSkill
- code-reviewSkill
- cpp-idiomsSkill
- csharp-idiomsSkill
- data-engineeringSkill
- debugging-protocolSkill
- django-idiomsSkill
- dotnet-idiomsSkill
- elixir-idiomsSkill
- embedded-systemsSkill
- feature-flagsSkill
- flutter-idiomsSkill
- frontend-designSkill
- git-commit-integritySkill
- go-idiomsSkill
- guardrailsSkill
- hono-idiomsSkill
- incident-responseSkill
- java-idiomsSkill
- javascript-idiomsSkill
- kotlin-idiomsSkill
- laravel-idiomsSkill
- logging-implementationSkill
- ml-engineeringSkill
- mobile-designSkill
- nextjs-idiomsSkill
- parallel-dispatchSkill
- payment-integrationSkill
- perf-optimizationSkill
- php-idiomsSkill
- postgres-idiomsSkill
- python-idiomsSkill
- rails-idiomsSkill
- react-idiomsSkill
- refactoring-patternsSkill
- research-methodologySkill
- ruby-idiomsSkill
- rust-idiomsSkill
- security-auditSkill
- sequential-thinkingSkill
- spring-boot-idiomsSkill
- sql-idiomsSkill
- structured-specSkill
- supply-chain-securitySkill
- swift-idiomsSkill
- testability-patternsSkill
- testing-strategySkill
- typescript-idiomsSkill
- vue-idiomsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 14 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 54
Call backend API to create test state before tests run:
- Distinctive: line 55
Create test users with specific roles/permissions
- Very specific: line 59
Pattern: Create a TestApi helper class that wraps seeding endpoints.
- Very specific: line 63
Use setUp()/tearDown() (or framework equivalent) to automate reset
- Distinctive: line 64
Never rely on test execution order
- Distinctive: line 67
Use build-time environment variables to switch between local and staging backends
- Distinctive: line 68
Keep test API keys separate from production keys
- Distinctive: line 72
Create factory functions for common test data (test users, orders, products)
- Distinctive: line 73
Prefer deterministic data over random — random data makes failures hard to reproduce
- Distinctive: line 74
Use unique identifiers per test run to avoid cross-test contamination
- Distinctive: line 89
P0 tests: Run on medium phone (most common) — minimum viable matrix
- Distinctive: line 90
P1 tests: Add small phone + tablet — catch responsive layout breakpoints
- Distinctive: line 91
P2 tests: Add foldable + landscape orientation — catch edge layout issues
- Distinctive: line 92
Platform differences: Test on both iOS and Android when behavior diverges (navigation style, permissions UX, keyboard behavior)
- Distinctive: line 95
Test portrait (default) and landscape for screens that should support rotation
- Distinctive: line 96
Verify layout adapts correctly — no overflow, no clipped content
- Very specific: line 112
Patrol native interactions: Use $.native.disableWifi() / $.native.enableWifi() for real airplane mode testing on physical devices or …
- Very specific: line 113
Android emulator flags: Use -netdelay and -netspeed flags for slow network simulation
- Very specific: line 123
Artifact collection: Always upload screenshots and device logs on failure (actions/upload-artifact).
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mobile Testing
Overview
Load this skill when writing E2E or integration tests for mobile applications (Flutter, React Native, or native iOS/Android). This skill complements the browser-automation skill which covers web — this skill covers native mobile.
Framework references: This file covers patterns and strategies. For framework-specific setup, API, and code examples, see:
- Flutter (integration_test, Patrol, Golden Testing)
- Maestro (cross-platform YAML flows)
Screen Object Model
The mobile equivalent of Page Object Model. Encapsulates screen-specific finders, interactions, and assertions in reusable classes.
Principles
- One class per screen — mirrors the app's navigation structure
- Encapsulate finders — expose semantic methods, not raw selectors
- Compose flows — tests chain screen objects into user journeys
- Assert at the screen level — each screen knows its own success/error states
Structure
integration_test/
screens/
login_screen.dart # Finders + interactions for login
home_screen.dart # Finders + interactions for home
checkout_screen.dart # Finders + interactions for checkout
flows/
purchase_flow_test.dart # Composes screen objects into journeyPattern (language-agnostic)
Each screen object exposes:
- Finders — locators for key UI elements (by key, type, text, accessibility ID)
- Interactions — methods for user actions (
enterEmail(),tapLogin(),scrollToItem()) - Composed actions — higher-level methods combining multiple interactions (
loginAs(email, password)) - Assertions — methods to verify screen state (
assertErrorVisible(),assertWelcomeShown())
For framework-specific implementations, see the references:
- Flutter/Patrol: See flutter.md § Screen Object Model
- Maestro: Uses YAML sub-flows rather than code classes — see maestro.md
Test Data Management
API Seeding
Call backend API to create test state before tests run:
- Create test users with specific roles/permissions
- Seed catalog/inventory data
- Set up payment test scenarios (test cards, etc.)
Pattern: Create a TestApi helper class that wraps seeding endpoints. Inject the base URL via environment configuration.
State Reset
- Reset between tests to ensure isolation — call a cleanup endpoint or use database rollback
- Use
setUp()/tearDown()(or framework equivalent) to automate reset - Never rely on test execution order
Environment Configuration
- Use build-time environment variables to switch between local and staging backends
- Keep test API keys separate from production keys
- Example:
BASE_URLandAPI_KEYinjected via--dart-define(Flutter) or.env(React Native)
Test Fixtures
- Create factory functions for common test data (test users, orders, products)
- Prefer deterministic data over random — random data makes failures hard to reproduce
- Use unique identifiers per test run to avoid cross-test contamination
Device Matrix Testing
Screen Sizes to Cover
| Category | Example | Resolution |
| Small phone | iPhone SE | 375×667 |
| Medium phone | iPhone 14 | 390×844 |
| Large phone | iPhone 14 Pro Max | 430×932 |
| Tablet | iPad Air | 820×1180 |
| Foldable | Galaxy Fold (open) | 717×512 |
Testing Strategy
- P0 tests: Run on medium phone (most common) — minimum viable matrix
- P1 tests: Add small phone + tablet — catch responsive layout breakpoints
- P2 tests: Add foldable + landscape orientation — catch edge layout issues
- Platform differences: Test on both iOS and Android when behavior diverges (navigation style, permissions UX, keyboard behavior)
Orientation Testing
- Test portrait (default) and landscape for screens that should support rotation
- Verify layout adapts correctly — no overflow, no clipped content
- Some screens should lock orientation — verify rotation is ignored
For framework-specific size simulation APIs, see the Flutter reference.
Offline & Network Testing
Patterns to Test
- Offline detection — app shows offline banner or indicator
- Offline-first operations — user can perform actions that queue locally
- Reconnection sync — queued operations sync when connection restores
- Graceful degradation — app disables features requiring network with clear UX
- Slow network — loading states appear, no premature timeouts, no duplicate submissions
Testing Approach
- Mock HTTP client: Inject a client that throws network errors — test offline UI states without device manipulation
- Patrol native interactions: Use
$.native.disableWifi()/$.native.enableWifi()for real airplane mode testing on physical devices or emulators - Android emulator flags: Use
-netdelayand-netspeedflags for slow network simulation
For code examples, see the Flutter reference.
CI Configuration
Key Considerations
- Android emulator in CI: Requires KVM hardware acceleration on Linux runners. Use
reactivecircus/android-emulator-runnerGitHub Action. - iOS simulator in CI: Requires macOS runners. Create and boot simulator via
xcrun simctl. - Parallel execution: Split test files across CI matrix jobs for faster runs.
- Artifact collection: Always upload screenshots and device logs on failure (
actions/upload-artifact). - Golden tests: Generate golden files locally, commit to repo, compare in CI. Set tolerance for cross-platform rendering differences.
For CI workflow YAML examples, see the Flutter reference § CI Configuration.
Framework Selection Guide
| Stack | Recommended Framework | Native Interactions | Visual Regression |
| Flutter | integration_test + Patrol | Patrol | golden_toolkit |
| React Native | Detox or Maestro | Maestro | Screenshot comparison |
| Native iOS | XCUITest or Maestro | XCUITest / Maestro | Snapshot testing |
| Native Android | Espresso or Maestro | Espresso / Maestro | Screenshot testing |
| Cross-platform | Maestro | Maestro | Maestro screenshots |
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.

