Skip to main content

Integrate Your Test Suite

Integrate Automate Turboscale into your test suite using the BrowserStack WebdriverIO Service

The BrowserStack WDIO service ensures a plug-and-play integration. It passes test context and configures other BrowserStack features under the hood without requiring any code changes.

Prerequisites

  • Node v12+, Selenium v2.5+ (W3C/JSON Wire)
  • An existing WebdriverIO based web automation test suite.

Integration Steps

Set BrowserStack credentials

Saving your BrowserStack credentials as environment variables makes it easier to run your test suite from your local or CI environment.

Copy icon Copy snippet
Copy icon Copy snippet
Copy icon Copy snippet

Install BrowserStack WDIO service

Use either of the following ways to install BrowserStack WDIO service to your project:

npm install @wdio/browserstack-service --save-dev
"devDependencies": {
  "@wdio/browserstack-service": "^7",
}

Update your WebdriverIO config file

Update your configuration file with the following parameters to run tests on Automate TurboScale.
At the end of this step, you will have a sample configuration file with BrowserStack capabilities to use in your project.

Add BrowserStack service

Add browserstack to the services list in your configuration file.

Set platforms to test on

Set the browsers/devices you want to test within the capabilities array. Our config follows W3C formatted capabilities.

BrowserStack Reporting

You can leverage BrowserStack’s extensive reporting features using the capabilities:

Build Name

Set build name as the name of the job/test suite being run. Accepted characters: A-Z, a-z, 0-9, ., :, -, [], /, @, &, , _. All other characters are ignored.
Character limit: 255


Project Name

Set a project name for your project.

sessionName is the name of your test sessions and is automatically picked from your test class/spec name. It doesn’t need to be set manually when using Automate Turboscale.

Use additional debugging features

Additionally, you can enable the following features:

Video

Enables video recording for every command ran

True
False
Network logs

Enables network capture for the session in HAR format. Reduces session performance slightly

True
False

Use Automate Turboscale

Turboscale

Enables Turboscale

True
False

Update configuration file with selected capabilities

Copy the following code snippet and add it to your configuration file of your test suite.

webdriverio.conf.js
Copy icon Copy snippet

In the above eample code snippet, it is essential to set the following parameters:
hostname - is the grid url found on the overview page of your automation-console
For example, if your grid url is https://cbsorgle-hub.browserstack-ats.com/wd/hub, the hostname will be cbsorgle-hub.browserstack-ats.com
path - /wd/hub
port - 443 if using https protocol, or 4444 if using http protocol
protocol - https or http

Run your test suite

Your test suite is now ready to run on Automate TurboScale. Use the commands defined in your package.json file to run the tests.

Advanced features and use cases

Here’s a list of features and capabilities that you might find useful:

Accept insecure certificates

The acceptInsecureCerts capability suppresses browser popups warning about self-signed certificates usually found in staging environments.

Capability Expected values
acceptInsecureCerts A boolean. Default is False.
True if you want to accept all SSL certificates.
webdriverio.conf.js

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