1.0.4 • Published 2 years ago

@browserstack/wdio-browserstack-service v1.0.4

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

WebdriverIO Browserstack Service

The official BrowserStack WebdriverIO service that integrates your WebdriverIO test suite with BrowserStack.

Installation

You can simply do it by:

npm install @browserstack/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 simply set user and key in your wdio.conf.js file. This service plugin provides supports for Browserstack Tunnel. 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.config = {
    // ...
    user: process.env.BROWSERSTACK_USERNAME,
    key: process.env.BROWSERSTACK_ACCESS_KEY,
    services: [
        ['@browserstack/wdio-browserstack-service', {
            browserstackLocal: true
        }]
    ],
    // ...
};

Options

In order to authorize to the BrowserStack service your config needs to contain a user and key option.

browserstackLocal

Set this to true to enable routing connections from Browserstack cloud through your computer. You will also need to set browserstack.local to true in browser capabilities.

Type: Boolean Default: false

preferScenarioName

Cucumber only. Set this to true to enable updating the session name to the Scenario name if only a single Scenario was ran. Useful when running in parallel with wdio-cucumber-parallel-execution.

Type: Boolean Default: false

forcedStop

Set this to true to kill the browserstack process on complete, without waiting for the browserstack stop callback to be called. This is experimental and should not be used by all. Mostly necessary as a workaraound for this issue.

Type: Boolean Default: false

opts

Specified optional will be passed down to BrowserstackLocal. See this list for details.

Type: Object Default: {}

Known Issues

  • At the moment, it is challenging, if not impossible, to transfer localIdentifier to child-processes reliably because of how webdriverio designed their multi-process model. We recommend using this service without an identifier, which will create an account-wide local tunnel.

For more information on WebdriverIO see the homepage.