Running your Automated Tests in parallel is very important. How you can run these tests on up and running own designed Test environment is very simple and practical using Selenium Grid. Firefox and Chrome’s latest updates are also an important part, which should be kept into consideration that you are running your scripts on the actual browser versions. All you can achieve with some basic configurations.
1- Create a file docker-compose.yml
2- Run the following command
‘docker-compose -f docker-compose.yml up -d’
This command will fetch the necessary Chrome and Firefox images if not present locally and will create a default Selenium Grid with one Chrome and one Firefox node.
Execute the command to check the up and running containers of selenium/hub and its Chrome and Firefox containers.
Now, if you want to scale this Selenium Grid for multiple Chrome and Firefox nodes. You can do using following two commands:
docker-compose -f docker-compose.yml scale chrome=25
docker-compose -f docker-compose.yml scale firefox=25
I have extended the existing Grid with 25 Chrome Instances and 25 Firefox instances. You can check the grid using the following URL.
Or if it’s local machine then browse the following URL:
Use the above stated URL’s to navigate your tests to run on selenium grid. Here is the final look of Selenium Grid:
Firefox 89.* is the current actual version at the time of writing this article and Chrome is supporting 91.*. If you want always to fetch the latest image then use the tag latest in your docker-compose. always, latest Selenium Hub image will be fetched.
I hope you have enjoyed this article. If you have any confusion in understanding, drop a comment. I will try to answer.