mobile-testing
# Mobile Testing Skill
What this skill does
# Mobile Testing Skill Reference for manual QA testing of KMP Compose Multiplatform apps using MCP mobile automation tools. ## Quick Reference: MCP Tools | Tool | Purpose | When to Use | |------|---------|-------------| | `list_devices` | Find emulators/devices | Start of test | | `set_device` | Select target device | Multi-device testing | | `launch_app` | Start application | Begin test session | | `screenshot` | Capture screen state | Visual verification | | `get_ui` | Get UI hierarchy | Element discovery | | `tap` | Click on element | Button clicks, navigation | | `swipe` | Scroll/gesture | Lists, carousels | | `input_text` | Type text | Form fields | | `press_key` | Hardware keys | BACK, HOME, ENTER | | `get_logs` | Read device logs | Error detection | | `shell` | Execute commands | Advanced debugging | ## Testing Environments ### Android Emulator (Fastest) ``` Device: emulator-5554 Package: com.your-project.admin Use: Daily development testing Setup: Android Studio -> AVD Manager ``` ### iOS Simulator (macOS) ``` Device: iPhone 15 Simulator Bundle ID: com.your-project.admin Use: iOS-specific testing Setup: Xcode -> Simulators ``` ### Physical Devices (Final) ``` Android: USB debugging enabled iOS: Developer mode enabled Use: Final validation, performance testing ``` ### Desktop (JVM) ``` Run: ./gradlew :composeApp:run Platforms: macOS, Windows, Linux Use: Desktop-specific features ``` ## Standard Test Workflow ### 1. Setup ``` list_devices(platform: "android") # Find devices set_device(deviceId: "emulator-5554") # Select device clear_logs() # Clear log buffer launch_app(package: "com.your-project.admin") wait(ms: 2000) # Wait for launch screenshot() # Verify initial state ``` ### 2. UI Interaction ``` get_ui() # Discover elements tap(text: "Settings") # Navigate wait(ms: 500) screenshot() # Verify transition ``` ### 3. Form Input ``` tap(text: "Search") # Focus field input_text(text: "test query") # Type text press_key(key: "ENTER") # Submit wait(ms: 1000) screenshot() ``` ### 4. Log Verification ``` get_logs(package: "com.your-project.admin", level: "E") # Check for: crashes, exceptions, errors ``` ### 5. State Inspection ``` get_current_activity() # Verify screen get_system_info() # Check resources ``` ## MCP Tool Details ### Device Management #### list_devices ``` list_devices() # All devices list_devices(platform: "android") # Android only list_devices(platform: "ios") # iOS only ``` #### set_device ``` set_device(deviceId: "emulator-5554") set_device(deviceId: "iPhone 15") ``` #### get_system_info ``` get_system_info() # Returns: battery level, memory usage (Android) ``` ### App Control #### launch_app ``` launch_app(package: "com.your-project.admin") # Android launch_app(package: "com.your-project.admin") # iOS (bundle ID) ``` #### stop_app ``` stop_app(package: "com.your-project.admin") # Force stop ``` #### install_app ``` install_app(path: "/path/to/app.apk") # Android install_app(path: "/path/to/App.app") # iOS Simulator ``` #### get_current_activity ``` get_current_activity() # Android only # Returns: current package/activity ``` ### UI Interaction #### screenshot ``` screenshot() # Default quality screenshot(quality: 90) # Higher quality screenshot(maxWidth: 400, maxHeight: 800) # Smaller size ``` #### get_ui ``` get_ui() # Interactive elements get_ui(showAll: true) # All elements # Returns: UI hierarchy with element refs ``` #### tap ``` tap(x: 200, y: 400) # By coordinates tap(text: "Settings") # By text (Android) tap(index: 5) # By index (Android) tap(resourceId: "btn_save") # By ID (Android) ``` #### long_press ``` long_press(x: 200, y: 400) # Default 1000ms long_press(x: 200, y: 400, duration: 2000) # Custom duration long_press(text: "Item") # By text (Android) ``` #### swipe ``` swipe(direction: "up") # Scroll down swipe(direction: "down") # Scroll up swipe(direction: "left") # Next page swipe(direction: "right") # Previous page swipe(x1: 200, y1: 800, x2: 200, y2: 200) # Custom swipe swipe(x1: 200, y1: 400, x2: 200, y2: 400, duration: 500) # Slow swipe ``` #### input_text ``` input_text(text: "Hello World") # Type into focused field ``` #### press_key ``` press_key(key: "BACK") # Hardware back press_key(key: "HOME") # Home button press_key(key: "ENTER") # Enter/Return press_key(key: "TAB") # Tab key press_key(key: "DELETE") # Delete/Backspace press_key(key: "VOLUME_UP") # Volume up press_key(key: "VOLUME_DOWN") # Volume down ``` #### find_element ``` find_element(text: "Settings") # Android only find_element(resourceId: "btn_save") # Android only find_element(className: "Button") # Android only find_element(clickable: true) # Filter by state ``` ### Verification #### get_logs ``` get_logs() # Last 100 lines get_logs(lines: 200) # More lines get_logs(package: "com.your-project.admin") # Filter by app get_logs(level: "E") # Errors only get_logs(tag: "NetworkClient") # Android: by tag # Log levels (Android): V, D, I, W, E, F # Log levels (iOS): debug, info, default, error, fault ``` #### clear_logs ``` clear_logs() # Android only ``` #### shell ``` # Android (ADB shell) shell(command: "dumpsys activity activities") # Current activities shell(command: "pm list packages") # Installed packages shell(command: "svc wifi disable") # Disable WiFi shell(command: "svc wifi enable") # Enable WiFi shell(command: "input keyevent 26") # Power button # iOS (simctl) shell(command: "status_bar override --time '9:41'") shell(command: "privacy grant all com.your-project.admin") ``` ### Utilities #### wait ``` wait(ms: 1000) # Wait 1 second wait(ms: 500) # Wait 500ms ``` #### open_url ``` open_url(url: "https://your-project.ru") # Open in browser ``` ## Log Error Patterns ### Critical Errors (Must Fix) ``` FATAL EXCEPTION -> App crash ANR in com.your-project.admin -> App not responding java.lang.NullPointerException -> Null reference crash java.lang.OutOfMemoryError -> Memory issue Process: com.your-project.admin, PID... -> Crash with stack trace ``` ### Common Errors (Review) ``` NetworkError -> API call failed SocketTimeoutException -> Network timeout UnknownHostException -> No network/DNS issue SSLHandshakeException -> Certificate issue JsonParseException -> Malformed response ``` ### Compose/KMP Specific ``` IllegalStateException: Expected -> State mismatch Composition failed -> UI rendering error Recomposition loop -> Infinite recomposition Navigation error -> Decompose issue ``` ## Test Scenarios ### Scenario: App Launch 1. `clear_logs()` 2. `launch_app(package: "com.your-project.admin")` 3. `wait(ms: 3000)` 4. `screens
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.