Agent skill
test
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".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/test-eleva-labs-agentic-coding-templ
SKILL.md
Mobile Testing Process SOP
Version: 1.0.0 Last Updated: 2026-01-11 Status: Active
Overview
Purpose
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.
When to Use
ALWAYS: Feature validation, bug verification, pre-merge testing, platform-specific testing, regression testing SKIP: Documentation-only changes, config-only changes (unless config affects runtime)
Quick Start
- Run all tests:
pnpm test - Run with coverage:
pnpm test --coverage - Test specific file:
pnpm test path/to/test.ts - Manual iOS test:
pnpm run ios:dev - Manual Android test:
pnpm run android:dev
See Process Workflow for detailed testing phases.
Process Workflow
Flow Diagram
[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 Summary
| 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
Key Principles
- Systematic Approach - Follow 6 phases, document everything
- Test in Isolation - Independent tests, clean up test data
- Document First - Create test plan before executing
- Platform Coverage - Always test on both iOS and Android
- Quality Over Speed - Test error cases, validate all scenarios
- Mobile-Specific - Consider safe areas, navigation, gestures, performance
Test Types
Unit Tests
- What: Individual functions, utilities, helpers
- Location:
src/**/*.test.ts - Tools: Jest
- Command:
pnpm test
Component Tests
- What: React components in isolation
- Location:
src/**/*.test.tsx - Tools: Jest + React Native Testing Library
- Command:
pnpm test
Integration Tests
- What: Redux state, navigation flows, API integration
- Location:
__tests__/,src/**/*.test.ts - Tools: Jest + Redux mock store
- Command:
pnpm test
Manual Tests
- What: Platform-specific behavior, UI/UX validation
- Platforms: iOS simulators, Android emulators, physical devices
- Command:
pnpm run ios:devorpnpm run android:dev
Phase 1: Discovery
Objective: Understand current feature state and testing requirements
Review Feature Implementation
Locations:
- Components:
src/components-next/ - Screens:
src/screens/ - Redux:
src/store/ - Navigation:
src/navigation/ - Types:
src/types/
Review Existing Tests
# Find test files
find . -name "*.test.ts*" -type f
# Review test coverage
pnpm test --coverage
Identify Test Scenarios
- Happy Path: Normal user flows
- Error Cases: Network errors, validation errors
- Edge Cases: Empty states, boundary values
- Platform-Specific: iOS-only, Android-only behaviors
Phase 2: Planning
Objective: Create detailed test plan with test cases
Create Test Plan
Location: docs/ignore/tests/mobile/<FEATURE>_TEST_PLAN.md
Template: TEST_PLAN_TEMPLATE.md
Test Case Format
### 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
Phase 3: Environment Setup
Objective: Prepare clean testing environment
Commands
# 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
Phase 4: Execution
Objective: Execute tests systematically and track results
Create Results Document
Location: docs/ignore/tests/mobile/<FEATURE>_TEST_RESULTS.md
Template: TEST_RESULTS_TEMPLATE.md
Status Indicators
- Pending
- Pass
- Fail
- In Progress
- Partial
Execute Tests
# 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.
Phase 5: Issue Resolution
Objective: Fix bugs systematically
Debug and Fix
- Locate issue: Search for component, screen, Redux slice
- Understand flow: Component --> Screen --> Redux --> API
- Apply fix: Follow React Native patterns
- Update tests: Add/modify tests for the fix
Re-test
# 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
Phase 6: Documentation
Objective: Record results and maintain documentation
Update Documentation
- Test results document
- Test plan (mark completed)
- Feature documentation (if applicable)
Commit Changes
# 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]"
Quick Reference
Testing Commands
# 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
Platform Testing
# iOS
pnpm run ios:dev
xcrun simctl list devices
# Android
pnpm run android:dev
adb devices
Test File Patterns
# Find test files
find . -name "*.test.ts*" -type f
# Find test utilities
find __mocks__ -type f
Troubleshooting
| 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 |
Related Skills
| 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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?