Interface IConfiguration

User-defined configuration

interface IConfiguration {
    backtrace: boolean;
    dryRun: boolean;
    failFast: boolean;
    forceExit: boolean;
    format: (string | [string, string?])[];
    formatOptions: JsonObject;
    import: string[];
    language: string;
    loader: string[];
    name: string[];
    order: IPickleOrder;
    parallel: number;
    paths: string[];
    publish: boolean;
    publishQuiet: boolean;
    require: string[];
    requireModule: string[];
    retry: number;
    retryTagFilter: string;
    strict: boolean;
    tags: string;
    worldParameters: JsonObject;
}

Properties

backtrace: boolean

Show the full backtrace for errors

Default

false
dryRun: boolean

Perform a dry run, where a test run is prepared but nothing is executed

failFast: boolean

Stop running tests when a test fails

forceExit: boolean

Explicitly call process.exit() after the test run

Default

false

See

https://github.com/cucumber/cucumber-js/blob/main/docs/cli.md#exiting

Remarks

This option is only used by the CLI.

format: (string | [string, string?])[]

Name/path and (optionally) output file path of each formatter to use

Example

[
"@cucumber/pretty-formatter",
["html", "./reports/cucumber.html"],
["./custom-formatter.js", "./reports/custom.txt"]
]

Default

[]

See

https://github.com/cucumber/cucumber-js/blob/main/docs/formatters.md

Remarks

Each item has one or two values. The first (required) identifies the formatter to be used. The second (optional) specifies where the output should be written.

formatOptions: JsonObject

Options to be provided to formatters

Default

{}

See

https://github.com/cucumber/cucumber-js/blob/main/docs/formatters.md#options

Remarks

The value must be a JSON-serializable object.

import: string[]

Paths to where your support code is

language: string

Default language for your feature files

Default

"en"
loader: string[]

Module specifier(s) for loaders to be registered ahead of loading support code

Default

[]
name: string[]

Regular expressions of which scenario names should match one of to be run

Run in the order defined, or in a random order

parallel: number

Run tests in parallel with the given number of worker processes

paths: string[]

Paths to where your feature files are

publish: boolean

Publish a report of your test run to https://reports.cucumber.io/

Default

false
publishQuiet: boolean
require: string[]

Paths to where your support code is, for CommonJS

requireModule: string[]

Names of transpilation modules to load, via require()

retry: number

Retry failing tests up to the given number of times

retryTagFilter: string

Tag expression to filter which scenarios can be retried

strict: boolean

Fail the test run if there are pending steps

Default

true
tags: string

Tag expression to filter which scenarios should be run

worldParameters: JsonObject

Parameters to be passed to your World

Default

{}

See

https://github.com/cucumber/cucumber-js/blob/main/docs/support_files/world.md

Remarks

The value must be a JSON-serializable object.

Generated using TypeDoc