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 the Gauge testing framework 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 Testing Framework

  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.
Gauge

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

Running the first time:

  • Enter your Perfecto cloud, username and security token into env/default/default.properties
  • 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 default.properties, 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.

Limitations:

  • 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