- install Android Studio (follow steps from here).
- setup AVD and create the emulator will be used for testing.
- make sure emulator in use has the latest chrome browser. if now, follow here to install latest chrome apk
In order to run test in appium locally, you can start with adding following code block into nightwatch.json
"appiumandroidmweb": {
"desiredCapabilities": {
"browserName": "Chrome",
"appiumVersion": "1.6.3",
"platformName": "Android",
"platformVersion": "7.0",
"deviceName": "Pixel_API_24",
"avd": "Pixel_API_24",
"avdArgs": "-netfast -noaudio -no-boot-anim"
},
"selenium": {
"start_process": false
},
"appium": {
"start_process": true
}
}
Notice that
appiumVersion
has to match the appium version you installedplatformVersion
has to match the emulator version you installedavd
has to match the AVD name you createdavdArgs
is optional
PLEASE NOTE:
- If
avd
is present,appium
will launch emulator automatically. However there might be a chance thatappium
will time out before the emulator is launched which will fail your test. We recommend you to launch the emulator before your test run first.
The allowed configuration for desiredCapabilities
can be found here.
if appium.start_process
is configured and is true, nightwatch-extra
will launch appium automatically at http://${selenium_host}:${selenium_port}
.
NOTE: appium is also a selenium server. so selenium.start_process
and appium.start_process
are mutually exclusive, meaning that you can only enable one at a time.