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).

browser.logLevel

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

Log verbosity for the browser driver.


browser.capabilities

TypeDefault
object{}

Browser capabilities passed to Playwright or WebdriverIO.

capabilities: {
browserName: 'chromium' // 'chromium' | 'firefox' | 'webkit'
}

browser.timeout

Fine-grained timeouts for UI step interactions.

PropertyTypeDefaultDescription
actionnumber10000Timeout for user actions (click, type, etc.)
presentnumber10000Timeout for an element to appear in the DOM
visiblenumber20000Timeout for an element to become visible
pagenumber10000Page navigation timeout
valuenumber5000Polling timeout for value assertions
valueIntervalnumber500Polling interval for value assertions
pageRefreshIntervalnumber2000Page refresh interval for polling steps
timeout: {
action: 10000,
present: 10000,
visible: 20000,
page: 15000,
value: 5000,
valueInterval: 500
}

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()
}