# Configuration

Gondola's configuration is set in the gondola.json file located in your project's root folder.

Here is an overview of the available options with their default settings:

  • tests: "./*_test.js" - pattern to locate tests (which are built from your TypeScript files)
  • grep: - pattern to filter the tests by name
  • timeout: 10000 - tests' default timeout
  • output: "./output" - where to store the output of the tests (screenshots, reports, etc)
  • helpers: {} - list of enabled helpers
  • mocha: {} - mocha options, reporters can be configured here
  • multiple: {} - multiple options
  • translation: - [locale] to print steps output, as well as for use in the source code.
  • require: [] - array of modules required before gondola can start

# Require

Requires the specified modules before running . This option is useful for assertion libraries, so you may use --require should instead of manually invoking require('should') within each test file. It can be used with relative paths, e.g. "require": ["/lib/somemodule"], and installed packages.

You can register ts-node, so you can use Typescript in tests with the ts-node package

{
  "tests": "./*_test.js",
  "timeout": 10000,
  "output": "",
  "helpers": {},
  "bootstrap": false,
  "mocha": {},
  // require modules
  "require": ["ts-node/register", "should"]
}

# Dynamic Configuration

By default gondola.json is used for configuration. You can override its values during runtime by using --override or -o in command line and passing it valid JSON as an argument:

gondola run -o '{ "helpers": {"WebDriver": {"browser": "firefox"}}}'

If you prefer to store your configuration files in a different location, or with a different name, you can do that with --config or `-c:

gondola run --config=./path/to/my/config.json
Last Updated: 1/14/2020, 9:15:01 AM