LambdaTest Community

Find answers, support, and inspiration from other users

LambdaTest Community

How do I install and setup Gauge framework for automation testing with Selenium?

Can anyone please give me a step by step by step tutorial on how do I install and setup Gauge framework for automation testing with Selenium.

Up Vote Down Vote 0 Votes
Posted 4 months ago


Here are few steps that you can follow to install and setup Gauge framework for automation testing with Selenium according to your OS:

Installing Gauge Framework in Mac:

Installing Gauge framework in macOS using Homebrew with below commands:

  • brew update
  • brew install gauge.

Installing Gauge Framework in Linux using apt-get:

  1. Add GPG key with below command:

sudo apt-key adv --keyserver hkp:// --recv-keys 023EDB0B

  1. Add Gauge framework repository to the list.
echo deb nightly main | sudo tee -a /etc/apt/sources.list

3.Install Gauge framework with below commands:sudo

apt-get updatesudo apt-get install gauge

Installing Gauge Framework in Windows:

Complete the installation of required packages of programming languages. It works with all languageslike JavaScript, C#, Java, Python and Ruby.

Extract it to a desired location and add it to system path.

Using CLI to get started with Project Creation for Gauge

To verify the version of the Gauge framework, open cmd and type command “gauge --version” as shown in the image below.

Step 1: Gauge framework has a list of project templates defined already for the language of your need. You can take a look at it by typing in command “gauge init --templates”.

Step 2: Navigate to a folder of your choice and create a java project using command “gauge init java”.

Step 3: To run the sample project and view report you can use the command “gauge run specs”.

As you can see the path to report generated in CLI(Command Line Interface), sample report generated for the test stub executed is as below.

Creating Your First Project Using Gauge For Test Automation

As we have made use of command line till now, for a better coding experience we can make use of IntelliJ IDE to create our first script. Start with creating a maven project with below information.

  • Navigate to File and select New Project.
  • Project Type as maven should be selected.
  • You need to select the below mentioned name:
  • “com.thoughtworks.gauge.maven:gauge-maven-plugin”
  • This would help you to generate an archetype.
  • If you don’t see the archetype mentioned above, add Archetype by entering below info.
  • GroupId: “com.thoughtworks.gauge.maven:
  • ArtifactId: “gauge-archetype-java”
  • After selecting the archetype, you need to click on next. By doing so, you will be providing the Artifact ID & GroupID for your respective maven project.
  • GroupId: com.thoughtworks.gauge.maven
  • ArtifactId: GoogleSearchProject
  • Version: 1.0-SNAPSHOT
  • Before you click on next for finishing the process, make sure that you verify the Maven settings thoroughly. Once you have successfully created a project it would look something as below.

Up Vote Down Vote 0 Votes
Posted 3 months ago
1 Answer
4 months ago