Browserstack integration
Run tests you create with Testim on Browserstack browsers
This article will review how to set your Browserstack on Testim and how to run your tests.
How to add a Browserstack grid
- Navigate to Company view and then to "Grids" tab.
- Click "+" in the top right corner of the screen.
- Choose a grid type: Browserstack.
- Update the following fields:
- Name: The grid name to use at run time.
- Browserstack User: Browserstack key to connect.
- Browserstack key: Browserstack key to connect.
- Host: Browserstack host name.
- Port: Browserstack port.

How to run on the grid
You can run your tests remotely using one of the following methods:
Add --grid parameter with the grid name.
Use Grid field to choose on which grid to run your tests.
Use Grid field to choose on which grid to run your tests.
From the editor
You can run your test on the grid directly from the test editor.
- Click on the options arrow next to the "Run" button
- Click on "Run on a grid".
To change the configuration/grid/base url for that run click on "Edit".

Follow the links to learn more about each option.
Note:
- Grid parameter replaces the old host and port parameters.
- Browserstack doesn't support Linux, please check your test configuration before running.
- Please make sure the resolution you are running the test with is supported in Browserstack.
- To run the tests on multiple browsers (latest version)\OS\resolutions, you can pass all the relevant test configurations through CLI, for example:
testim --token "INSERT TOKEN" --project "INSERT PROJECT" --grid "INSERT BROWSERSTACK GRID" --report-file testim-report.xml --suite "INSERT SUITE" --test-config "INSERT CONFIGURATION"`
-
To run the tests on multiple browser versions \ OS's \ resolutions, you will have to pass the Browserstacks capabilities file :generate a JSON capabilities file:
-
Browserstack has a calculator for that https://www.browserstack.com/automate/capabilities (Set it to NodeJS).
-
Add this flag to the CLI with the path to the file: --browserstack-options <path.json>
For each combination you want to use (for each capability file), you can add the relevant details and have one "big" command to run, for example:
testim --token "INSERT TOKEN" --project "INSERT PROJECT" --grid "INSERT BROWSERSTACK GRID" --report-file testim-report.xml --suite "INSERT SUITE" --test-config "INSERT CONFIGURATION" --browserstack-options <PATH.JSON>
Note: When running a Test Plan on BrowserStack, you cannot specify the browser's name in the option file. This will result with a conflict because it's already defined in the test plan.
Updated over 1 year ago