Configuration

ferridriver looks for ferridriver.{toml,yaml,yml,json} in the current directory, then in ~/.config/ferridriver/. Override with -c PATH. Wire keys are camelCase.

Example

[test]
workers       = 4
timeout       = 30000
expectTimeout = 5000
retries       = 1
fullyParallel = true
outputDir     = "test-results"

[test.browser]
backend  = "cdp-pipe"
headless = true

[test.browser.viewport]
width  = 1280
height = 720

[[test.reporter]]
name = "terminal"

[[test.reporter]]
name = "html"

Projects (matrix runs)

[[test.projects]]
name = "chromium"
[test.projects.browser]
browser = "chromium"

[[test.projects]]
name = "firefox"
[test.projects.browser]
browser = "firefox"
backend = "bidi"

[[test.projects]]
name = "webkit"
[test.projects.browser]
browser = "webkit"
backend = "webkit"

Run a single slice with --project firefox.

Web server

[[test.webServer]]
command            = "npm run preview"
url                = "http://localhost:4173"
reuseExistingServer = true
timeout            = 60000

Multiple [[test.webServer]] blocks can run in parallel.

Priority

Lowest to highest:

  1. Config file defaults
  2. main!() / HarnessConfig macro arguments (Rust)
  3. Environment variables — FERRIDRIVER_BACKEND, FERRIDRIVER_WORKERS, FERRIDRIVER_TIMEOUT, FERRIDRIVER_RETRIES, …
  4. CLI flags — --headless, --backend, --workers, --timeout, …

Profiles

Named presets that merge into the base config via --profile NAME, passed through the Rust test harness:

[test.profiles.ci]
workers = 8
retries = 2
[[test.profiles.ci.reporter]]
name = "junit"
[[test.profiles.ci.reporter]]
name = "github"
cargo test --test e2e -- --profile ci

Full schema

The TestConfig Rust type is the canonical reference. Notable fields:

FieldTypeDefaultNotes
testMatchVec<String>[]Glob patterns for test files (JS / TS path)
timeoutu6430000Per-test timeout (ms)
expectTimeoutu645000Assertion polling timeout (ms)
workersu3200 = number of logical CPUs
retriesu320Per-test retries on failure
fullyParallelboolfalseTreat all tests as parallel even within suites
repeatEachu321Repeat each test N times (flakiness detection)
forbidOnlyboolfalseFail the run if any #[ferritest(only)] is present
failFastboolfalseStop after first failure
maxFailuresu320Stop after N failures (0 = no limit)
globalTimeoutu640Whole-run timeout (ms; 0 = no limit)
screenshotOnFailurebooltrueCapture screenshot on test failure
videoobject{ mode = "off" }mode: off / on / retain-on-failure
traceenumoffoff / on / retain-on-failure / on-first-retry
outputDirpathtest-resultsTest output root
snapshotDirpath?noneSnapshot baseline directory
updateSnapshotsenummissingall / changed / missing / none
storageStatepath?noneSaved auth state JSON
baseUrlstring?noneBase URL for relative page.gotos
strictboolfalse(BDD) undefined / pending steps fail
orderenumdefineddefined / random[:SEED] (BDD)
languagestring?noneDefault Gherkin keyword language
worldParametersJSON{}Passed to JS this.parameters (BDD)
featuresVec<String>[]Feature file globs (BDD)
stepsVec<String>[]JS / TS step file globs (BDD)

Plus per-project ProjectConfig and per-context ContextConfig (viewport, locale, timezone, geolocation, permissions, etc.). See the rustdoc for ferridriver-config for the full struct.