# Configuration
# Platform testing settings
The app
key needs to be set to the absolute path or remote http URL of your .apk or .ipa file.
# Android and iOS
gondola.json
{
"output": "./results",
"helpers": {
"Appium": {
"require": "./node_modules/@logigear/gondola/built/helper/AppiumEx",
"smartWait": 5000,
"app": "/Volumes/DATA/Projects/Test/CarRental/AUT/CarRental.apk",
"desiredCapabilities": {
"platformName": "android",
"deviceName": "emulator"
}
},
"GondolaHelper": {
"require": "./node_modules/@logigear/gondola/built/helper/gondolahelper"
}
},
"plugins": {
"screenshotOnFail": {
"enabled": "true"
},
"allure": {
"enabled": "true"
}
},
"tests": "./built/tests/*.js",
"name": "SampleAndroidandiOS",
"multiple": {
"login": {
"outputName": "login",
"browsers": [
{
"browser": "iPhone 8",
// set "app" to the absolute path of your ipa file.
"app": "/Volumes/DATA/Projects/Test/CarRental/AUT/CarRental.ipa",
"desiredCapabilities": {
"automationName": "XCUITest",
"platformName": "iOS",
"platformVersion": "12.0",
"deviceName": "iPhone 8",
"connectHardwareKeyboard": false
}
},
{
"browser": "android-emulator",
// set "app" to the absolute path of your apk file.
"app": "/Volumes/DATA/Projects/Test/CarRental/AUT/CarRental.apk",
"desiredCapabilities": {
"platformName": "android",
"deviceName": "emulator",
"automationName": "UiAutomator2",
"newCommandTimeout": 600
}
}
]
}
}
}
# Android
gondola.android.json
{
"output": "./results",
"helpers": {
"Appium": {
"require": "./node_modules/@logigear/gondola/built/helper/AppiumEx",
"smartWait": 5000,
// set "app" to the absolute path of your apk file.
"app": "/Volumes/DATA/Projects/Test/CarRental/AUT/CarRental.apk",
"desiredCapabilities": {
"platformName": "android",
"deviceName": "emulator",
"automationName": "UiAutomator2",
"newCommandTimeout": 600
}
},
"GondolaHelper": {
"require": "./node_modules/@logigear/gondola/built/helper/gondolahelper"
}
},
"plugins": {
"screenshotOnFail": {
"enabled": "true"
},
"allure": {
"enabled": "true"
}
},
"tests": "./built/tests/*.js",
"name": "SampleAndroid"
}
# iOS
gondola.json
{
"output": "./results",
"helpers": {
"Appium": {
"require": "./node_modules/@logigear/gondola/built/helper/AppiumEx",
"smartWait": 5000,
// set "app" to the absolute path of your ipa file.
"app": "/Volumes/DATA/Projects/Test/CarRental/AUT/CarRental.ipa",
"desiredCapabilities": {
"automationName": "XCUITest",
"platformName": "iOS",
"platformVersion": "12.0",
"deviceName": "iPhone 8",
"connectHardwareKeyboard": false
}
},
"GondolaHelper": {
"require": "./node_modules/@logigear/gondola/built/helper/gondolahelper"
}
},
"plugins": {
"screenshotOnFail": {
"enabled": "true"
},
"allure": {
"enabled": "true"
}
},
"tests": "./built/tests/*.js",
"name": "SampleiOS"
}
# Common Parameters
This helper should be configured in gondola.json or gondola.conf.js
app
: Application path. Local path or remote URL to an .ipa or .apk file, or a .zip containing one of these. Alias to desiredCapabilities.appPackagehostname
: (default: 'localhost') Appium hostport
: (default: '4723') Appium portplatform
: (Android or IOS), which mobile OS to use; alias to desiredCapabilities.platformNamerestart
: restart browser or app between tests (default: true), if set to false cookies will be cleaned but browser window will be kept; for apps nothing will be changed.desiredCapabilities
: Appium capabilities, see belowplatformName
- Which mobile OS platform to useappPackage
- Java package of the Android app you want to runappActivity
- Activity name for the Android activity you want to launch from your package.deviceName
: The kind of mobile device or emulator to useplatformVersion
: Mobile OS versionapp
- The absolute local path or remote http URL to an .ipa or .apk file, or a .zip containing one of these. Appium will attempt to install this app binary on the appropriate device first.browserName
: Name of mobile web browser to automate. Should be an empty string if automating an app instead.
smartWait
(optional, default:5000
) : enables SmartWait - wait an amount of time for an element to appear. Time is measured in milliseconds.- E.g. : Enable for 5 secs:
"smartWait": 5000
. - List of supported actions :
click
doubleClick
rightClick
mouseMove
swipe
getControlProperty
checkControlProperty
doesControlExist
dragAndDrop
enter
- E.g. : Enable for 5 secs:
Example:
{
helpers: {
Appium: {
platform: "Android",
desiredCapabilities: {
appPackage: "com.example.android.myApp",
appActivity: "MainActivity",
deviceName: "OnePlus3",
platformVersion: "6.0.1"
}
}
}
}
Information about additional configuration parameters can be found here
# Mobile Browser Testing Configuration
# iOS Mobile Browser Automation
Gondola can automate Safari on real and simulated iOS devices. It is accessed by setting the browserName
desired capability to safari
You can use the following settings to automate your test in Safari on an iOS device
{
"Appium": {
"url": "https://demo.gondolatest.com/",
"smartWait": 5000,
"platform": "iOS",
"restart": false,
"hostname": "localhost",
"port": 4723,
"timeouts": {
"script": 60000,
"page load": 10000
},
"desiredCapabilities": {
"platformName": "iOS",
"deviceName": "iPhone 8",
"udid": "auto",
"browserName": "safari",
"autoGrantPermissions": true,
"platformVersion": "13.3",
"nativeWebScreenshot": true
}
}
}
TIP
- Make sure you allowed automation when using a iOS real device by following the steps here
- If there is only one real device attached,
udid
can be set toauto
. If a device is connected, it will run on that device. If not, it will run on a simulator. If there are multiple devices connected, you may need to manually set theudid
desired capability
# Android Mobile Browser Automation
Gondola supports automating Chrome on both real and emulated Android devices.
Pre-requisites:
- Make sure Chrome is installed on your device or emulator.
- Chromedriver needs to be installed (the default version comes with Appium) and configured for automating the specific version of Chrome installed on the device. See here for more information.
You can use the following settings to run test in Chrome on an Android device.
{
"Appium": {
"url": "https://demo.gondolatest.com/",
"smartWait": 5000,
"platform": "Android",
"restart": false,
"hostname": "localhost",
"port": 4723,
"timeouts": {
"script": 60000
},
"desiredCapabilities": {
"platformName": "Android",
"deviceName": "Galaxy S20",
"udid": "<udid of device>",
"browserName": "chrome",
"autoGrantPermissions": true,
"platformVersion": "10",
"nativeWebScreenshot": true,
"pageLoadStrategy": "eager"
}
}
}
You will need to update the udid
capability before executing tests. To find a device's udid
follow the steps below
From a terminal, run
adb devices
to get a list of attached real devices and emulators.$adb devices List of deices attached ENUL63030121821300 device emulator-5554 device
Copy and paste the device's
udid
i.e.ENUL63030121821300
into theudid
field in your desired capabilities then save your changes.{ "Appium": { "url": "https://demo.gondolatest.com/", "smartWait": 5000, "platform": "Android", "restart": false, "hostname": "localhost", "port": 4723, "timeouts": { "script": 60000 }, "desiredCapabilities": { "platformName": "Android", "deviceName": "Galaxy S20", "udid": "ENUL63030121821300", "browserName": "chrome", "autoGrantPermissions": true, "platformVersion": "10", "nativeWebScreenshot": true, "pageLoadStrategy": "eager" } } }