Skip to content

Commit a5c1c06

Browse files
committed
Adding docs for NODE_MAX_INSTANCES and NODE_MAX_SESSION, fixes #757
1 parent 2179337 commit a5c1c06

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,33 @@ $ docker run -d -e HUB_HOST=<hub_ip|hub_name> -e REMOTE_HOST="http://node_ip|nod
199199

200200
By default, nodes start with a screen resolution of 1360 x 1020 with a color depth of 24 bits. These settings can be adjusted by specifying `SCREEN_WIDTH`, `SCREEN_HEIGHT` and/or `ENV SCREEN_DEPTH` environmental variables when starting the container.
201201

202+
``` bash
203+
docker run -d -e SCREEN_WIDTH=1366 -e SCREEN_HEIGHT=768 -e SCREEN_DEPTH=12 selenium/standalone-firefox
204+
```
205+
206+
### Increasing the number of browser instances/slots
207+
208+
By default, each image will only allow one slot per container, which is what we recommend as a best practice since all
209+
container resources and variables will be used for that browser, and this helps to have more stable tests.
210+
211+
Nevertheless, if you would like to have more slots per node, this can be configured via environment variables with the
212+
environment variable `NODE_MAX_INSTANCES`. For example, a Firefox node with 5 slots:
213+
214+
``` bash
215+
# Assuming a hub was already started
216+
$ docker run -d -e HUB_HOST=<hub_ip|hub_name> -e NODE_MAX_INSTANCES=5 selenium/node-firefox:3.13.0-boron
217+
```
218+
219+
Don't forget to combine this with the environment variable `NODE_MAX_SESSION`, which sets the maximum amount of tests
220+
that can run at the same time in a node. Following the previous example, if `NODE_MAX_INSTANCES=5`, then `NODE_MAX_SESSION`
221+
should also be at least 5. Full example:
222+
223+
``` bash
224+
# Assuming a hub was already started
225+
$ docker run -d -e HUB_HOST=<hub_ip|hub_name> -e NODE_MAX_INSTANCES=5 -e NODE_MAX_SESSION=5 selenium/node-firefox:3.13.0-boron
226+
```
227+
228+
202229
``` bash
203230
docker run -d -e SCREEN_WIDTH=1366 -e SCREEN_HEIGHT=768 -e SCREEN_DEPTH=12 selenium/standalone-firefox
204231
```

0 commit comments

Comments
 (0)