Automation framework designed to create tests in webdriverIO with Appium for Android and iOS apps created on Flutter project
This boilerplate is currently based on:
- WebdriverIO:
7.##.#
- Appium:
1.22.#
- Running
git clone https://github.com/luisecm/appium-flutter-poc.git
- Running
npm install
- Installing Appium on a local machine. You can find detailed instructions for this process here
- Setting up Android and iOS on a local machine. The getting started page from Appium can be a helfpul guide for this process and it can be found here
- Create a
./apps
directory. Ask development team to provide .apk file for Android app and .zip file for iOS app. Move the files into the directoryapps
. - Running tests
npm run android.app
ornpm run android.app
This framework uses a specific config for iOS and Android, see configs. The configs are based on a shared config
wdio.shared.conf.ts
.
This shared config holds all the defaults so the iOS and Android configs only need to hold the capabilities and specs that are needed
for running on iOS and or Android.
Please check the wdio.shared.conf.ts
-file for the minimal configuration options. Notes are added for why
a different value has been selected in comparison to the default values WebdriverIO provides.
Since we do not have Appium installed as part of this package we are going to use the globally installed version of Appium. This is
configured in wdio.shared.local.appium.conf.ts
.
The locator strategy for this boilerplate is to use accessibilityID
's, see also the
WebdriverIO docs or this newsletter on
AppiumPro.
accessibilityID
's make it easy to script once and run on iOS and Android because most of the apps already have some accessibilityID
's.
If accessibilityID
's can't be used, and for example only XPATH is available, then a conditional selector based on driver.isIOS or driver.isAndroid can be created
All tests can be executed on te devices as configured in wdio.android.app.conf.ts
or
wdio.ios.app.conf.ts
. Please check the below tests on what they do or on how to run them separately.
# For Android local execution
npm run android.app
# For iOS local execution
npm run ios.app