Skip to content

Commit a57ebcb

Browse files
Ankit098francisf
authored andcommitted
update: readMe file
1 parent ea9a4e3 commit a57ebcb

File tree

1 file changed

+82
-2
lines changed

1 file changed

+82
-2
lines changed

README.md

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,82 @@
1-
# wdio-browserstack-service
2-
Browserstack-Webdriverio service integration plugin: https://browserstack.atlassian.net/wiki/spaces/ENG/pages/3415278082/WebdriverIO+BrowserStack+Service?focusedCommentId=3418718374#comment-3418718374
1+
WebdriverIO Browserstack Service
2+
==========
3+
4+
> A WebdriverIO service that manages local tunnel and job metadata for Browserstack users.
5+
6+
## Installation
7+
8+
9+
The easiest way is to keep `@browserstack/wdio-browserstack-service` as a devDependency in your `package.json`.
10+
11+
```json
12+
{
13+
"devDependencies": {
14+
"@browserstack/wdio-browserstack-service": "^1.0.0"
15+
}
16+
}
17+
```
18+
19+
You can simple do it by:
20+
21+
```sh
22+
npm install @browserstack/wdio-browserstack-service --save-dev
23+
```
24+
25+
Instructions on how to install `WebdriverIO` can be found [here.](https://webdriver.io/docs/gettingstarted)
26+
27+
28+
## Configuration
29+
30+
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](https://www.browserstack.com/automate/node#setting-local-tunnel). Set `browserstackLocal: true` also to activate this feature.
31+
Reporting of session status on BrowserStack will respect `strict` setting of Cucumber options.
32+
33+
```js
34+
// wdio.conf.js
35+
export.config = {
36+
// ...
37+
user: process.env.BROWSERSTACK_USERNAME,
38+
key: process.env.BROWSERSTACK_ACCESS_KEY,
39+
services: [
40+
['browserstack', {
41+
browserstackLocal: true
42+
}]
43+
],
44+
// ...
45+
};
46+
```
47+
48+
## Options
49+
50+
In order to authorize to the BrowserStack service your config needs to contain a [`user`](https://webdriver.io/docs/options#user) and [`key`](https://webdriver.io/docs/options#key) option.
51+
52+
### browserstackLocal
53+
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.
54+
55+
Type: `Boolean`<br />
56+
Default: `false`
57+
58+
### preferScenarioName
59+
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](https://github.com/SimitTomar/wdio-cucumber-parallel-execution).
60+
61+
Type: `Boolean`<br />
62+
Default: `false`
63+
64+
### forcedStop
65+
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](https://github.com/browserstack/browserstack-local-nodejs/issues/41).
66+
67+
Type: `Boolean`<br />
68+
Default: `false`
69+
70+
### opts
71+
Specified optional will be passed down to BrowserstackLocal. See [this list](https://www.browserstack.com/local-testing#modifiers) for details.
72+
73+
Type: `Object`<br />
74+
Default: `{}`
75+
76+
## Known Issues
77+
78+
- 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.
79+
80+
----
81+
82+
For more information on WebdriverIO see the [homepage](https://webdriver.io).

0 commit comments

Comments
 (0)