Execute mobile testing workflow for React Native/Expo apps. Use when running unit tests, component tests, integration tests, or performing manual testing on iOS and Android. Invoked by: "run tests", "test", "testing", "unit tests", "mobile testing".
Version: 1.0.0 Last Updated: 2026-01-11 Status: Active
Systematic testing of React Native mobile app features with comprehensive validation across iOS and Android platforms. Covers unit tests, component tests, integration tests, and manual platform testing.
ALWAYS: Feature validation, bug verification, pre-merge testing, platform-specific testing, regression testing SKIP: Documentation-only changes, config-only changes (unless config affects runtime)
pnpm testpnpm test --coveragepnpm test path/to/test.tspnpm run ios:devpnpm run android:devSee Process Workflow for detailed testing phases.
[Discovery] --> [Planning] --> [Environment Setup] --> [Execution] --> [Issue Resolution] --> [Documentation]
30-60 min 1-2 hrs 15-30 min 2-6 hrs Variable 30-60 min
| Phase | Duration | Deliverable |
|---|---|---|
| 1. Discovery | 30-60 min | Test plan, feature inventory |
| 2. Planning | 1-2 hours | Test plan with test cases |
| 3. Environment Setup | 15-30 min | Running app, test data |
| 4. Execution | 2-6 hours | Test results with findings |
| 5. Issue Resolution | Variable | Code fixes, regression tests |
| 6. Documentation | 30-60 min | Updated docs, committed changes |
Total Duration: 2-8 hours per feature area
src/**/*.test.tspnpm testsrc/**/*.test.tsxpnpm test__tests__/, src/**/*.test.tspnpm testpnpm run ios:dev or pnpm run android:devObjective: Understand current feature state and testing requirements
Locations:
src/components-next/src/screens/src/store/src/navigation/src/types/# Find test files
find . -name "*.test.ts*" -type f
# Review test coverage
pnpm test --coverage
Objective: Create detailed test plan with test cases
Location: docs/ignore/tests/mobile/<FEATURE>_TEST_PLAN.md
Template: TEST_PLAN_TEMPLATE.md
### TC-001: Component Renders Correctly
**Component**: AIChatInterface
**Platform**: Both
**Priority**: High
**Steps**:
1. Render component with props
2. Verify component renders
**Expected**: Component displays correctly
Objective: Prepare clean testing environment
# Install dependencies
pnpm install
# Start Metro bundler
pnpm start
# Start iOS simulator
pnpm run ios:dev
# Start Android emulator
pnpm run android:dev
# Verify environment
npx expo --version
node -v
xcrun simctl list devices
adb devices
Objective: Execute tests systematically and track results
Location: docs/ignore/tests/mobile/<FEATURE>_TEST_RESULTS.md
Template: TEST_RESULTS_TEMPLATE.md
# Run all tests
pnpm test
# Run specific test file
pnpm test path/to/test.ts
# Run tests in watch mode
pnpm test --watch
# Run tests with coverage
pnpm test --coverage
See TEST_GUIDE.md for detailed testing methodology.
Objective: Fix bugs systematically
# Re-run failed test
pnpm test path/to/test.ts
# Re-run all tests
pnpm test
# Re-test on platforms
pnpm run ios:dev
pnpm run android:dev
Objective: Record results and maintain documentation
# Commit code fixes
git add src/
git commit -m "fix: resolve [issue description]"
# Commit test documentation
git add docs/ignore/tests/mobile/
git commit -m "docs: add test results for [FEATURE]"
# Run all tests
pnpm test
# Run with coverage
pnpm test --coverage
# Run specific file
pnpm test path/to/test.ts
# Watch mode
pnpm test --watch
# Type checking
npx tsc --noEmit
# Linting
pnpm run lint
# iOS
pnpm run ios:dev
xcrun simctl list devices
# Android
pnpm run android:dev
adb devices
# Find test files
find . -name "*.test.ts*" -type f
# Find test utilities
find __mocks__ -type f
| Issue | Solution |
|---|---|
| Tests won't run | Clear cache: pnpm test --clearCache, reinstall deps |
| iOS simulator issues | Check Xcode, verify simulator available |
| Android emulator issues | Check Android Studio, verify ADB connection |
| Tests fail intermittently | Reset state between tests, use unique test data |
| TypeScript errors in tests | Check types, run npx tsc --noEmit |
| Platform-specific failures | Test on both platforms, check safe areas |
| Skill | Purpose | When to Use |
|---|---|---|
/dev-feature | Feature workflow | During Phase 6 validation |
/review-code | Code review | Before running tests |
/help | Fix issues | When tests fail |
Note: Skill paths (
/skill-name) work after deployment. In the template repo, skills are in domain folders.
End of SOP