
Mobile App Testing
Plan and implement iOS and Android test coverage—unit, UI, integration, and performance—with Detox, Appium, and XCTest before shipping mobile builds.
Overview
Mobile-app-testing is an agent skill for the Ship phase that guides comprehensive iOS and Android testing—unit, UI, integration, and performance—with Detox, Appium, and XCTest.
Install
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill mobile-app-testingWhat is this skill?
- Covers unit, UI, integration, and performance testing for iOS and Android
- Documents automation with Detox, Appium, and XCTest
- Includes Jest-style unit examples and React Native component testing patterns
- Frames regression testing before releases and backend integration checks
- Structured TOC: overview, when to use, quick start, reference guides, best practices
- Covers four test layers: unit, UI, integration, and performance
- Names three automation frameworks: Detox, Appium, and XCTest
Adoption & trust: 655 installs on skills.sh; 250 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your mobile app ships with manual tap-testing only and you lack a structured automation plan across iOS and Android.
Who is it for?
Solo builders shipping React Native or native mobile apps who need a concrete testing stack before beta or store submission.
Skip if: Web-only SaaS projects, backend-only APIs with no mobile client, or greenfield ideas with no runnable app binary yet.
When should I use this skill?
Creating reliable mobile applications with test coverage, automating UI across iOS and Android, performance testing, integration with backends, or regression before releases.
What do I get? / Deliverables
You leave with layered test examples, framework choices, and best practices so releases include automated regression and integration coverage.
- Unit and component test suites aligned to app modules
- UI/integration test plan with chosen framework (Detox, Appium, or XCTest)
Recommended Skills
Journey fit
Canonical shelf is Ship/testing because the skill encodes pre-release verification and automation patterns for mobile apps. Testing subphase matches regression, UI automation, and performance checks explicitly called out for release readiness.
How it compares
A mobile-focused testing playbook—not a generic unit-test snippet or production error-monitoring runbook.
Common Questions / FAQ
Who is mobile-app-testing for?
Indie iOS and Android developers who want Detox, Appium, XCTest, and Jest-oriented patterns in one agent-guided testing strategy.
When should I use mobile-app-testing?
Use it in Ship (testing) while adding coverage before release; it also supports Grow (lifecycle) when regression suites protect frequent updates.
Is mobile-app-testing safe to install?
It is primarily procedural documentation—review the Security Audits panel on this Prism page and validate any generated test code before running in CI.
SKILL.md
READMESKILL.md - Mobile App Testing
# Mobile App Testing ## Table of Contents - [Overview](#overview) - [When to Use](#when-to-use) - [Quick Start](#quick-start) - [Reference Guides](#reference-guides) - [Best Practices](#best-practices) ## Overview Implement comprehensive testing strategies for mobile applications including unit tests, UI tests, integration tests, and performance testing. ## When to Use - Creating reliable mobile applications with test coverage - Automating UI testing across iOS and Android - Performance testing and optimization - Integration testing with backend services - Regression testing before releases ## Quick Start Minimal working example: ```javascript // Unit test with Jest import { calculate } from "../utils/math"; describe("Math utilities", () => { test("should add two numbers", () => { expect(calculate.add(2, 3)).toBe(5); }); test("should handle negative numbers", () => { expect(calculate.add(-2, 3)).toBe(1); }); }); // Component unit test import React from "react"; import { render, screen } from "@testing-library/react-native"; import { UserProfile } from "../components/UserProfile"; describe("UserProfile Component", () => { test("renders user name correctly", () => { const mockUser = { id: "1", name: "John Doe", email: "john@example.com" }; render(<UserProfile user={mockUser} />); expect(screen.getByText("John Doe")).toBeTruthy(); }); // ... (see reference guides for full implementation) ``` ## Reference Guides Detailed implementations in the `references/` directory: | Guide | Contents | |---|---| | [React Native Testing with Jest & Detox](references/react-native-testing-with-jest-detox.md) | React Native Testing with Jest & Detox | | [iOS Testing with XCTest](references/ios-testing-with-xctest.md) | iOS Testing with XCTest | | [Android Testing with Espresso](references/android-testing-with-espresso.md) | Android Testing with Espresso | | [Performance Testing](references/performance-testing.md) | Performance Testing | ## Best Practices ### ✅ DO - Write tests for business logic first - Use dependency injection for testability - Mock external API calls - Test both success and failure paths - Automate UI testing for critical flows - Run tests on real devices - Measure performance on target devices - Keep tests isolated and independent - Use meaningful test names - Maintain >80% code coverage ### ❌ DON'T - Skip testing UI-critical flows - Use hardcoded test data - Ignore performance regressions - Test implementation details - Make tests flaky or unreliable - Skip testing on actual devices - Ignore accessibility testing - Create interdependent tests - Test without mocking APIs - Deploy untested code # Android Testing with Espresso ## Android Testing with Espresso ```kotlin @RunWith(AndroidJUnit4::class) class UserViewModelTest { private lateinit var viewModel: UserViewModel private val mockApiService = mock<ApiService>() @Before fun setUp() { viewModel = UserViewModel(mockApiService) } @Test fun fetchUserSuccess() = runTest { val expectedUser = User("1", "John", "john@example.com") `when`(mockApiService.getUser("1")).thenReturn(expectedUser) viewModel.fetchUser("1") assertEquals(expectedUser.name, viewModel.user.value?.name) assertEquals(null, viewModel.errorMessage.value) } @Test fun fetchUserFailure() = runTest { `when`(mockApiService.getUser("1")) .thenThrow(IOException("Network error")) viewModel.fetchUser("1") assertEquals(null, viewModel.user.value) assertNotNull(viewModel.errorMessage.value) } } // UI Test with Espresso @RunWith(AndroidJUnit4::class) class LoginActivityTest { @get:Rule val activityRule = ActivityScenarioRule(LoginActivity::class.java) @