Skip to main content
Version: 2x

Configuration Reference

The qavajs configuration file extends Cucumber JS configuration with additional options. By default qavajs looks for config.ts (or config.js) in the project root.

npx qavajs run --config path/to/config.ts

Profiles​

A single config file can export multiple named profiles:

export default { /* default config */ }
export const ci = { /* ci config */ }

Select a profile at runtime:

npx qavajs run --profile ci

Core Options​

paths​

TypeDefault
string[]['features/**/*.feature']

Glob patterns pointing to feature files.

paths: ['features/**/*.feature']

require​

TypeDefault
string[][]

Paths to step definition files and support code loaded before tests run.

require: [
'node_modules/@qavajs/steps-playwright/index.js',
'step_definitions/**/*.ts'
]

format​

TypeDefault
(string | [string, string])[][]

Formatter configurations. Use a string for stdout output or a [formatter, output-path] tuple to write to a file.

format: [
'@qavajs/console-formatter',
['@qavajs/html-formatter', 'reports/report.html'],
['junit', 'reports/junit.xml']
]

formatOptions​

TypeDefault
object{}

Options passed to formatters.

formatOptions: {
console: {
showLogs: true
}
}

parallel​

TypeDefault
number1

Number of parallel worker processes. See Parallel Execution.

parallel: 4

defaultTimeout​

TypeDefault
number30000

Default step timeout in milliseconds.

defaultTimeout: 60000

retry​

TypeDefault
number0

Number of times to retry a failing scenario. See Retries.

retry: 2

tags​

TypeDefault
stringundefined

Tag expression to filter which scenarios to run. Overridden by --tags CLI flag. See Tags & Filtering.

tags: '@smoke and not @wip'

pageObject​

TypeDefault
object{}

Instance of the root page object class. See Page Object Model.

import App from './page_object';

pageObject: new App()

memory​

TypeDefault
object{}

Instance of the memory class that provides constants and computed values. See Test Data Management.

import Memory from './memory';

memory: new Memory()

Browser Options​

The browser object configures the browser driver (Playwright or WebdriverIO). driver can be used as an alias of browser. Resolved config (with defaults applied) is available in custom steps as this.config.driverConfig.

browser.logLevel​

TypeDefault
'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent''warn'

Log verbosity for the browser driver (WebdriverIO only). With WebdriverIO, all other WebdriverIO options (e.g. strictSelectors) can also be provided in the browser object.


browser.capabilities​

TypeDefault
object{}

Browser capabilities passed to Playwright or WebdriverIO.

capabilities: {
browserName: 'chromium' // playwright: 'chromium' | 'firefox' | 'webkit' | 'electron'; wdio: 'chrome' | 'firefox' | ...
}

browser.timeout​

Fine-grained timeouts for UI step interactions.

PropertyTypeDefaultDescription
actionnumber10000Timeout for user actions (click, type, etc.) (Playwright only)
presentnumber10000Timeout for an element to appear in the DOM
visiblenumber10000Timeout for an element to become visible
clickablenumber10000Timeout for an element to become clickable (WebdriverIO only)
pagenumber10000Page navigation timeout
networkIdlenumber500Network inactivity period for I wait for network idle step (Playwright only)
implicitnumber0WebdriverIO implicit wait (WebdriverIO only)
elementnumber2000Timeout for an element to be accessible (WebdriverIO only)
valuenumber5000Polling timeout for value assertions
valueIntervalnumber500Polling interval for value assertions
actionIntervalnumber1000Interval to repeat action for I click ... until ... steps
pageRefreshIntervalnumber2000Page refresh interval for I refresh page until ... steps
timeout: {
action: 10000,
present: 10000,
visible: 20000,
page: 15000,
value: 5000,
valueInterval: 500
}

browser.screenshot, browser.trace, browser.video, browser.snapshot​

Report artifacts collected on particular events. See Playwright steps and WebdriverIO steps for details.


browser.reuseSession, browser.restartBrowser​

Share browser session between scenarios / restart browser instead of context between scenarios (restartBrowser is Playwright only).


browser.wsEndpoint​

Connect to a running Playwright server over WebSocket.

capabilities: {
browserName: 'chromium',
wsEndpoint: 'ws://127.0.0.1:9222/...'
}

browser.cdpEndpoint​

Connect to a running Chrome instance via CDP.

capabilities: {
browserName: 'chromium',
cdpEndpoint: 'http://localhost:9222/'
}

Complete Example​

import App from './page_object';
import Memory from './memory';

// default profile — local development
export default {
paths: ['features/**/*.feature'],
require: [
'node_modules/@qavajs/steps-playwright/index.js',
'step_definitions/**/*.ts'
],
format: [
'@qavajs/console-formatter',
['@qavajs/html-formatter', 'reports/report.html']
],
parallel: 1,
defaultTimeout: 30000,
browser: {
logLevel: 'warn',
timeout: {
action: 10000,
present: 10000,
visible: 20000,
page: 15000,
value: 5000,
valueInterval: 500
},
capabilities: {
browserName: 'chromium'
}
},
pageObject: new App(),
memory: new Memory()
}

// ci profile — used in CI/CD pipelines
export const ci = {
paths: ['features/**/*.feature'],
require: [
'node_modules/@qavajs/steps-playwright/index.js',
'step_definitions/**/*.ts'
],
format: [
'@qavajs/console-formatter',
['@qavajs/html-formatter', 'reports/report.html'],
['junit', 'reports/junit.xml']
],
parallel: 6,
defaultTimeout: 30000,
retry: 1,
browser: {
logLevel: 'error',
timeout: {
action: 15000,
present: 15000,
visible: 30000,
page: 20000
},
capabilities: {
browserName: 'chromium'
}
},
pageObject: new App(),
memory: new Memory()
}