CAPABILITY GENERATOR

LambdaTest DocumentationAutomation Testing ● Running Gauge Tests On LambdaTest Selenium Grid

Running Gauge Tests On LambdaTest Selenium Grid


The creators of Selenium, Thoughtworks came up with another open-source test framework for handling test automation of web-applications and they named it Gauge. The Gauge framework helps you to do more acceptance testing with less involvement of code. Like Selenium, Gauge also offers support for various languages such as JavaScript, C#, Ruby, Python, and Java. This document will help you execute your Gauge automation testing script in Java, over the LambdaTest Selenium Grid.

Prerequisites For Gauge Automation Testing


  • Install Maven.
  • Gauge plugin must be configured with your IDE or Gauge must be installled if you are running test from CMD/Terminal.
  • Make sure you have Java installed in your system. We recommend installing Java 8 or above version for more stable execution.
  • LambdaTest Authentication Credentials
  • You will need your LambdaTest authentication credentials i.e. your LambdaTest username, access key and HubURL. You need to set them up as your environment variables. You can retrieve them from your LambdaTest automation dashboard by clicking on the key icon near the help button.

    • For Linux/Mac:
    • For Windows:

  • Clone LambdaTest GitHub repository for Gauge framework.

Note: You can also mention your LambdaTest credentials in env/default.properties file.

Executing Your First Gauge Script On LambdaTest


Step 1: Navigate to the LambdaTest Gauge cloned directory.

Step 2: Compile Maven dependencies. Using the below command.

Note: You may also want to run the command below to check for outdated dependencies. Please be sure to verify and review updates before editing your pom.xml file. The updated packages may or may not be compatible with your code.

Test Scenario: Go to Google and search for LambdaTest login. After that, verify the page title.

Step 3: Navigate to the cloned gauge-selenium-sample and run either of the following commands in cmd/ terminal:

Or

Testing Locally Hosted Pages Using Gauge Framework


LambdaTest offers an SSH(Secure Shell) tunnel that helps you build a unique and secure connection between your system and our cloud servers so you could perform cross browser testing over your locally hosted web applications. We call it the Lambda Tunnel.

OS-specific instructions to download and set up Lambda Tunnel binary can be found at the following links:

To execute automated browser testing using the LambdaTunnel you need to set the tunnel flag to true as your desired capabilities. You can set tunnel to true by adding the below capabilities in env/[browser]/lambdatest.properties file:

Note: If you wish to change your desired capabilities then you can leverage our Desired Capabilities Generator.

Parallel Testing With Gauge Framework


LambdaTest GitHub repository for Gauge framework will help you run parallel testing over our online Selenium Grid. If you look at the cloned repository, you will find the below code for another test scenario.

Test Scenario 2: Open the sample Todo App. Select the desired items and add new item “Yay, we using the Gauge Framework”.

Navigate to the cloned gauge-selenium-sample and run either of the following commands in cmd/ terminal:

Or

Kudos! That is all you need to know to learn Gauge automation scripts on LambdaTest online Selenium Grid. In case you have an questions feel to let us know. You can drop a message to our 24/7 customer chat support, or you could mail them to us over support@lambdatest.com. Happy testing! 🙂