Skip to content
Nehashri edited this page Feb 22, 2019 · 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

Fetch all dependencies using

  go get ./...

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

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 :

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