Installation

This page provides information about installing Gauge. If you are new to Gauge, we recommend that you refer to the Getting Started guide.

Install Gauge for your OS (Operating System)

You can install Gauge on your OS by using the package managers or certain commands for that particular OS. Alternately, for some of the Operating Systems, you can also install Gauge by downloading the latest Gauge release to a location on your system.
Both the methods are listed on this page, you can choose whatever suits your requirements.

Windows

Gauge can be installed by using Chocolatey .

Install Gauge at the command line prompt of your OS by using the following command:

choco install gauge

macOS

Install Gauge by using Homebrew.

brew update
brew install gauge

Note

If Gauge installation fails, upgrade Homebrew to the latest version and install Gauge again.

Debian/APT

You can install Gauge on any flavour of Linux by using the shell script.

Use the following steps to perform a quick install on a Linux system.

  1. Add Gauge’s GPG key by using the following command:
sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-keys 023EDB0B
  1. Add Gauge to the repository list by using the following command:
echo deb https://dl.bintray.com/gauge/gauge-deb nightly main | sudo tee -a /etc/apt/sources.list
  1. Install Gauge by using the following command:
sudo apt-get update
sudo apt-get install gauge

YUM/DNF

You can install Gauge on any flavour of Linux by using the shell script.

Install Gauge by using the following command:

echo -e "[gauge-stable]\nname=gauge-stable\nbaseurl=http://dl.bintray.com/gauge/gauge-rpm/gauge-stable\ngpgcheck=0\nenabled=1" | sudo tee /etc/yum.repos.d/gauge-stable.repo
sudo dnf install gauge

Freebsd

Download the latest Gauge release and then run the following command:

unzip -o gauge-1.0.5-freebsd.x86_64.zip -d /usr/local/bin

Curl

Install Gauge to /usr/local/bin by using the following command:

curl -SsL https://downloads.gauge.org/stable | sh

Or

Install Gauge to a location of your choice on your system by using the following command:

curl -SsL https://downloads.gauge.org/stable | sh -s -- --location=[custom path]

[custom path]: location of your choice on your system

NPM

Install Gauge by using the following command:

npm install -g @getgauge/cli

Note

Gauge automatically sends telemetry data to help us improve the product. If you prefer not to have this data sent, you can choose to turn off the telemetry by using the gauge telemetry off command. For more information about the gauge telemetry commands, see the man page.

Alternately, you could also choose to install Gauge on your system by downloading the latest Gauge release from GitHub to a location on your system.

Windows

Download the latest Gauge release and then run the following command in PowerShell:

PS> Expand-Archive -Path gauge-1.0.5-windows.x86_64.zip -DestinationPath [custom_path]

[custom_path] - a location of your choice on your system

For more information about PowerShell commands, see the appropriate PowerShell documentation.

macOS

For signed binaries, download the latest Gauge release and the run following command:

unzip -o gauge-1.0.5-darwin.x86_64.zip -d /usr/local/bin

Debian/APT

You can install Gauge on any flavour of Linux by using the shell script.

Download the latest Gauge release and then run following command:

unzip -o gauge-1.0.5-linux.x86_64.zip -d /usr/local/bin

YUM/DNF

You can install Gauge on any flavour of Linux by using the shell script.

Download the latest Gauge release and then run the following command:

unzip -o gauge-1.0.5-linux.x86_64.zip -d /usr/local/bin

Nightly releases

Nightly releases are latest development snapshots of Gauge. If you choose to install the nightly releases, you can find the latest version of Gauge nightly releases here.

Attention

Nightly releases include latest features of Gauge, which are under development, hence the release can be unstable.

Installing nightly releases on Linux systems

To install nightly releases on Linux systems, perform the following steps:

  1. Create /etc/yum.repos.d/gauge-nightly.repo by using the following commands:
[gauge-nightly]
name=gauge-nightly
baseurl=http://dl.bintray.com/gauge/gauge-rpm/gauge-nightly
gpgcheck=0
enabled=1

Alternately, you can also use the following command to create /etc/yum.repos.d/gauge-nightly.repo in a single step:

echo -e "[gauge-nightly]\nname=gauge-nightly\nbaseurl=http://dl.bintray.com/gauge/gauge-rpm/gauge-nightly\ngpgcheck=0\nenabled=1" | sudo tee /etc/yum.repos.d/gauge-nightly.repo
  1. Install Gauge by using yum or dnf.
sudo yum install gauge
sudo dnf install gauge

Note

If you choose to install plugins that are supported by Gauge, see Install Plugins.

Verify paths after Gauge Installation

Postrequisite

After installing Gauge on your system, you must verify the location at which Gauge and Gauge plugins are installed.

Windows

Ensure the following:

  • The default installation location of Gauge is %ProgramFiles%\gauge.
  • gauge_install_location\bin must be in PATH to run from the command line.
  • If you have installed plugins, then Gauge plugins are installed at %APPDATA%\gauge\plugins directory.
  • %APPDATA% directory is located at C:\Users\USER_NAME\AppData\Roaming.

macOS

Ensure the following:

  • The default installation location of Gauge is /usr/local/.
  • usr/local/bin/ or [custom_install_location]/bin must be in PATH.
  • If you have installed plugins, then Gauge plugins are installed under ~/.gauge/plugins directory.

[custom_install_location] - a location of your choice on your system

Debian/APT

Ensure the following:

  • The default installation location of Gauge is /usr/local/.
  • usr/local/bin/ or [custom_install_location]/bin must be in PATH.
  • If you have installed plugins, then Gauge plugins are installed under ~/.gauge/plugins directory.

[custom_install_location] - a location of your choice on your system

YUM/DNF

Ensure the following:

  • The default installation location of Gauge is /usr/local/.
  • usr/local/bin/ or [custom_install_location]/bin must be in PATH.
  • If you have installed plugins, then Gauge plugins are installed under ~/.gauge/plugins directory.

[custom_install_location] - a location of your choice on your system

Project Templates

Gauge hosts a list of project templates to help you set up specific type of projects depending on the language of your tests.

Run the following command to see the list of updated available templates:

gauge init --templates

Uninstall Gauge for your OS

Prerequisite

Remove the Plugins before uninstalling Gauge. For information about removing plugins, see Uninstall Plugins.

While uninstalling Gauge, you must remove the Gauge folder (~/.gauge in Mac/Linux and in %APPDATA%Gauge in windows) manually. This folder contains Gauge config, logs and plugins.

Windows

Uninstall Gauge by using Chocolatey .

choco uninstall gauge

macOS

Uninstall Gauge by using HomeBrew .

brew uninstall gauge

Debian/APT

Uninstall Gauge by using the apt-get command:

sudo apt-get remove gauge

YUM/DNF

You can uninstall Gauge in one of the following ways:

Uninstall by using yum.

yum remove gauge

OR

Uninstall by using dnf.

dnf remove gauge

Freebsd

Delete the Gauge files from the installed location.

Curl

Delete the Gauge files from the installed location.

NPM

Uninstall Gauge by using npm.

npm uninstall -g @getgauge/cli

Note

If you have installed Gauge on your system by downloading the Gauge release from GitHub, then delete the Gauge files from the installed location.

Logs

  • Gauge logs are created in the logs directory in the Gauge project.
  • Three log files are created
    • gauge.log - This log file contains information about test execution.
    • api.log - This log file contains information about Gauge core API that are exposed for plugins.
    • lsp.log - This log file contains information about Gauge when Gauge is launched in LSP (Language Server Protocol) mode.
  • To customize logs directory, set the logs_directory property in the env/default/default.properties file to a custom logs directory path.
logs_directory = my_logs_dir
  • For non-project specific actions such as plugin installation, log files are created in the following location:
Windows - %APPDATA%\gauge\logs
MacOS*  - <user_home>/.gauge/logs
Linux   - <user_home>/.gauge/logs