You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instructions on how to install `WebdriverIO` can be found [here.](https://webdriver.io/docs/gettingstarted)
16
14
17
-
18
15
## Configuration
19
16
20
17
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.
@@ -40,108 +37,142 @@ export.config = {
40
37
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.
41
38
42
39
### browserstackLocal
43
-
Set this to true to enable routing connections from Browserstack cloud through your computer.
40
+
41
+
Set this to true to enable routing connections from Browserstack cloud through your computer.
44
42
45
43
Type: `Boolean`<br />
46
44
Default: `false`
47
45
48
46
### preferScenarioName
47
+
49
48
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).
50
49
51
50
Type: `Boolean`<br />
52
51
Default: `false`
53
52
54
53
### opts
55
-
Specified optional will be passed down to BrowserstackLocal.
54
+
55
+
Specified optional will be passed down to BrowserstackLocal.
56
56
57
57
Type: `Object`<br />
58
58
Default: `{}`
59
59
60
60
List of available local testing modifiers to be passed as opts:
61
+
61
62
#### Local Identifier
63
+
62
64
If doing simultaneous multiple local testing connections, set this uniquely for different processes -
65
+
63
66
```js
64
-
opts = { 'localIdentifier':'randomstring' }
67
+
opts = { localIdentifier:"randomstring" };
65
68
```
69
+
66
70
#### Verbose Logging
71
+
67
72
To enable verbose logging -
73
+
68
74
```js
69
-
opts = { 'verbose':'true' }
75
+
opts = { verbose:"true" };
70
76
```
77
+
71
78
Note - Possible values for 'verbose' modifier are '1', '2', '3' and 'true'
72
79
80
+
#### Force Local
81
+
82
+
To route all traffic via local(your) machine -
83
+
84
+
```js
85
+
opts = { forceLocal:"true" };
86
+
```
87
+
73
88
#### Folder Testing
89
+
74
90
To test local folder rather internal server, provide path to folder as value of this option -
91
+
75
92
```js
76
-
opts = { 'f':'/my/awesome/folder' }
93
+
opts = { f:"/my/awesome/folder" };
77
94
```
78
95
79
96
#### Force Start
97
+
80
98
To kill other running Browserstack Local instances -
99
+
81
100
```js
82
-
opts = { 'force':'true' }
101
+
opts = { force:"true" };
83
102
```
84
103
85
104
#### Only Automate
105
+
86
106
To disable local testing for Live and Screenshots, and enable only Automate -
87
-
```js
88
-
opts = { 'onlyAutomate':'true' }
89
-
```
90
107
91
-
#### Force Local
92
-
To route all traffic via local(your) machine -
93
108
```js
94
-
opts = { 'forceLocal':'true' }
109
+
opts = { onlyAutomate:"true" };
95
110
```
96
111
97
112
#### Proxy
113
+
98
114
To use a proxy for local testing -
99
115
100
-
* proxyHost: Hostname/IP of proxy, remaining proxy options are ignored if this option is absent
101
-
* proxyPort: Port for the proxy, defaults to 3128 when -proxyHost is used
102
-
* proxyUser: Username for connecting to proxy (Basic Auth Only)
103
-
* proxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
116
+
- proxyHost: Hostname/IP of proxy, remaining proxy options are ignored if this option is absent
117
+
- proxyPort: Port for the proxy, defaults to 3128 when -proxyHost is used
118
+
- proxyUser: Username for connecting to proxy (Basic Auth Only)
119
+
- proxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
By default, BrowserStack local wrappers try downloading and executing the latest version of BrowserStack binary in ~/.browserstack or the present working directory or the tmp folder by order. But you can override these by passing the -binarypath argument.
By default, BrowserStack local wrappers try downloading and executing the latest version of BrowserStack binary in ~/.browserstack or the present working directory or the tmp folder by order. But you can override these by passing the -binarypath argument.
161
+
Path to specify local Binary path -
162
+
163
+
```js
164
+
opts = { binarypath:"/path/to/binary" };
165
+
```
137
166
138
167
#### Logfile
168
+
139
169
To save the logs to the file while running with the '-v' argument, you can specify the path of the file. By default the logs are saved in the local.log file in the present woring directory.
140
170
To specify the path to file where the logs will be saved -
0 commit comments