Wednesday 23 February 2022

How to Deploy Selenium grid on Google Cloud Platform using Kubernetes and Helm

                                          



                                        It is a open secret that Selenium Grid maintenance is a nightmare in an era where you see a frequent upgrades to browsers and corresponding drivers. No sooner the usage of automation framework / selenium grid increases, scalability and maintenance becomes a challenge. To address such issues, we do have solutions based on dockers, docker swarm etc. Having said that, there are some caveats in scaling, managing container health etc.

Below solution would try to address most of them. Major chunks of the solution include Selenium, Zalenium, Docker, Kubernetes and Google Cloud Platform.

This article would outline the process of deploying Selenium grid(Zalenium) on Google cloud platform using Kubernetes and Helm.

What do we achieve with this setup..?

  • Scalability: GCP/GKE can scale the nodes and pods as per the given configuration.
  • Visibility: Zalenium provides a feature to view the live executions on the containers.
  • Availability: GKE kubernetes cluster makes selenium grid available all the time.
  • Maintenance: Low maintenance as the containers are destroyed after each execution.

Pre-requisites:

  • An active Google Cloud Platform account
  • Enable Kubernetes engine by setting up a Billing Account.

Friday 18 February 2022

How to setup Selenium Grid using Docker Desktop - Windows

                            Selenium Grid has made the test automation execution much faster and smarter. The excessive usage of selenium grid has its own hitches like too much of system resource utilization, all browsers to be installed on the system etc. 

With the introduction of docker images for selenium, made the life of testers lot easier. Out of multiple ways to bring up selenium grid with docker, I would choose the simple & quick way to bring up using docker-compose.

Pre-requisite: Docker desktop for windows is installed.


Steps to bring up Selenium Grid:

  • Pull required version of selenium hub and nodes using the command "docker pull" as below

         docker pull selenium/node-chrome-debug:3.141.59 

  • Create a yaml file with the below docker-compose instructions.
docker-compose file

  • run the command 
         docker-compose -f docker-compose.yml up -d