Automation Testing

Test Automation Using the Gauge Framework

By Test Guild
  • Share:
Join the Guild for FREE
Gauge Framework

I’m always on the lookout for new test automation frameworks. I think too often automation engineers start from scratch without looking for open source solutions already available that they can leverage to save some time. That’s why I created the post Six Open-Source Test Automation Frameworks You Need to Know.

Although the Gauge framework was listed as one of the six open-source automation frameworks, I’d like to take a deeper look at it here.

What is the Gauge Test Automation Framework?

Gauge is a test automation solution that's being built by ThoughtWorks; it's cross-platform and open-source. It supports multiple languages including Ruby, Java, C#, Python and Javascript, and it has upcoming support for other languages — like Golang — as well.

Many folks, from both the gauge community and the core team at Thoughtworks contribute to Gauge. This can be seen by the number of plugins that come along with Gauge — like things for helping with report generations and dependency managements.

Gauge Works with Selenium

Gauge also works with Selenium WebDriver. If you're from the testing industry, you’re undoubtedly familiar with WebDriver; it's a standard, browser-driving library that lots of folks use for testing web applications.

So you can use a combination of Gauge and WebDriver to build test automation solutions, like creating a cross browser testing suite.

Gauge also allows you to create test “specifications” that are written in an English-like syntax, making tests easy to read and create. The specification concept should be familiar to folks who have used Behavior Driven Development (BDD) using Gerkin.

This is what a sample test written in a Gauge test specification looks like:

gaugespecificationgaugespecification

These Gauge specifications act like a business layer for your automated test scripts.

Benefits of Using Gauge Framework for Test Automation

Gauge gives you a business layer on top of your test scripts to make them more readable and more understandable.

For example, if you create a test using Java, Gauge will be the business layer on top of it. Your test requirements can then be captured in a way that allows everyone on your team (including non-technical folks) that don’t know Java can understand what the test is doing.

Gauge not only offers plugins for Java, but for a bunch of other languages you can check out on the Gauge Plugins page. Even cooler is that if you don’t see a plugin that meets your needs you can simply create your own using the Gauge Plugin API.

gaugeplugins

As you can see, Gauge also offers many IDE integrations like IntelliJ and Eclipse. The IDE plugin that comes with Gauge also gives you a bunch of useful features that will be required for you to write your test scripts in Gauge.

Gauge is CI-Ready

With Gauge, you don't necessarily have to run your test specifications from an IDE like IntelliJ because it also has a first-class command line support that allows you to integrate it with a continuous integration system like Jenkins.

Key Features of Gauge Framework

Other reasons why you might choose Gauge for building your automation testing scripts is that it provides some powerful features, like parallelization and managing amendments seamlessly. It makes a very simple tool build, and maintains the suite as it grows.

Some other features you get when automating using Gauge are:

  • An easy -to-use, flexible syntax
  • Tests that are created using a business-like language
  • Support for all kinds of platforms and languages
  • A ton of plugins
  • Support for external data sources
  • All this awesomeness is open source

Running Automated Tests in Parallel

Another very powerful feature of Gauge, which I mentioned previously, is parallel execution. This makes a lot of things simpler for us, especially when running a large suite of acceptance tests that run against a web application. This typically tends to take more time, and parallelization can really help reduce that build time, the time from a check-in to be able to deploy quicker and have faster turnaround times for bugs and features. Gauge actually has a parallel execution feature built in, so it's very, very simple to run specs in parallel.

Furthermore, Gauge can easily generate HTML reports through a report plugin that can generate for each parallel execution. You don't have to worry about any sort of report manipulation, etc., because it has in-built parallelization capabilities.

How to Start Automating Using Gauge

So far we’ve covered some of the main reasons why you might want to use the Gauge framework, but what if you want to get started learning how to use gauge? Well, you’re in luck.

One of the sessions you’ll have access to this year at the online Automation Guild conference is a hands-on demo on How to Get Started Doing Cross-Browser Testing with Gauge and Selenium WebDriver presented by Prateek Baheti, a developer at ThoughtWorks.

jan-9-13

Register now for this must-see session as well as 25 other sessions revealing all kinds of ways to help you create automation awesomeness in the New Year.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

SafeTest: Next Generation Testing Framework from Netflix

Posted on 03/26/2024

When you think of Netflix the last thing you probably think about is ...

Top Free Automation Tools for Testing Desktop Applications (2024)

Posted on 03/24/2024

While many testers only focus on browser automation there is still a need ...

Bridging the Gap Between Manual and Automated Testing

Posted on 03/13/2024

There are some testers who say there’s no such thing as manual and ...