This page lists FAQs (Frequently Asked Questions) about installing Gauge, running a Gauge specification (spec), configuring Gauge, language runners used with Gauge, and using text editors while writing a Gauge spec. To understand these concepts, see Gauge Documentation.
Where is the Gauge executable installed by default?
What is the order of execution of scenarios in a specification?
Why we cannot skip all tests dynamically during a gauge run if there is a test failure?
Where does gauge log the test execution output. warnings, validation results etc
Where can I find gauge API logs for debugging IDE plugins
How can I customize the log directory location
Where does gauge non project specific logs like plugin installation etc.
How to change/rename default step implementation(step_impl) directory
If you have any questions that are not answered you can get help from our Github.
%ProgramFiles%\gauge\bin
/usr/local/bin
/usr/local/bin
%APPDATA%\gauge\plugins
~/.gauge/plugins
~/.gauge/plugins
GAUGE_HOME
environment variable can be used to customize config files and plugins installation location.
Download the plugin’s zip file from github release and install the plugin by using the -f
flag.
gauge install <plugin_name> -f <path_to_gauge_csharp_zip_file>
Note
Gauge specific properties are stored in gauge.properties
under gauge configuration folder. Refer to Gauge Properties.
By setting
runner_connection_timeout = 3000
The scenarios should execute in the order they are specified when running in serial mode. But, when executed in parallel or when a scenario/specification uses a data table (data driven tests), all scenarios are parallelized and hence there will not be any order maintained.
We suggest that scenarios should be independent of each other.
If execution of a step fails, that step is marked as failed and execution of further steps in that scenario will be skipped and the execution of the next scenario begins. This is done because we encourage scenarios to be independent of each other.
You’ll find the logged at logs/gauge.log
in your projects directory.
Note
logs
is the default location for log files. This can be changed using logs_directory
in project’s properties.
You’ll find that at logs/api.log
in your projects directory.
Note
logs
is the default location for log files. This can be changed using logs_directory
in project’s properties.
You can specify a custom directory by changing the logs_directory
property under
env/default/default.properties
Refer to project’s properties.
logs_directory = my_custom_log_directory
%APPDATA%\gauge\logs
~/.gauge/logs
~/.gauge/logs
Remove the Plugins before uninstalling Gauge. For information about removing plugins, see Uninstall Plugins.
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.
Uninstall Gauge by using Chocolatey .
choco uninstall gauge
Uninstall Gauge by using HomeBrew .
brew uninstall gauge
Uninstall Gauge by using the apt-get command:
sudo apt-get remove gauge
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
Delete the Gauge files from the installed location.
Delete the Gauge files from the installed location.
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.
gauge-js supports debugging your test implementation code using node-inspector.
Requirements
Ensure you have the latest Chrome browser and node-inspector installed. Please consult the node-inspector documentation for installation instructions. Ensure that the binaries node-debug and node-inspector are available on PATH. Starting gauge-js with debugger You can do either of these:
Set the DEBUG key to true in env/<env-name>/js.properties file in your gauge project. Set the environment variable DEBUG=true when calling gauge. Like: DEBUG=true gauge specs/. This needs gauge v0.3.2 or newer.
How it works
Setting the debug option will launch the runner code through node-debug. It will start node-inspector, launch Chrome DevTools and pause on the first line of execution. You will need to continue execution to let gauge carry on with its execution.
You can set debugger; inside step implementation or hook callbacks to pause execution in the debugger. This retains the gauge context and gives you a full blown debugger to debug your test implementations.
Example:
gauge.step("There are <num> vowels.", function (num) {
debugger;
assert.equal(num, 5);
});
This will pause the debugger when this step’s callback is executed by gauge-js.
Caveats
The debugger exposes entire gauge-js runner code. You need to be quick enough to hit continue in the browser when node-inspector launches. If this takes too long, gauge will timeout connecting to the API. A workaround for this is to increase the runner_connection_timeout property to an acceptable value.
step_impl
) directory¶Create python.properties
file in the <PROJECT_DIR>/env/default
directory and add the following line to it.
STEP_IMPL_DIR = PATH_TO_STEP_IMPLEMENTATION_DIR
Note
The path specified in STEP_IMPL_DIR
property should be relative to project root.
By default the language runner uses python
command to run specs. To change the default behaviour, add GAUGE_PYTHON_COMMAND
property to the python.properties
file in the <PROJECT_DIR>/env/default
directory.
GAUGE_PYTHON_COMMAND = <python_command>
GAUGE_PYTHON_COMMAND = python3
GAUGE_PYTHON_COMMAND = python2
Gauge-Python supports debugging your test implementation code using pbd.
import pdb
The typical usage to break into the debugger from a running program is to insert
pdb.set_trace()
Execution will stop where it finds the above statement and you can debug.
If you notice that any of the documented features (ex. goto definition, Code Lens of implementation files, find usages)
are not working then make sure the required language runner is installed, by running gauge version
.
If not installed, install using gauge install <plugin_name>
.
In Java projects, if the debugger does not stop at the right breakpoint, it is related to this issue.