Skip to main content

FullConfig

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.


屬性 (Properties)​

configFile​

Added in: v1.20 fullConfig.configFile

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

使用方式

fullConfig.configFile

型別 (Type)


forbidOnly​

Added in: v1.10 fullConfig.forbidOnly

See testConfig.forbidOnly.

使用方式

fullConfig.forbidOnly

型別 (Type)


fullyParallel​

Added in: v1.20 fullConfig.fullyParallel

See testConfig.fullyParallel.

使用方式

fullConfig.fullyParallel

型別 (Type)


globalSetup​

Added in: v1.10 fullConfig.globalSetup

See testConfig.globalSetup.

使用方式

fullConfig.globalSetup

型別 (Type)


globalTeardown​

Added in: v1.10 fullConfig.globalTeardown

See testConfig.globalTeardown.

使用方式

fullConfig.globalTeardown

型別 (Type)


globalTimeout​

Added in: v1.10 fullConfig.globalTimeout

See testConfig.globalTimeout.

使用方式

fullConfig.globalTimeout

型別 (Type)


grep​

Added in: v1.10 fullConfig.grep

See testConfig.grep.

使用方式

fullConfig.grep

型別 (Type)


grepInvert​

Added in: v1.10 fullConfig.grepInvert

See testConfig.grepInvert.

使用方式

fullConfig.grepInvert

型別 (Type)


maxFailures​

Added in: v1.10 fullConfig.maxFailures

See testConfig.maxFailures.

使用方式

fullConfig.maxFailures

型別 (Type)


metadata​

Added in: v1.10 fullConfig.metadata

See testConfig.metadata.

使用方式

fullConfig.metadata

型別 (Type)


preserveOutput​

Added in: v1.10 fullConfig.preserveOutput

See testConfig.preserveOutput.

使用方式

fullConfig.preserveOutput

型別 (Type)

  • "always" | "never" | "failures-only"

projects​

Added in: v1.10 fullConfig.projects

List of resolved projects.

使用方式

fullConfig.projects

型別 (Type)


quiet​

Added in: v1.10 fullConfig.quiet

See testConfig.quiet.

使用方式

fullConfig.quiet

型別 (Type)


reportSlowTests​

Added in: v1.10 fullConfig.reportSlowTests

See testConfig.reportSlowTests.

使用方式

fullConfig.reportSlowTests

型別 (Type)

  • null | Object
    • max number

      The maximum number of slow test files to report.

    • threshold number

      Test file duration in milliseconds that is considered slow.


reporter​

Added in: v1.10 fullConfig.reporter

See testConfig.reporter.

使用方式

fullConfig.reporter

型別 (Type)

  • string | Array<Object> | "list" | "dot" | "line" | "github" | "json" | "junit" | "null" | "html"
    • 0 string

      Reporter name or module or file path

    • 1 Object

      An object with reporter options if any


rootDir​

Added in: v1.20 fullConfig.rootDir

Base directory for all relative paths used in the reporters.

使用方式

fullConfig.rootDir

型別 (Type)


shard​

Added in: v1.10 fullConfig.shard

See testConfig.shard.

使用方式

fullConfig.shard

型別 (Type)

  • null | Object
    • total number

      The total number of shards.

    • current number

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


updateSnapshots​

Added in: v1.10 fullConfig.updateSnapshots

See testConfig.updateSnapshots.

使用方式

fullConfig.updateSnapshots

型別 (Type)

  • "all" | "changed" | "missing" | "none"

updateSourceMethod​

Added in: v1.50 fullConfig.updateSourceMethod

See testConfig.updateSourceMethod.

使用方式

fullConfig.updateSourceMethod

型別 (Type)

  • "overwrite" | "3way" | "patch"

version​

Added in: v1.20 fullConfig.version

Playwright version.

使用方式

fullConfig.version

型別 (Type)


webServer​

Added in: v1.10 fullConfig.webServer

See testConfig.webServer.

使用方式

fullConfig.webServer

型別 (Type)


workers​

Added in: v1.10 fullConfig.workers

See testConfig.workers.

使用方式

fullConfig.workers

型別 (Type)