An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# MobileUI Automation Test Project Example with Appium & WebdriverIO
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/lynix28/mobileui-appium-wdio-example/tree/master.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/lynix28/android-mobileui-appium-wdio-example/tree/master)
[![SauceLabs](https://img.shields.io/badge/integrated%20to-SauceLabs-red)](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 Labs

Inside 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 service

How 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

image

SauceLabs Build & Test Status


image