Reputation: 1251
I have configured the following yml file that spins up multiple instances of each node and all nodes booting correctly.
version: "3"
services:
selenium-event-bus:
image: selenium/event-bus:4.0.0-rc-1-prerelease-20210804
container_name: selenium-event-bus
ports:
- "4442:4442"
- "4443:4443"
- "5557:5557"
selenium-sessions:
image: selenium/sessions:4.0.0-rc-1-prerelease-20210804
container_name: selenium-sessions
ports:
- "5556:5556"
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
selenium-session-queue:
image: selenium/session-queue:4.0.0-rc-1-prerelease-20210804
container_name: selenium-session-queue
ports:
- "5559:5559"
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
selenium-distributor:
image: selenium/distributor:4.0.0-rc-1-prerelease-20210804
container_name: selenium-distributor
ports:
- "5553:5553"
depends_on:
- selenium-event-bus
- selenium-sessions
- selenium-session-queue
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_SESSIONS_MAP_HOST=selenium-sessions
- SE_SESSIONS_MAP_PORT=5556
- SE_SESSION_QUEUE_HOST=selenium-session-queue
- SE_SESSION_QUEUE_PORT=5559
selenium-router:
image: selenium/router:4.0.0-rc-1-prerelease-20210804
container_name: selenium-router
ports:
- "4444:4444"
depends_on:
- selenium-distributor
- selenium-sessions
- selenium-session-queue
environment:
- SE_DISTRIBUTOR_HOST=selenium-distributor
- SE_DISTRIBUTOR_PORT=5553
- SE_SESSIONS_MAP_HOST=selenium-sessions
- SE_SESSIONS_MAP_PORT=5556
- SE_SESSION_QUEUE_HOST=selenium-session-queue
- SE_SESSION_QUEUE_PORT=5559
chrome:
image: selenium/node-chrome:4.0.0-rc-1-prerelease-20210804
shm_size: 2gb
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- NODE_MAX_CONCURRENT_SESSIONS=25
ports:
- "6900:5900"
edge:
image: selenium/node-edge:4.0.0-rc-1-prerelease-20210804
shm_size: 2gb
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- NODE_MAX_CONCURRENT_SESSIONS=15
ports:
- "6901:5900"
firefox:
image: selenium/node-firefox:4.0.0-rc-1-prerelease-20210804
shm_size: 2gb
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- NODE_MAX_CONCURRENT_SESSIONS=50
ports:
- "6902:5900"
I would like to increase the concurrency by using this command NODE_MAX_CONCURRENT_SESSIONS
but the Grid portal/UI is not reflecting and all tests are kept in the queue instead.
Any hints to make it parallel for running the tests?
Upvotes: 1
Views: 3306
Reputation: 8676
Currently Selenium developers rework some stuff there and flags are the part of that reworks. The property you are using is not valid any more.
You need to use SE_NODE_MAX_SESSIONS
in order to set up the number of concurrent sessions for your docker container. You would also probably need to set SE_NODE_OVERRIDE_MAX_SESSIONS=true
because the default false
value limits the maximum number of concurrent sessions to number of your cores.
Here I'm trying to keep the up-to date guide to Selenium Grid 4 configuration properties.
Upvotes: 6