.. cssclass:: topic
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.
.. cssclass:: category-title
Where is the Gauge executable installed by default?
Where are the plugins installed by default?
How can I manually install a plugin?
.. cssclass:: category-title
How can I increase the language runner timeout?
.. cssclass:: category-title
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?
.. cssclass:: category-title
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.
.. cssclass:: category-title
.. cssclass:: category-title
.. cssclass:: category-title
How to change/rename default step implementation(step_impl) directory
How to use different version of python while running specs
How to debug gauge-python without using an IDE
.. cssclass:: category-title
If you have any questions that are not answered you can get help from our Github.
.. cssclass:: category
.. cssclass:: question
.. cssclass:: answer
%ProgramFiles%\gauge\bin
/usr/local/bin
/usr/local/bin
.. cssclass:: question
%APPDATA%\gauge\plugins
~/.gauge/plugins
~/.gauge/plugins
.. cssclass:: question
GAUGE_HOME
environment variable can be used to customize config files and plugins installation location.
.. cssclass:: question
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>
.. cssclass:: category
Note
Gauge specific properties are stored in gauge.properties
under gauge configuration folder. Refer to :ref:`Gauge Properties<gauge_properties>`.
.. cssclass:: question
By setting
runner_connection_timeout = 3000
.. cssclass:: category
.. cssclass:: question
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.
.. cssclass:: question
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.
.. cssclass:: category
.. cssclass:: question
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 :ref:`project's properties<default_properties>`.
.. cssclass:: question
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 :ref:`project's properties<default_properties>`.
.. cssclass:: question
You can specify a custom directory by changing the logs_directory
property under
env/default/default.properties
Refer to :ref:`project's properties<default_properties>`.
logs_directory = my_custom_log_directory
.. cssclass:: question
%APPDATA%\gauge\logs
~/.gauge/logs
~/.gauge/logs
.. cssclass:: category
.. cssclass:: question
Remove the Plugins before uninstalling Gauge. For information about removing plugins, see :ref:`plugins-uninstallation`.
Prerequisite
Remove the Plugins before uninstalling Gauge. For information about removing plugins, see :ref:`plugins-uninstallation`.
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.
.. cssclass:: category
.. cssclass:: question
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.
.. cssclass:: category
.. cssclass:: question
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.
.. cssclass:: question
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
.. cssclass:: question
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.
.. cssclass:: category
.. cssclass:: question
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>
.
.. cssclass:: question
In Java projects, if the debugger does not stop at the right breakpoint, it is related to this issue.