Skip to main content
QA Training
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

How to use this prompt

  1. 1Copy the prompt template using the Copy button above.
  2. 2Open your preferred AI assistant (ChatGPT, Claude, Gemini, Copilot, etc.).
  3. 3Paste the prompt and replace the {{placeholder}} variables with your project-specific values.
  4. 4Review the output - treat it as a professional first draft, not a final deliverable.
  5. 5Iterate: refine the output by asking follow-up questions or providing more context.

Frequently asked questions

Which AI models work best with this prompt?v

This prompt works with any capable language model including ChatGPT (GPT-4o), Claude (3.5+), Gemini (1.5 Pro+), and GitHub Copilot Chat. More capable models produce more complete and accurate outputs.

How do I adapt the prompt for a different framework?v

Replace the framework placeholder with your target framework and update any framework-specific syntax references in the output. The structure and logic of the generated tests will transfer across frameworks.

Can I use this prompt commercially?v

Yes. All prompts on QATraining.uk are free to use for personal and commercial QA work. Attribution is appreciated but not required.