# Cloud Device Testing
Table of Contents
# Introduction
Many times you'll want to run tests on many different real devices running several OS versions. This could require purchasing quite a few phones. Luckily, real device testing is available in the cloud. Here we'll describe how to use several cloud device testing providers with Gondola.
# BrowserStack
# Prerequisites:
- Register with BrowserStack
# Using BrowserStack with Gondola
Login to BrowserStack
Go to Product > App automates.
In Quick Start Guide, upload your App.
Next add the information to your
gondola.json
file.app
will be yourappurl
from abovebrowserstack.user
andbrowserstack.key
are your username and access key and are located on the BrowserStack App Automate page.browserstack.appium_version
is the Appium version you'd like to use for testing
{
"output": "./results",
"helpers": {
"Appium": {
"require": "./node_modules/@logigear/gondola/built/helper/AppiumEx",
"hostname": "hub-cloud.browserstack.com",
"port": 80,
"app": "bs://<yourBrowserStackAppURL>",
"desiredCapabilities": {
"device": "Samsung Galaxy S8",
"browserstack.user": "<yourBrowserStackUserName>",
"browserstack.key": "<yourBrowserStackKey",
"browserstack.debug": true,
"browserstack.appium_version": "1.14.0"
}
},
"GondolaHelper": {
"require": "./node_modules/@logigear/gondola/built/helper/gondolahelper"
}
},
"plugins": {
"screenshotOnFail": {
"enabled": "true"
},
"allure": {}
},
"tests": "./built/tests/loginValidation.js",
"name": "SampleAndroid"
}
# NTT Remote TestKit
# Prerequisites:
- Register with NTT Remote TestKit
# Using NTT Remote TestKit with Gondola
Download & install NTT Remote Testkit
Start NTT Remote Testkit & login.
Rent a device & enable ADB connection (Android) or enable USB connection (iOS). In case you want to test multi-devices, you can rent more than one. With iOS devices, please make sure you run NTT Remote Testkit on macOS machine which already has XCode installed.
With Android devices, run
adb devices
to check if your device is connected. With iOS, check your device's connection status in XCode. :::TIP Note When deploying an.ipa
file on an iOS device, please make sure the device you're renting has been added to your Apple provisioning profile :::Configure
gondola.json
to match the device.
# AWS Device Farm
# Prerequisites:
- Register with AWS Device Farm
# Using AWS Device Farm with Gondola
Create an IAM User with full AWS Device Farm permissions
Login and create new project, then create a new run and choose your application
Upload "<your app>".apk (for Android) or "<your app>".ipa (for iOS) to AWS Device Farm. With iOS test, please build the ipa for a real device (not a simulator)
Create a Gondola ABT project. Make sure to run these commands
- npm i
- npm run compile
Put all of files and folders (except src folder) into a zip file and upload, then choose type execute by "Appium Node.js"
Edit the
.yml
file, here are some examples (please replace your target versions of Appium server, Android and iOS):
Select from one of the available device pools or create a new device pool
Review and run the test
Open the test summary for each device and download the "Customer Artifacts" to get your test results.
# Sauce Labs
# Prerequisites:
- Register with Sauce Labs and sign in
# Real Device Cloud Testing with Sauce Labs and Gondola
- Click the
Access Real Device Automation
link in the top right
- Create a new app by pressing the
New App
button
- You can upload your app directly to SauceLab's servers or host it remotely
- After uploading your app you will be take to the device's management page.
- Go to basic setup page for the uploaded app to get required capabilities for your gondola.json configuration (“AUTOMATED TESTING”>>Appium>>Setup Instructions).
# Real Device gondola.json samples
Note
app
is the location to user’s uploaded app file(apk/ipa/zip). There are many way to upload app file. Please read this article- Users can choose between US and EU device servers. The information on each server is shown under “Setup Instructions”.
testobject_api_key
is a unique ID for each Test Project. It is shown under “Setup Instructions” and required for running tests.platformName
andplatformVersion
are required. There is a list of supported device with version details under “Setup Instructions”. (Click on theView Devices
button)- More information about capabilities for running test on Real Device is shown here.
# Emulator/Simulator Cloud Testing with Sauce Labs and Gondola
Navigate to https://app.saucelabs.com/dashboard then go to “User Settings” to get your Driver Creation URL
The Driver Creation URL’s format is: https://$username:$Access_KEY@ondemand.saucelabs.com:443/wd/hub An example URL for an account with “abc” as username and “1234-5678” as access key: https://abc:1234-5678@ondemand.saucelabs.com:443/wd/hub
Note
app
is required and specifies the link to the app.- Use the Driver Creation URL to configure the
host
property (required) - More information about capabilities for running test on Emulator/Simulator is available here
- Use the Platform Configurator to get the list of supported Emulator/Simulator devices and correct values for desired capabilities.
- For more information on uploading your app, click here