Image Blog Gauge the New Cross Browser Testing Framework
April 20, 2018

Get to Know Gauge, the New Cross-Browser Testing Framework

Mobile Application Testing

You have plenty of options for testing frameworks. There is a new cross-browser testing framework gaining adoption in the community: Gauge, a framework sponsored by ThoughtWorks. It's been attracting significant attention and gaining traction in a testing community typically dominated by Cucumber framework and Selenium.

While both Cucumber and Selenium have been around for years and are currently the preferred testing frameworks for agile teams, we are finding that more teams are adopting Gauge throughout the DevOps pipeline.

So is there room in the market for another framework? Are there benefits for a Development Manager, a Developer or a Test Engineer? How can you test across browsers with Gauge and Perfecto?


About Gauge

  1. What is Gauge? It is a new BDD (behavior driven development) based test framework.
  2. How does it work? Gauge seamlessly integrates with IDEs (i.e. IntelliJ) and CI servers (i.e. Jenkins) for cross functional team collaboration and continuous testing throughout the DevOPS cycle.
  3. What is unique about Gauge? It offers simple but sophisticated code that is written in languages such as Java. It is also simple to setup, customize and expand, has a clear and logical step/scenario construct, is fast to execute tests and it offers abstraction mechanisms.


Why There is a Market for the Gauge Framework

  1. Allows both skilled developers and non-developers to utilize it due to its simplicity for authoring, managing and executing tests
  2. Allows testing teams to find and fix a bug right before release vs. releases with a bug or delaying releases
  3. Testing can be ready before coding > the realization of agile and the shift left movement


Benefits for a Development Manager

  1. Introducing stable & scalable test scripts early in the sprint
  2. Innovate faster and test coverage can expand
  3. Empowers the rest of the team to help
  4. Streamlines process – more efficient and productive - hopefully eliminating late-discovered defects resulting in delaying launch or launching with a defect


Benefits for Developers

  1. Gain insight into defects as they generate code
  2. Their time is being used to match their skill level
  3. Full synchronization around product requirements across the board (QA, Business & Dev)


How to use the Perfecto Cloud Platform with the Gauge Framework

Perfecto’s cloud platform, consisting of real mobile devices and virtualized desktop browsers located in global locations, is easily extensible and is integrated with various open source frameworks. In fact, Perfecto endorses its own open source framework, Quantum.

Integrating Gauge with Perfecto offers testing of any browser in a cloud environment. A typical tester would struggle to have scalable access to all operating systems, browsers and browser versions used by end users. Furthermore, testers need to test beta versions of browsers as occasionally those include significant changes coming soon to production. Perfecto’s cloud offers exactly that: a variety of environments offered in enterprise-grade in clear and ready fashion, such that scalable amounts of concurrent tests can execute in a stable manner with predictable outcomes.

Integration strategy: A new class is introduced, called “Perfecto Helper”. Inside that class there’s a static RemoteWebDriver and a ReportiumClient. Those are created on the initiation of each specification. In terms of managing test status, each test class (Java) should start the test as part of the Java class constructor:

* Note that it is possible to customize the test name and add tags. it is also recommended to capture exceptions and pass those to the ReportiumClient, as below:]

public void GoogleTest() {

DriverFactory.getReportiumClient().testStart(“Example Perfecto Gauge Google Test”, new TestContext(“Google”, “Gauge”));


@Step(“On the homepage”)

public void navigateToHomePage() {

try {


} catch (Exception e) {





private void setTestResultFailed(Exception e){




PerfectoHelper represents a new driver based on the following parameters:

Gauge Slide

*Optional parameters. Their default value is defined in env/default/ and their value is as shown in the example.

Running the first time:

  • Enter your Perfecto cloud, username and security token into env/default/
  • Right click “GoogleTest.spec” and select “Run”
  • The test should run in Perfecto
  • You should see a line in the console “Report URL:” with a link to the report in Perfecto, which you can open separately.

Now that you’ve run a single test, you can run two specs by selecting the folder “specs”, right click and run. Note that the tests will run serially.

Customizing the environments: Testers can override one or more of these parameters either by modifying the values in, or creating a new folder under env/<name> and adding a .properties file under it. You only need to define the parameters you want to override; the rest will use the default values. If you’re using IntelliJ, you can also define variables in Run->Edit configurations.

To execute tests using a specific configuration (also called ”environment”), go to Run->Edit configurations, in “Environment” box enter the name of the folder under env you customized.

To get started with Gauge and Perefcto, please refer to the GIT repository.


  • It appears that inside IntelliJ it is impossible to run more than one environment simultaneously. This can probably done from your CI tool.
  • It also appears that Gauge does not support safe parallel execution of specs inside IntelliJ, since the driver is static and needs to be shared between the scripts. Same comment about the CI tool applies.


Summing It All Up

Gauge came into the testing framework community about a year ago and they continue to make a significant impact on the way teams are testing. It offers many benefits for agile teams throughout the DevOps process, including ease of use and immediate feedback.

Gauge is still relatively new, and as a result, the open source community continues to improve upon it every day. Overall, Gauge is here to stay and here at Perfecto, we are happy about it.

Learn more about Gauge and the Perfecto platform.

Perfecto Platform