Mobile app test automation for iOS and Android
Generates automated mobile app tests for iOS and Android using Appium, Detox, XCUITest, and Espresso.
/plugin marketplace add jeremylongshore/claude-code-plugins-plus/plugin install mobile-app-tester@claude-code-plugins-plusAutomated testing for mobile applications using Appium, Detox, XCUITest (iOS), and Espresso (Android) with support for simulators, emulators, and real devices.
Generate Mobile Tests
Device Configuration
Mobile-Specific Testing
Performance Testing
When invoked, you should:
## Mobile App Test Suite
### Platform: [iOS / Android / Both]
**Framework:** [Detox / Appium / XCUITest / Espresso]
**Test Cases:** [N]
### Device Configuration
\`\`\`yaml
# .detoxrc.js
devices: {
simulator: {
type: 'ios.simulator',
device: { type: 'iPhone 15 Pro' }
},
emulator: {
type: 'android.emulator',
device: { avdName: 'Pixel_7_API_34' }
}
}
\`\`\`
### Test Implementation
\`\`\`javascript
describe('Login Flow', () => {
beforeAll(async () => {
await device.launchApp();
});
it('should login successfully', async () => {
// Wait for login screen
await expect(element(by.id('loginScreen'))).toBeVisible();
// Enter credentials
await element(by.id('emailInput')).typeText('[email protected]');
await element(by.id('passwordInput')).typeText('password123');
// Tap login button
await element(by.id('loginButton')).tap();
// Verify navigation to home
await expect(element(by.id('homeScreen'))).toBeVisible();
await expect(element(by.text('Welcome'))).toBeVisible();
});
it('should handle gestures', async () => {
// Swipe gesture
await element(by.id('scrollView')).swipe('up', 'fast');
// Long press
await element(by.id('menuItem')).longPress();
// Multi-touch
await element(by.id('map')).pinch(1.5); // zoom in
});
it('should handle permissions', async () => {
await element(by.id('requestLocation')).tap();
// Handle iOS permission alert
if (device.getPlatform() === 'ios') {
await expect(element(by.label('Allow'))).toBeVisible();
await element(by.label('Allow While Using App')).tap();
}
});
});
\`\`\`
### Platform-Specific Tests
#### iOS-Specific
\`\`\`javascript
// XCUITest
it('should handle iOS-specific features', async () => {
// Test Face ID
await element(by.id('faceIdButton')).tap();
await device.matchFace();
// Test 3D Touch
await element(by.id('homeIcon')).forceTouchAndSwipe('up');
});
\`\`\`
#### Android-Specific
\`\`\`javascript
// Espresso
it('should handle Android-specific features', async () => {
// Test back button
await device.pressBack();
// Test app switching
await device.sendToHome();
await device.launchApp();
});
\`\`\`
### Performance Tests
\`\`\`javascript
it('should launch within 2 seconds', async () => {
const start = Date.now();
await device.launchApp();
const launchTime = Date.now() - start;
expect(launchTime).toBeLessThan(2000);
});
\`\`\`
### Test Execution
\`\`\`bash
# iOS Simulator
detox test --configuration ios.sim.debug
# Android Emulator
detox test --configuration android.emu.debug
# Real Device
detox test --configuration ios.device
# With screenshots
detox test --take-screenshots all
# With video recording
detox test --record-videos all
\`\`\`
### Device Farm Integration
\`\`\`yaml
# AWS Device Farm
- Platform: iOS 17, Android 14
- Devices: iPhone 15, Pixel 7, Samsung S23
- Test Package: [uploaded]
- Results: [URL]
\`\`\`
### Next Steps
- [ ] Run tests on simulators
- [ ] Test on real devices
- [ ] Add screenshot assertions
- [ ] Set up CI/CD mobile testing
- [ ] Test offline scenarios