https://github.com/lynix28/mobileui-appium-wdio-example
Mobile UI Automation Test Project Example with Appium + WebdriverIO
https://github.com/lynix28/mobileui-appium-wdio-example
android-testing appium appium-android appium-ios automated-testing bdd-tests cucumber cucumber-framework ios-testing mobile-testing mocha-framework wdio webdriverio
Last synced: 3 months ago
JSON representation
Mobile UI Automation Test Project Example with Appium + WebdriverIO
- Host: GitHub
- URL: https://github.com/lynix28/mobileui-appium-wdio-example
- Owner: lynix28
- Created: 2023-05-21T21:23:18.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T16:08:52.000Z (almost 2 years ago)
- Last Synced: 2025-02-08T14:13:20.544Z (5 months ago)
- Topics: android-testing, appium, appium-android, appium-ios, automated-testing, bdd-tests, cucumber, cucumber-framework, ios-testing, mobile-testing, mocha-framework, wdio, webdriverio
- Language: JavaScript
- Homepage:
- Size: 36.6 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MobileUI Automation Test Project Example with Appium & WebdriverIO
[](https://dl.circleci.com/status-badge/redirect/gh/lynix28/android-mobileui-appium-wdio-example/tree/master)
[](https://app.saucelabs.com/u/oauth-lynixizunia-7ba4e)Description:
An example project about Mobile automation (Android & iOS) testing using WebdriverIO. The test examples are created in Mocha Framework and Cucumber Framework.
Requirements
- NodeJS
- Appium Server
- Appium Inspector (to find selector)
- Android Studio (for device emulator)
- Xcode (for iOS Simulator)
- Demo App (for testing sample) by Sauce LabsInside the project:
- WebdriverIO Packages
- Mocha and Cucumber as Test Framework
- Allure as Test Reporter
- Appium Server as a service to run the test
- Appium Driver (`uiautomator2` & `xcuitest`)
- `sauce-service` to run the test on Sauce Labs cloud serviceHow to setup:
- Clone the project \
Run `npm install`How to run the test:
Android:
- all the test
- `npm run test-android` \
or
- `npm run test-android-bdd`
- specific spec / test file
- `npm run test-android -- --spec ./to/file/location.js` \
or
- `npm run test-android-bdd -- --spec ./to/file/location.feature`
- specific suite / test suite
- `npm run test-android -- --suite "suiteName"`
- specific test case
- `npm run test-android -- --spec ./to/file/location.js --mochaOpts.grep "testcase name or testing tag"`
- `npm run test-android -- --suite "suiteName" --mochaOpts.grep "testcase name or testing tag"`iOS
- all the test
- `npm run test-ios`
- specific spec / test file
- `npm run test-ios -- --spec ./to/file/location.js`
- specific suite / test suite
- `npm run test-ios -- --suite "suiteName"`
- specific test case
- `npm run test-ios -- --spec ./to/file/location.js --mochaOpts.grep "testcase name or testing tag"`
- `npm run test-ios -- --suite "suiteName" --mochaOpts.grep "testcase name or testing tag"`Common issue might happen:
- Appium doesn't start automatically during the test (in local)
- to solve the issue, just run the Appium server manually and re-run your test.- WDA (web driver agent) is not installed in iOS Simultor when tried to run the test
- to solve the issue, try to run Appium Inspector and access the Simulator, It might take some time for the first time but once the WDA is installed, the test / inspection will run normal.
How the report look like?
Allure Report
use `npm run report` to open the test report
![]()
SauceLabs Build & Test Status
![]()