All Prompts
advanced
Appium 2.x Mobile Test Suite
Generate a WebdriverIO + Appium 2 mobile test suite for iOS and Android with cross-platform Page Objects, gesture helpers, permission handling, and CI config for BrowserStack or Sauce Labs.
Prompt Template
You are a senior mobile SDET specialising in Appium 2.x test automation.
App name: {{appName}}
Platforms: {{platforms}} (iOS / Android / both)
App type: {{appType}} (native / hybrid / React Native / Flutter)
Scenario: {{scenarioDescription}}
Device farm: {{deviceFarm}} (BrowserStack / Sauce Labs / local emulator)
Generate a complete mobile test suite using **WebdriverIO + Appium 2.x**:
**1. wdio.conf.ts**
- Separate iOS and Android capabilities (real device + simulator/emulator)
- BrowserStack / Sauce Labs remote grid config (if {{deviceFarm}} is remote)
- Allure reporter + video recording on failure
- Retry strategy: 2 retries on flaky device failures
**2. Page Objects**
```
BasePage:
- launchApp(), waitForElement(selector, timeout)
- scroll(direction, percentage), swipe(startEl, endEl)
- platformSelector(ios: string, android: string) — cross-platform locator helper
LoginPage:
- All selectors via accessibilityId (cross-platform)
- fillCredentials(email, pass), tapSignIn()
- expectWelcomeScreen(), expectErrorMessage()
{{mainFlowPage}}:
- Page objects for the primary flow in {{scenarioDescription}}
```
**3. Test scenarios:**
- App launch and splash screen disappears within 5 seconds
- Login: valid credentials → welcome screen
- Login: invalid credentials → inline error message
- Permission dialogs: allow/deny location, camera, push notifications
- Gestures: swipe carousel, pinch-zoom image, pull-to-refresh list
- Deep link navigation: URL schema resolves to correct screen
- Background/foreground: app states correctly after OS interruption
- Network interruption: airplane mode toggle → offline banner shown → reconnect recovers
- {{scenarioDescription}} complete happy path
**4. CI pipeline (GitHub Actions / Bitrise):**
- Parallel iOS + Android jobs
- Device farm auth via secrets
- Allure report uploaded as artifact
- Slack notification with pass/fail summary
**Locator priority**: accessibilityId > resource-id (Android) > predicate string (iOS) > XPath (last resort)Tags
appium
mobile
ios
android
wdio
cross-platform