Interface FullConfig<TestArgs, WorkerArgs>

Resolved configuration which is accessible via testInfo.config and is passed to the test reporters. To see the format of Playwright configuration file, please see TestConfig instead.

interface FullConfig<TestArgs, WorkerArgs> {
    configFile?: string;
    forbidOnly: boolean;
    fullyParallel: boolean;
    globalSetup: string;
    globalTeardown: string;
    globalTimeout: number;
    grep: RegExp | RegExp[];
    grepInvert: RegExp | RegExp[];
    maxFailures: number;
    metadata: Metadata;
    preserveOutput: "always" | "never" | "failures-only";
    projects: FullProject<TestArgs, WorkerArgs>[];
    quiet: boolean;
    reportSlowTests: {
        max: number;
        threshold: number;
    };
    reporter: ReporterDescription[];
    rootDir: string;
    shard: {
        current: number;
        total: number;
    };
    tags: string[];
    updateSnapshots: "all" | "none" | "changed" | "missing";
    updateSourceMethod: "patch" | "overwrite" | "3way";
    version: string;
    webServer: TestConfigWebServer;
    workers: number;
}

Type Parameters

  • TestArgs = {}
  • WorkerArgs = {}

Properties

configFile?: string

Path to the configuration file used to run the tests. The value is an empty string if no config file was used.

forbidOnly: boolean
fullyParallel: boolean
globalSetup: string
globalTeardown: string
globalTimeout: number
grep: RegExp | RegExp[]
grepInvert: RegExp | RegExp[]
maxFailures: number
metadata: Metadata
preserveOutput: "always" | "never" | "failures-only"

List of resolved projects.

quiet: boolean
reportSlowTests: {
    max: number;
    threshold: number;
}

Type declaration

  • max: number

    The maximum number of slow test files to report.

  • threshold: number

    Test file duration in milliseconds that is considered slow.

rootDir: string

Base directory for all relative paths used in the reporters.

shard: {
    current: number;
    total: number;
}

Type declaration

  • current: number

    The index of the shard to execute, one-based.

  • total: number

    The total number of shards.

tags: string[]

Resolved global tags. See testConfig.tag.

updateSnapshots: "all" | "none" | "changed" | "missing"
updateSourceMethod: "patch" | "overwrite" | "3way"
version: string

Playwright version.

webServer: TestConfigWebServer
workers: number