Browserstack Service
A WebdriverIO service that manages local tunnel and job metadata for BrowserStack users.
Installation
The easiest way is to keep @wdio/browserstack-service
as a devDependency in your package.json
, via:
npm install @wdio/browserstack-service --save-dev
Instructions on how to install WebdriverIO
can be found here.
Configuration
WebdriverIO has BrowserStack support out of the box. You should set user
and key
in your wdio.conf.js
file. This service plugin provides support for BrowserStack Tunnel](https://www.browserstack.com/docs/automate/selenium/getting-started/nodejs/local-testing). Set browserstackLocal: true
also to activate this feature.
Reporting of session status on BrowserStack will respect strict
setting of Cucumber options.
// wdio.conf.js
export const config = {
// ...
user: process.env.BROWSERSTACK_USERNAME,
key: process.env.BROWSERSTACK_ACCESS_KEY,
services: [
['browserstack', {
testObservability: true,
testObservabilityOptions: {
projectName: "Your project name goes here",
buildName: "The static build job name goes here e.g. Nightly regression"
},
browserstackLocal: true
}]
],
// ...
};