Cross Platform Gauge Installation
Installing Gauge for Windows, MacOS and Linux platforms
Published in
3 min readNov 25, 2018
Introduction to Gauge
Gauge is the Behavior Driven Test Automation framework developed by ThoughtWorks.Inc, pioneers of Selenium. This enables automation engineers to develop automation frameworks and accelerate the software development process.
Advantages of Gauge Framework
Some of the key advantages of Gauge are listed below.
- Unique steps with no keywords (No duplicate steps)
Here we will only need to develop one step implementation once and that will be available across the whole project. - Data stores
This is one of the coolest features in Gauge which can be used to keep the data between the steps inside a scenario or keeping data within the scenarios at the run-time. - Customized and effective reporting mechanism with several report types
Gauge will be providing a live test execution report which is very unique to Gauge and that will help us to identify the failures without keep waiting until the execution is completed. In addition to that, Gauge will be providing the test execution report in HTML, XML and JSON formats. - Plug and play architecture
We can easily integrate anything with Gauge. As of now we have successfully integrated Selenium, Rest Assured, Appium and AutoIt. - Parallel test execution
We can easily define the number of threads to parallel run the tests. - Multi-platform support
Gauge is platform independent. We can use it with any platform. (Windows, Ubuntu or Mac OS) - Multi-language support
Supports widely using programming languages Java, Python, C#, Ruby, JavaScript. - Tagged test execution
Allows the running of specific tests providing tag(s) name in specs or scenarios separately (without running the entire tests), which is handy when running a regression test on a specific module after a bug fix. - Free and open source
Gauge is a free and open source framework where we can contribute via github for the new features and bug fixes. Also we can get support through their gitter chat room. - Adaptability
We will need only a little guidance to work with Gauge because of its usability and framework capabilities. If the step definitions are implemented, even a non technical person can design tests using Markdown syntax which is very much similar to the business language.
Pre Requisites
- Java
- Maven
How to Install Gauge Core
On Windows
- Install Chocolatey by executing the following command.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- Install Gauge by executing the following command.
choco install gauge
On MacOS
- Update Homebrew.
brew update
- Install Gauge using Homebrew.
brew install gauge
On Linux
- First, add Gauge’s GPG key with this command.
sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-keys 023EDB0B
- Then add Gauge to the repository list using this command.
echo deb https://dl.bintray.com/gauge/gauge-deb nightly main | sudo tee -a /etc/apt/sources.list
- Finally, install Gauge using these commands.
sudo apt-get update
sudo apt-get install gauge
How to Install Gauge Plugins
- Open Command Prompt and execute following commands.
gauge install java
gauge install html-report
gauge install json-report
gauge install xml-report
gauge install spectacle
gauge install flash
- You can check the installation using the following command.
gauge -v
- If the installation is success, it will output like this:
Gauge version: <version number>
Commit Hash: <commit code>Plugins
-------
flash (<version number>)
html-report (<version number>)
java (<version number>)
json-report (<version number>)
spectacle (<version number>)
xml-report (<version number>)
Happy Automation !!!