Introduction

You can use Browserstack as robot infrastrucure. In the Cerberus demo integration chain, functionnal tests are executed through BrowserStack, that allow to validate the regression for each commit.

Browserstack

To run your tests on BrowserStack Automate, you must:

1) Upload the app:

According to browserstack documentation the app can be uploaded through it’s REST API:

curl -u "USERNAME:ACCESS_KEY" -X POST https://api.browserstack.com/app-automate/upload -F "file=@/path/to/app/file/Application-debug.apk"

the response will give the app hash id: bs://fecad32e3d0900192ccc27747d037ead7427b1ba

2) Create/Update the Robot

To execute the tests with browserstack the usage of a robot is required to pass certain capabilities to appium

To do it navigate into Robot page and fill the necessary fields:

  • Robot - robot name

  • Hostname - hub-cloud.browserstack.com

  • Host Username - browserstack username

  • Host Password - browserstack access key

  • Port - 80

  • Platform - iOS / Android

  • Browser - iphone and android

configuringrobot

The minimum capabilities that should be set are:

app: bs://<hashed_appid>

device: deviceName to use

realMobile: true

os_version: os to test

settingcaps

3) Update the application

The environment of the application to test with Cerberus must have set in the field Host login URL the bs://<hashed_appid>

settingapp

4) Trigger the test

Go to Run test page and select the test you want to execute with the previously created robot and trigger the execution.