Tuesday, January 27, 2015

Developing a Web Automation framework using GEB and Groovy

I had extensively worked on Java and developed different types of frameworks depending upon the project requirements. I understand the pain points of developing the framework using Selenium and Java. I also understand it takes a lot of time to develop the framework to start supporting the automation for a particular application. So when I was given a responsibility of automating an application framework using Groovy I came across "GEB" which is a Web automation framework using groovy. It is a wrapper over selenium and provides a lot of in-built utilities that will allow the end user to jump into the job of automating their test-cases and validating their application within a short period.
Geb provides a enhanced Page Object modelling to its users with the advantage of re-usability and maintainability of tests and framework.  Page Object modelling/pattern as you may be knowing divides the areas on the UI under test as classes in the code. All the functionality related to the said area is put onto a class, hence reducing the probability of code duplicity.

Following are few of the advantages of using Geb:
- Uses webdriver as an internal web automation framework which is well tested and used worldwide
-  Uses css as the locating strategy which makes it faster and easy to use.
- Jquery like methods and usage
- Extensive list of in-built utilities that reduces code and time.
- In-built driver manager
- Support for parallel execution.

Its a complete automation framework package that reduces the automation framework development time by almost 2-3 months.
More details on Geb can be found at http://www.gebish.org/