원클릭으로
mobile-testing
Executes automated tests on mobile apps via MCP. Use when testing iOS/Android apps, verifying UI states, automating interactions, or performing end-to-end validation. Not for web testing, API validation, or desktop applications.
메뉴
Executes automated tests on mobile apps via MCP. Use when testing iOS/Android apps, verifying UI states, automating interactions, or performing end-to-end validation. Not for web testing, API validation, or desktop applications.
Teaches Flutter MCP + Dart MCP best practices for vibe coding. Use when developing Flutter apps, running tests, debugging, or need hot reload/restart. Not for backend-only TypeScript/Node.js projects.
Runs, debugs, and fixes Flutter tests including unit tests, widget tests, and Patrol E2E tests. Use when tests fail, need updating after code changes, or when creating new tests. Not for general code debugging or feature implementation.
| name | mobile-testing |
| description | Executes automated tests on mobile apps via MCP. Use when testing iOS/Android apps, verifying UI states, automating interactions, or performing end-to-end validation. Not for web testing, API validation, or desktop applications. |
| metadata | {"mcp-server":"mobile-mcp","version":"1.0.0","author":"PharmaScan","category":"testing"} |
This skill provides structured workflows for testing mobile applications using the mobile-mcp server. All operations require device selection as the first step.
BEFORE any mobile interaction, you MUST:
mcp__mobile-mcp__mobile_list_available_devicesmcp__mobile-mcp__mobile_get_screen_size--# Step 1: Select Device
Call mcp__mobile-mcp__mobile_list_available_devices to get available devices.
If multiple devices returned:
If only one device:
--# Step 2: Verify Device State
Call mcp__mobile-mcp__mobile_get_screen_size to confirm device is responsive.
Example response includes screen dimensions for coordinate calculations.
--# Step 3: Prepare Application State
For testing an app:
If app needs to be installed first:
mcp__mobile-mcp__mobile_install_app(
device: deviceId,
path: "/path/to/app.ipa" // iOS
// or
path: "/path/to/app.apk" // Android
)
If app needs to be launched:
mcp__mobile-mcp__mobile_launch_app(
device: deviceId,
packageName: "com.example.app"
)
If app is already running:
mcp__mobile-mcp__mobile_terminate_app(
device: deviceId,
packageName: "com.example.app"
)
// Then re-launch for clean state
--# Step 4: Perform Interactions
To click an element:
1. Call mcp__mobile-mcp__mobile_list_elements_on_screen(device: deviceId)
2. Identify target element coordinates from response
3. Call mcp__mobile-mcp__mobile_click_on_screen_at_coordinates(device: deviceId, x: x, y: y)
To type text:
mcp__mobile-mcp__mobile_type_keys(
device: deviceId,
text: "input text",
submit: true // or false if not submitting
)
To swipe/navigate:
mcp__mobile-mcp__mobile_swipe_on_screen(
device: deviceId,
direction: "up" | "down" | "left" | "right",
distance: 400 // optional, uses defaults if omitted
)
To verify state:
mcp__mobile-mcp__mobile_take_screenshot(device: deviceId)
// or
mcp__mobile-mcp__mobile_list_elements_on_screen(device: deviceId)
--# Step 5: Verify Results
CRITICAL: ALWAYS verify outcomes after interactions.
mcp__mobile-mcp__mobile_take_screenshot to capture current statemcp__mobile-mcp__mobile_list_elements_on_screen to verify expected elements existALWAYS follow this sequence:
mcp__mobile-mcp__mobile_list_elements_on_screen → get coordinatesmcp__mobile-mcp__mobile_click_on_screen_at_coordinates → perform clickmcp__mobile-mcp__mobile_take_screenshot → verify changeNEVER click without first identifying the element.
When swiping:
direction must be: up, down, left, or rightdistance defaults: 400px (iOS) or 30% screen (Android)After swiping:
Before typing:
When typing:
submit: true to send Enter keysubmit: false for partial inputNote: Typing requires focused element. If typing fails, click the element first.
To change orientation:
mcp__mobile-mcp__mobile_set_orientation(
device: deviceId,
orientation: "portrait" | "landscape"
)
When orientation matters:
mcp__mobile-mcp__mobile_get_orientation before critical operations--# Element Not Found
Symptom: mcp__mobile-mcp__mobile_list_elements_on_screen returns empty or unexpected elements.
Diagnosis:
Recovery:
// 1. Take screenshot to debug
mcp__mobile-mcp__mobile_take_screenshot(device: deviceId)
// 2. Try swiping to navigate
mcp__mobile-mcp__mobile_swipe_on_screen(device: deviceId, direction: "up")
// 3. Re-launch app for clean state
mcp__mobile-mcp__mobile_terminate_app(device: deviceId, packageName: package)
mcp__mobile-mcp__mobile_launch_app(device: deviceId, packageName: package)
--# Click Fails
Symptom: Click action completes but nothing happens.
Diagnosis:
Recovery:
// 1. Re-list elements (coordinates may have changed)
mcp__mobile-mcp__mobile_list_elements_on_screen(device: deviceId)
// 2. Try double-tap
mcp__mobile-mcp__mobile_double_tap_on_screen(device: deviceId, x: x, y: y)
// 3. Try long-press
mcp__mobile-mcp__mobile_long_press_on_screen_at_coordinates(device: deviceId, x: x, y: y)
--# Typing Fails
Symptom: Text not appearing or error on type.
Diagnosis:
Recovery:
// 1. Click to focus first
mcp__mobile-mcp__mobile_click_on_screen_at_coordinates(device: deviceId, x: x, y: y)
// 2. Type without submit
mcp__mobile-mcp__mobile_type_keys(device: deviceId, text: "text", submit: false)
// 3. Submit separately if needed
mcp__mobile-mcp__mobile_press_button(device: deviceId, button: "ENTER")
--# App Crashes
Symptom: App becomes unresponsive after interaction.
Recovery:
// 1. Terminate and re-launch
mcp__mobile-mcp__mobile_terminate_app(device: deviceId, packageName: package)
mcp__mobile-mcp__mobile_launch_app(device: deviceId, packageName: package)
// 2. If persists, take screenshot for debugging
mcp__mobile-mcp__mobile_take_screenshot(device: deviceId)
// 3. Report to user with device state
mcp__mobile-mcp__mobile_list_available_devices()
// Returns: array of {id, name, type, ...}
For single device: Use directly.
For multiple devices:
Ask user: "Which device should I use? [1] iPhone 15, [2] Android Emulator"
Store selection and use that deviceId
mcp__mobile-mcp__mobile_get_screen_size(device: deviceId)
// Returns: {width, height}
mcp__mobile-mcp__mobile_get_orientation(device: deviceId)
// Returns: {orientation: "portrait" | "landscape"}
| Operation | Tool | Parameters |
|---|---|---|
| List apps | mcp__mobile-mcp__mobile_list_apps | device |
| Launch app | mcp__mobile-mcp__mobile_launch_app | device, packageName |
| Terminate app | mcp__mobile-mcp__mobile_terminate_app | device, packageName |
| Install app | mcp__mobile-mcp__mobile_install_app | device, path |
| Uninstall app | mcp__mobile-mcp__mobile_uninstall_app | device, bundle_id |
DO:
DON'T:
device parametermobile_save_screenshot to persist