Skip to content

Commit 9bd50bc

Browse files
Ankit098francisf
authored andcommitted
add: local testing modifier opts in readme
1 parent c5d67b8 commit 9bd50bc

File tree

1 file changed

+87
-2
lines changed

1 file changed

+87
-2
lines changed

README.md

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export.config = {
4040
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.
4141

4242
### browserstackLocal
43-
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.
43+
Set this to true to enable routing connections from Browserstack cloud through your computer.
4444

4545
Type: `Boolean`<br />
4646
Default: `false`
@@ -52,11 +52,96 @@ Type: `Boolean`<br />
5252
Default: `false`
5353

5454
### opts
55-
Specified optional will be passed down to BrowserstackLocal. See [this list](https://www.browserstack.com/local-testing#modifiers) for details.
55+
Specified optional will be passed down to BrowserstackLocal.
5656

5757
Type: `Object`<br />
5858
Default: `{}`
5959

60+
List of available local testing modifiers to be passed as opts:
61+
#### Local Identifier
62+
If doing simultaneous multiple local testing connections, set this uniquely for different processes -
63+
```js
64+
opts = { 'localIdentifier': 'randomstring' }
65+
```
66+
#### Verbose Logging
67+
To enable verbose logging -
68+
```js
69+
opts = { 'verbose': 'true' }
70+
```
71+
Note - Possible values for 'verbose' modifier are '1', '2', '3' and 'true'
72+
73+
#### Folder Testing
74+
To test local folder rather internal server, provide path to folder as value of this option -
75+
```js
76+
opts = { 'f': '/my/awesome/folder' }
77+
```
78+
79+
#### Force Start
80+
To kill other running Browserstack Local instances -
81+
```js
82+
opts = { 'force': 'true' }
83+
```
84+
85+
#### Only Automate
86+
To disable local testing for Live and Screenshots, and enable only Automate -
87+
```js
88+
opts = { 'onlyAutomate': 'true' }
89+
```
90+
91+
#### Force Local
92+
To route all traffic via local(your) machine -
93+
```js
94+
opts = { 'forceLocal': 'true' }
95+
```
96+
97+
#### Proxy
98+
To use a proxy for local testing -
99+
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
104+
105+
```js
106+
opts = { 'proxyHost': '127.0.0.1', 'proxyPort': '8000', 'proxyUser': 'user', 'proxyPass': 'password' }
107+
```
108+
109+
#### Local Proxy
110+
To use local proxy in local testing -
111+
112+
* localProxyHost: Hostname/IP of proxy, remaining proxy options are ignored if this option is absent
113+
* localProxyPort: Port for the proxy, defaults to 8081 when -localProxyHost is used
114+
* localProxyUser: Username for connecting to proxy (Basic Auth Only)
115+
* localProxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
116+
117+
```js
118+
opts = { 'localProxyHost': '127.0.0.1', 'localProxyPort': '8000', 'localProxyUser': 'user', 'localProxyPass': 'password' }
119+
```
120+
121+
#### PAC (Proxy Auto-Configuration)
122+
To use PAC (Proxy Auto-Configuration) in local testing -
123+
124+
* pac-file: PAC (Proxy Auto-Configuration) file’s absolute path
125+
126+
```js
127+
opts = { 'pac-file': '<pac_file_abs_path>' }
128+
```
129+
130+
#### Binary Path
131+
132+
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.
133+
Path to specify local Binary path -
134+
```js
135+
opts = { 'binarypath': '/browserstack/BrowserStackLocal' }
136+
```
137+
138+
#### Logfile
139+
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+
To specify the path to file where the logs will be saved -
141+
```js
142+
opts = { 'verbose': 'true', 'logFile': '/browserstack/logs.txt' }
143+
```
144+
60145
----
61146

62147
For more information on WebdriverIO see the [homepage](https://webdriver.io).

0 commit comments

Comments
 (0)