Run Cerberus tests on Automate
A step-by-step guide to running Cerberus tests with BrowserStack Automate
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:
- Adding BrowserStack Robot in Cerberus
- Adding BrowserStack Capabilities in Cerberus
- Run your first test
- Testing privately hosted websites
- Limitations
Pre-requisites
- BrowserStack Username and Access key, which you can find in your account settings. If you have not created an account yet, you can sign up for a Free Trial or purchase a plan
- Cerberus Testing credentials
- Cerberus Executor for Local Testing
- Java(TM) SE Runtime Environment (build 15.0.1+9-18) or higher
- A test case created in Cerberus is available
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.
- On the Cerberus dashboard, click Run > Robot.
- On the Robot page, click Create new Robot.
- Click the Definition tab, select the required Platform (OS) and the Browser from the drop-down.
- Click the Executor tab and set the following details:
- Host - hub-cloud.browserstack.com
- HostUser - BrowserStack Username
- HostPassword - BrowserStack Access Key
- 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.
- On the Cerberus dashboard, click Administration, and select Invariants.
- Click Create Invariant.
- In the IdName drop-down, select CAPABILITY - Robot capabilities.
- In the Value textbox, add browserstack.local.
- Repeat the steps 3 and 4 to add other capabilities, such as browserstack.localIdentifier, etc.
- To organize your tests, project, name, and buildName capabilities are added by Cereberus by default.
Run your first test
- On the Cerberus dashboard, click Test **> TestCase List**.
- Click the Run icon next to the test case you want to run.
- On the Run Test Case page, under the Robot Settings area, select the BrowserStack Robot, and then click Run TestCase.
- 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.
- 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
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:
- On the Cerberus dashboard, click Run > Robot.
- Click the Edit icon next to the Robot that you want to edit.
- Click the Capabilities tab, and then click Add capability.
- From the drop-down, select browserstack.local you added in this section, and set the value as true.
- From the drop-down, select browserstack.localIdentifier you added in this section, and set the value as randomString.
- 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.
- 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
- Follow the steps in the Run your first test section.
- View the test result on the BrowserStack dashboard.
- 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
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!