Skip to content
sriv edited this page May 10, 2017 · 4 revisions

Gauge Setup

Gauge can be installed by

Building from source

Prerequisite Tools

Ensure golang dev environment is setup. GOPATH environment variable should be set. Add $GOPATH/bin to $PATH

  • Clone the gauge repository to $GOPATH/src/github.com/getgauge/gauge

  • Gauge uses submodules. So issue the following commands before you attempt to build

  git submodule init
  git submodule update
  • Gauge uses godep to manage Go dependencies. Install godep by running
go get github.com/tools/godep
  • To fetch all dependencies, in the gauge repository run
go get github.com/tools/godep
godep restore

Building

go run build/make.go

This will generate gauge in the bin directory

Running Tests

go test -v ./...

or

go run build/make.go --test

With Test coverage

go run build/make.go --test --coverage

Installing

MacOS and Linux

go run build/make.go --install

This installs gauge into /usr/local by default. To install into a custom location use a prefix for installation

go run build/make.go --install --prefix CUSTOM_PATH

Windows

go run build\make.go --install --prefix CUSTOM_PATH

Set environment variable GAUGE_ROOT to the CUSTOM_PATH

Initializing a project

In an empty directory initialize a gauge project based on required language.

gauge --init java

For a gauge ruby project

gauge --init ruby

Executing Specifications

Inside the project directory

To execute all specifications:

gauge specs/

To execute a single specification:

gauge specs/hello_world.spec

To execute a single scenario of a specification:

gauge specs/hello_world.spec:2

where 2 is index of scenario to be executed

Plugins Setup

Below are the type of plugins present in Gauge :

Language Plugins

Refer to individual project README for instruction to setup, build and test the plugins.

Reporting Plugins

Refer to individual project README for instruction to setup, build and test the plugins.

Documentation Plugins

Spectacle

Refer to individual project README for instruction to setup, build and test the plugins.

IDE Plugins

Intellij IDEA

This plugin helps to create and execute Gauge project in IntelliJ.

Refer to the Dev Guide and for pointers and instructions.

Visual Studio

[TODO]