mobile-automation-template
Use WebdriverIO to test a cross-platform mobile app
Introduction
Automate tests for your Android & iOS apps using WebdriverIO & TypeScript!
GitHub Repo
https://github.com/steven-the-qa/mobile-automation-templateTech Stack
- WebdriverIO (Appium support)
- TypeScript (type safety)
- NodeJS (writing to the file system)
- Cucumber (supported out-of-the-box via WebdriverIO’s CLI)
- BrowserStack (devices)
Getting Started
- Install Node 16 or higher
- Clone the repo
- From the
ios
andandroid
directories, runnpm install
to install dependencies
That’s it! At this point, you should be able to run tests.
Run Tests Locally
Running all tests for either Android or iOS
- Navigate to the directory of either the
android
orios
project - Run
npm run all
to run all tests in the project
Running a single test
- Navigate to the directory of either the
android
orios
project - Run
npm run test features/{name}.feature
using the name of your feature file
Running multiple tests
- Navigate to the directory of either the
android
orios
project - Run
npm run test {feature_path_1} {feature_path_2} etc...
Run on 1 or more devices
- Navigate to the directory of either the
android
orios
project - DEVICE={device_name1} {device_name2} npm run test {feature_path}
iOS Devices:
- iphone_12_pro_16
- iphone_13_pro_15
Android Devices:
- pixel_6_12
- galaxy_s21_12