Implementation:DevExpress Testcafe RunnerOptions TypeDefs
| Knowledge Sources | |
|---|---|
| Domains | Type_Definitions, Configuration |
| Last Updated | 2026-02-12 12:00 GMT |
Overview
Concrete TypeScript type declarations for all runner configuration option interfaces used by TestCafe's programmatic Runner API.
Description
This file defines the comprehensive set of TypeScript interfaces for configuring test runs: RunOptions (selectorTimeout, assertionTimeout, speed, skipJsErrors, quarantineMode, debugMode, etc.), BrowserOption (browser configuration), ScreenshotOptions (path, takeOnFails, pathPattern, fullPage), VideoOptions (failedOnly, singleFile, ffmpegPath, pathPattern), CompilerOptions (TypeScript compiler settings), ProxyOptions (proxy configuration), and ConcurrentOption. These interfaces provide comprehensive type safety for the runner.run(options) call.
Usage
Use these types when configuring test runs via TestCafe's programmatic API to get full IntelliSense for all available run options.
Code Reference
Source Location
- Repository: DevExpress_Testcafe
- File: ts-defs-src/runner-api/options.d.ts
- Lines: 1-294
Signature
interface RunOptions {
skipJsErrors?: boolean | SkipJsErrorsOptionsObject | SkipJsErrorsCallbackOptions;
skipUncaughtErrors?: boolean;
quarantineMode?: boolean | QuarantineOptionValue;
debugMode?: boolean;
debugOnFail?: boolean;
selectorTimeout?: number;
assertionTimeout?: number;
pageLoadTimeout?: number;
pageRequestTimeout?: number;
ajaxRequestTimeout?: number;
browserInitTimeout?: number;
speed?: number;
stopOnFirstFail?: boolean;
disablePageCaching?: boolean;
disablePageReloads?: boolean;
disableScreenshots?: boolean;
disableMultipleWindows?: boolean;
baseUrl?: string;
}
interface ScreenshotOptionValue {
path?: string;
takeOnFails?: boolean;
pathPattern?: string;
fullPage?: boolean;
thumbnails?: boolean;
}
interface VideoOptions {
failedOnly?: boolean;
singleFile?: boolean;
ffmpegPath?: string;
pathPattern?: string;
}
Import
// Available when using TestCafe programmatic API
import createTestCafe from 'testcafe';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| selectorTimeout | number | No | Max wait time for selectors (ms) |
| assertionTimeout | number | No | Max wait time for assertions (ms) |
| speed | number (0.01-1) | No | Test execution speed |
| quarantineMode | boolean or object | No | Enable quarantine mode for flaky tests |
Outputs
| Name | Type | Description |
|---|---|---|
| Type interfaces | TypeScript types | Used for type checking runner configuration |
Usage Examples
import createTestCafe from 'testcafe';
const testcafe = await createTestCafe();
const runner = testcafe.createRunner();
await runner
.src('tests/**/*.ts')
.browsers('chrome:headless')
.screenshots({
path: 'artifacts/screenshots',
takeOnFails: true,
pathPattern: '${DATE}_${TIME}/${BROWSER}/${TEST}.png',
fullPage: true,
})
.video('artifacts/videos', {
failedOnly: true,
singleFile: false,
})
.run({
selectorTimeout: 10000,
assertionTimeout: 5000,
pageLoadTimeout: 30000,
speed: 0.8,
stopOnFirstFail: false,
quarantineMode: { successThreshold: 3, attemptLimit: 5 },
});