https://github.com/lynix28/ios-mobileui-appium-wdio-example
iOS Mobile UI Automation Test Project Example with Appium + WebdriverIO
https://github.com/lynix28/ios-mobileui-appium-wdio-example
appium appium-ios automated-testing ios-testing mobile-testing mocha-framework wdio webdriverio
Last synced: about 1 year ago
JSON representation
iOS Mobile UI Automation Test Project Example with Appium + WebdriverIO
- Host: GitHub
- URL: https://github.com/lynix28/ios-mobileui-appium-wdio-example
- Owner: lynix28
- Created: 2023-05-28T16:58:05.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-22T09:44:31.000Z (almost 3 years ago)
- Last Synced: 2025-02-08T14:13:20.834Z (over 1 year ago)
- Topics: appium, appium-ios, automated-testing, ios-testing, mobile-testing, mocha-framework, wdio, webdriverio
- Language: JavaScript
- Homepage:
- Size: 6.29 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [MERGED TO OTHER PROJECT]
# iOS MobileUI Automation Test Project Example with Appium & WebdriverIO
[](https://dl.circleci.com/status-badge/redirect/gh/lynix28/ios-mobileui-appium-wdio-example/tree/master)
[](https://app.saucelabs.com/u/oauth-lynixizunia-7ba4e)
---
This project example is merged to: https://github.com/lynix28/mobileui-appium-wdio-example
For further update check on the new repo
---
Requirements
- NodeJS
- Appium Server
- Appium Inspector (to find selector)
- XCode (for iOS Simulator)
- Demo App (for testing sample) by Sauce Labs
Node Modules
- WebdriverIO
- Mocha (for Test Framework)
- Allure (for Test Reporting)
- Chai (for Assessment)
- Sauce Labs (for Test on Cloud)
- Dotenv
Setup with `package.json`
- `npm install`
Setup manually
- `npm init -y`
- `npm install @wdio/cli`
- `./node_modules/.bin/wdio config` -> for quick setup or continue to install the following module below.
- `npm install @wdio/local-runner`
- `npm install @wdio/appium-service`
- `npm install @wdio/sauce-service`
- `npm install @wdio/mocha-framework`
- `npm install @wdio/allure-reporter`
- `npm install dotenv`
- `npm install chai`
Setup WDA to Simulator | webdriveragent
- `npm install --save-dev appium@next`
- `./node_modules/.bin/appium driver install xcuitest` -> install Appium driver for iOS testing
- Run Appium Server
- Run Appium Inspector and try to connect to the Simulator (It will take quite long)
- If success accessing the Simulator by Appium Inspector, then the WDA is completely installed
To compile the test result
- `npm install --save-dev allure-commandline`
- `./node_modules/.bin/allure generate [allure_output_dir] && ./node_modules/.bin/allure open` (edit the 'allure_output_dir' with your directory)
or follow this instruction to make it automatically -> https://webdriver.io/docs/allure-reporter#autogenerate-report
To run the test
| Command | Description |
| --- | --- |
| `npm run test` | Run all tests |
| `npm run test -- --suite SuiteName` | Run a specific Test Suite Bundle (need to define it inside 'wdio.conf.js') |
| `npm run test -- --spec ./path/to/file/FileName` | Run a specific Test Case / Suite (need to define it inside 'wdio.conf.js') |
Common issue that probably occured after the setup
If u get this error
`Error: "ts-node/esm/transpile-only 'resolve'" did not call the next hook in its chain and did not explicitly signal a short circuit. If this is intentional, include 'shortCircuit: true' in the hook's return.`
try to fix it with
`npm install --save-dev ts-node`
To check the report
- `npm run report`
How the report look like?
Allure Report

SauceLabs Build & Test Status
