Skip to main content

Integrate BrowserStack Automate with Cerberus

This document guides you with the step-by-step process to run Cerberus tests on BrowserStack Automate.

Introduction

Cerberus is a low-code, open-source, and a scalable test automation solution. Selenium is already integrated in this tool. Implement cross-browser, mobile and desktop tests using Cerberus.

In this guide, you will learn about:

Pre-requisites

Adding Browserstack Robot in Cerberus

The BrowserStack robot includes your BrowserStack credentials and OS-browser combination for which you want to run your test on BrowserStack. For each OS-browser combination that you want to run your test for, you must create a unique robot.

  1. On the Cerberus dashboard, click Run **> Robot**
  2. On the Robot page, click Create new Robot
  3. Click the Definition tab, select the required Platform (OS) and the Browser from the drop-down Add BrowserStack Robot
  4. Click the Executor tab and set the following details:
    • Host - hub-cloud.browserstack.com
    • HostUser - Browserstack Username
    • HostPassword - Browserstack Access Key Update Executor Tab
  5. Click Create to save the robot configuration

Adding Browserstack Capabilities in Cerberus

Browserstack-specific capabilities are not available by default in Cerberus. You can add these capabilities using the Invariant option such that you can then add them to the BrowserStack robots.

  1. On the Cerberus dashboard, click Administration, and select Invariants
  2. Click Create Invariant Add Capabilities via Invariants
  3. In the IdName drop-down, select CAPABILITY - Robot capabilities
  4. In the Value textbox, add browserstack.local
  5. Repeat the steps 3 and 4 to add other capabilities, such as browserstack.localIdentifier, etc. Add Capabilities
  6. To organize your tests, project, name, and buildName capabilities are added by Cereberus by default

Run your first test

  1. On the Cerberus dashboard, click Test **> TestCase List**.
  2. Click the Run icon next to the test case you want to run.
  3. On the Run Test Case page, under the Robot Settings area,
  4. Select the Browserstack Robot, and then click Run TestCase.
  5. On the left navigation pane, click Execution Report **> Execution Report** to view the test result. Cerberus automatically marks the test status as passed or failed based on the test execution.
  6. You can also view the test result on the BrowserStack dashboard.

For each Cerberus test run on Browserstack, network logs, console logs, and screenshots are available by default.

Testing privately hosted websites

The Cerberus Executor is used to start a local connection and run your local test.

Prerequisites

  • Download and start the Cerberus Executor(.jar) file as follows:
      java -jar cerberus-executor.jar
    
  • Test case with the local URLs configured
Important: You can download the binary from this page: LocalTesting. Ensure that the local-identifier used to start the Local Binary is same as the browserstack.localIdentifier value added in the capabilities.

To run your local tests:

  1. On the Cerberus dashboard, click Run **> Robot**
  2. Click the Edit icon next to the Robot that you want to edit
  3. Click the Capabilities tab, and then click Add capability
  4. From the drop-down, select browserstack.local you added in this section, and set the value as true
  5. From the drop-down, select browserstack.localIdentifier you added in this section, and set the value as randomString
  6. Start local testing using the binary and a local identifier.
    For OS X and Linux users:
     ./BrowserStackLocal --key YOUR_ACCESS_KEY --local-identifier randomString
     # --local-identifier helps reuse an existing binary connection and must be a unique string.
    

    For Windows users:

     BrowserStackLocal.exe --key YOUR_ACCESS_KEY --local-identifier randmoString
     # --local-identifier helps reuse an existing binary connection and must be a unique string.
    
  7. Start the Cerberus Proxy (you should get a success message and a UUID, which is needed to stop the proxy):
     http://localhost:8093/startProxy?bsLocalProxyActive=true&bsKey=accessKey&bsLocalIdentifier=randomString&bsLocalProxyHost=localhost:45454
    
  8. Follow the steps in the Run your first test section.
  9. View the test result on the BrowserStack dashboard.
  10. After your tests complete, stop the Cerberus Proxy:
    http://localhost:8093//stopProxy?uuid=<uuid>
    

Limitations of using Cerberus with BrowserStack

  • Based on the Cerberus documentation, parallel testing is not supported
  • Additional debugging capabilities provided by BrowserStack are not supported

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy