Project of testing a mobile application - Alarm Clock (default Android app) using Webdriver.io, Appium, Appium Inspector,
- Install Webdriver and adjust it for mobile testing.
npm init wdio@latest .
- Install Allure-report
npm install @wdio/allure-reporter --save-dev
- Install local runner (if it's not installed automatically before)
npm install --save-dev @wdio/local-runner
- Install Mocha framework
npm install @wdio/mocha-framework --save-dev
- Install junit reporter
npm install @wdio/junit-reporter --save-dev
- Install Appium. Install driver: UiAutomator2.
npm install -g appium
appium driver install uiautomator2
- Download and install Appium Inspector [https://github.com/appium/appium-inspector/releases/tag/v2024.12.1]. Find release 8.4.3.
- Download "platform-tools" for Android Studio [https://developer.android.com/tools/releases/platform-tools] for your OS. Unzip archive and move this folder to the same path as %ANDROID_HOME% (should be %ANDROID_HOME%/platform-tools). Other required Paths: %ANDROID_HOME%\tools, %ANDROID_HOME%\tools\bin.
- Install adb driver setup [https://adb.clockworkmod.com/]
- Install Vysor.io (optional) [https://www.vysor.io/]
- Install Browserstack
npm install @wdio/browserstack-service --save-dev
- You can find id of your device (deviceName) using command in Terminal - "adb devices". It should be in the list.
- Download any .apk application that you would like to test.
- Set in config:
- platformName - Android or iOS.
- platformVersion. Should be a version of your device (or choose in BrowserStack).
- automationName. UiAutomator - that you installed in Appium.
- app:path/to/your/app/app.apk
{
"platformName": "Android",
"appium:options:{
"appium:platformVersion": "10.0",
"appium:deviceName": "6555SSKVJNWC9LLB",
"appium:automationName": "UiAutomator2",
"appium:app": "F:/Work_Tool_Appium/mob_test/apps/android/deskclock.apk"
}
15. I also faced some difficulties while connected BrowserStack. In order to fix this I added to the Path in my OS: C:\Program Files (x86)\BrowserStackLocal\ ; C:\Users\4829\AppData\Roaming\npm
16. Add to .gitignore : /allure-results