Overview
E2E tests run on real devices or simulators, simulating user interactions:| Framework | Ease of Setup | Best For | Supported Platforms |
|---|---|---|---|
| Maestro | Easy | Quick tests, visual validation | iOS, Android |
| Detox | Moderate | React Native apps, complex flows | iOS, Android |
| Appium | Complex | Cross-platform, existing infrastructure | iOS, Android, Web |
Maestro
Maestro is a simple, powerful E2E testing framework ideal for Expo apps.Installation
Writing Tests
Maestro Commands
Navigation
Input
Assertions
Waiting
Advanced Features
Deep Links
Environment Variables
Screenshots
JavaScript Functions
scripts/login.js
Maestro Studio
Interactive test creation:Detox
Gray-box testing framework synchronized with React Native.Setup
Detox API
Matchers
Actions
Assertions
Appium
Cross-platform testing with WebDriver protocol.Setup
Writing Tests
e2e/login.test.ts
Test Structure
Page Object Pattern
e2e/pages/LoginPage.ts
e2e/tests/login.test.ts
CI/CD Integration
GitHub Actions (Maestro)
.github/workflows/e2e.yml
EAS Build with E2E Tests
eas.json
Best Practices
1. Use Accessibility IDs
2. Wait for Elements
3. Independent Tests
4. Test Critical Paths
Focus on user-critical workflows:- Authentication
- Core features
- Purchase flows
- Data submission
Next Steps
Unit Testing
Complement E2E with unit tests
Testing Router
Test Expo Router navigation
Debugging
Debug test failures
CI/CD
Automate E2E tests