This project combines Appium and WebdriverIO to execute end-to-end tests in native apps on iOS and Android.
https://developer.android.com/studio/install
https://developer.apple.com/xcode/
npm i -g appium
npm i -g appium-doctor
As you're addressing issues raised by appium-doctor
, make sure to apply these changes in your .bashrc
or .zshrc
.
https://github.com/appium/appium-desktop/releases
This can be done by opening appium-desktop
or running appium
from CLI. In either case, use default settings (host: '0.0.0.0', port: '4723')
Open your preferred emulator (iOS or Android) in Xcode or Android Studio.
capabilities
are defined in the wdio.conf.*
file. These specify the environment we are targeting.
capabilities: [
{
platformName: "iOS",
platformVersion: "11.4",
deviceName: "iPhone 8",
app: "/Users/bmurray/Documents/appium/NicheMobileApp.app",
automationName: "XCUITest"
},
platformName
, platformVersion
, and deviceName
should all match the configuration of your device/emulator.
The path set in wdio.conf
's capabilities.app
is important: this points to the app that you want to run tests on. For Android, any .apk
is fine.
For iOS, you need a .app
to run in an emulator, or an .ipa
to run on a device.
Note: at the time of this writing, on OS X this path needs to be an absolute path.
automationName
is the driver we're targeting. We're currently using http://appium.io/docs/en/drivers/ios-xcuitest/ and http://appium.io/docs/en/drivers/android-uiautomator2/.
To execute tests, reference package.json
.
At the time of this writing, you can use npm run test:android
or npm run test:ios
This test suite doesn't run out of the box: as you can see, there is no appium/NicheMobileApp.app
file included here.
When CI is integrated to build .apk
and .app
files we'll want to build off those.
Until then, you can find test files in the Appium assets
folder in the QA drive on NicheNAS.