This project example is merged to: https://github.com/lynix28/mobileui-appium-wdio-example
For further update check on the new repo
- NodeJS
- Appium Server
- Appium Inspector (to find selector)
- XCode (for iOS Simulator)
- Demo App (for testing sample) by Sauce Labs
- WebdriverIO
- Mocha (for Test Framework)
- Allure (for Test Reporting)
- Chai (for Assessment)
- Sauce Labs (for Test on Cloud)
- Dotenv
npm install
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
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
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
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') |
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
npm run report