Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium node docker images NODE_MAX_SESSION and NODE_MAX_INSTANCES env variables

I'm using docker compose file from selenium wiki.

For chrome and firefox nodes there are NODE_MAX_SESSION and NODE_MAX_INSTANCES env variables.

Is my understanding correct - there is no difference between configuring NODE_MAX_SESSION or NODE_MAX_INSTANCES for chrome or firefox image as for example chrome node can only start chrome browser and firefox node only firefox browser.

Why do then there are two of them ?

like image 522
marknorkin Avatar asked Nov 28 '25 12:11

marknorkin


2 Answers

NODE_MAX_INSTANCES

NODE_MAX_SESSION

Both needs to be configured for ex :

NODE_MAX_INSTANCES=6 NODE_MAX_SESSION=3 runs a chrome node which can run 6 instances of chrome, and a max parallelization of 3

Hope that answers your question

like image 198
sanath meti Avatar answered Nov 30 '25 05:11

sanath meti


As the official docs tell, we need both, if you plan sets the maximum amount of tests that can run at the same time in a node, so:

By default, each image will only allow one slot per container,...this can be configured via environment variables with the environment variable NODE_MAX_INSTANCES. Don't forget to combine this with the environment variable NODE_MAX_SESSION

like image 39
storenth Avatar answered Nov 30 '25 04:11

storenth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!