Problem Statement – How to build a framework and put it in CI/CD for a project which has multiple layers of configuration and levels of features in Selenium and host it on our own infrastructure ?
Traditional Approach – Selenium has been used in the industry extensively but there are many features of Selenium suits which companies often do not experiment with.
While creating a Framework we have to keep in mind the objective , ease of understanding and optimized
use of code to replicate the expected requirements.
Widely Selenium is used as a framework in one of the programming languages of the resources type like Java, Python etc and pushed to the repo and via the repo its triggered through jenkins or its run on any third party infrastructure which often is considered as a solution where teams have less stress of maintaining the pipeline and keep expanding the coverage.
Kapture’s Approach – While thinking of a framework that can suffice the use of automation for projects which have multiple levels of use cases and different levels of configuration often stands out as a bottleneck.
1) Framework – The selection of remote web driver makes it easier to run the tests on servers rather than running it on chromedriver or any other browser driver as it makes it tough and adds a step to zip the package and maintain the versions of right browsers. Remote web drivers made it easy to run it on servers and from the day of executing code it became easy to integrate it to pipeline and host it on servers.
2) Use of Selenium Grid – Selenium grid gives the freedom to run the parallel tests and using test.xml files configured on your srs code makes it easy to run the tests in parallel and easy to run the scripts on any expected drivers configured in the grid.
3) Self hosted Infra on kubernetes – To save and have control over the infra we took help of kubernetes and hosted our scripts on 4 different nodes for every created session to prevent the downtime,Maintenance and control over the change impacts.
4) Reporting on Allure – When it comes to the overall execution of results , we integrated Allure Reporting to our suites for overall run results , failure RCA and capture time constraint of the tests based on categories, trends , history and past results with time taken to cover each step of the execution.
Business Impact
In any company QA plays an important role in testing the product , Maintaining and shipping it in a seamless and optimized way. This significant step can help in shipping things at a rapid speed with supreme quality and less maintenance.
All the things in this setup are open source and under QA teams control for fixing and debugging in case of failures and extending the code coverage to a level where no manual intervention is required when it comes to releases.