zz-test-webdriverio6-appium-mocha
v1.0.0
Published
Automated testing
Downloads
5
Maintainers
Readme
GiD-AppiumTest
Description
- Automation tests for ### app
Based on
Supports
- Native Android and iOS apps
- Android Chrome browser
- iOS Safari browser
- Supports Page Object Model
- Contains sample test scenarios in mocha
- Supports eslint
- Supports allure reporting
Source
Click below to know more
Running tests
Follow the below commands -
Before runing tests, install Appium (For example: How to Install Appium: Step-by-Step Complete Tutorial : https://www.edureka.co/blog/appium-installation/#appium-installation-mac)
Clone the project
Install dependencies using
npm i
in the terminal.Update the deviceName and platFormVersion in
config/android.info.js
orconfig/ios.info.js
.Add latest apk in the "apps" folder and name it "gid.apk"
Execute
npm run ios
to run ios native appExecute
npm run iosBrowser
to run ios safari browserExecute
npm run android(device model)
to run android native appExecute
npm run androidBrowser
to run android chrome browserExecute
npm run lint
to run the eslint for the projectExecute
npm run allure
to generate the allure report
Running multiple tests on multiple devices
In android.info.js add/change deviceName and platformVersion and add phone model at the end (example: "deviceNameA51: 'devname'", "platformVersionA51: '10'")
Create/copy new android.config.js file and add phone model at the end (example: "android.configA51.js")
Change Port number, device name (example: "deviceName: androidInfo.deviceNameA51") and platform version (example: "platformVersion: androidInfo.platformVersionA51")
In package.json add created script under "scripts" (example: "androidA51": "wdio ./config/android.configA51.js")
in separate terminals run appium servers (example: "appium -p 4000 -bp 5000" and "appium -p 4001 -bp 5001"), ports must match the ports that were specified earlier
in separate terminals run tests (example: "npm run androidA51" and "npm run androidS9")
Warning: Be careful to change users, coordinates... for each device (look revokeAcc.page.js)
APPIUM important info
RUN APPIUM DESKTOP APP:
- In Terminal run: “ sudo /Applications/Appium.app/Contents/MacOS/Appium “
- Set up JAVA_HOME and ANDROID_HOME in Appium desktop before staring the server
- In advanced set “Override session” checkbox
SETING UP CORRECT PATH (User “correct path” below):
###@MacBook-Pro ~ % nano .bash_profile
###@MacBook-Pro ~ % source .bash_profile
###@MacBook-Pro ~ % echo $ANDROID_HOME
/Users/###/Library/Android/sdk
###@MacBook-Pro ~ % echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home
###@MacBook-Pro ~ % appium-doctor
CORRECT PATH:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home export PATH=$JAVA_HOME/bin:$PATH export ANDROID_HOME=/Users/###/Library/Android/sdk export PATH=/Users/###/Library/Android/sdk/platform-tools:$PATH