Skip to main content

FullConfig

可通过 testInfo.config 访问并传递给测试报告器的已解析配置。要查看 Playwright 配置文件的格式,请参阅 TestConfig

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

用法

¥Usage

fullConfig.configFile

类型

¥Type


forbidOnly

Added in: v1.10 fullConfig.forbidOnly

参见 testConfig.forbidOnly

¥See testConfig.forbidOnly.

用法

¥Usage

fullConfig.forbidOnly

类型

¥Type


fullyParallel

Added in: v1.20 fullConfig.fullyParallel

参见 testConfig.fullyParallel

¥See testConfig.fullyParallel.

用法

¥Usage

fullConfig.fullyParallel

类型

¥Type


globalSetup

Added in: v1.10 fullConfig.globalSetup

参见 testConfig.globalSetup

¥See testConfig.globalSetup.

用法

¥Usage

fullConfig.globalSetup

类型

¥Type


globalTeardown

Added in: v1.10 fullConfig.globalTeardown

参见 testConfig.globalTeardown

¥See testConfig.globalTeardown.

用法

¥Usage

fullConfig.globalTeardown

类型

¥Type


globalTimeout

Added in: v1.10 fullConfig.globalTimeout

参见 testConfig.globalTimeout

¥See testConfig.globalTimeout.

用法

¥Usage

fullConfig.globalTimeout

类型

¥Type


grep

Added in: v1.10 fullConfig.grep

参见 testConfig.grep

¥See testConfig.grep.

用法

¥Usage

fullConfig.grep

类型

¥Type


grepInvert

Added in: v1.10 fullConfig.grepInvert

参见 testConfig.grepInvert

¥See testConfig.grepInvert.

用法

¥Usage

fullConfig.grepInvert

类型

¥Type


maxFailures

Added in: v1.10 fullConfig.maxFailures

参见 testConfig.maxFailures

¥See testConfig.maxFailures.

用法

¥Usage

fullConfig.maxFailures

类型

¥Type


metadata

Added in: v1.10 fullConfig.metadata

参见 testConfig.metadata

¥See testConfig.metadata.

用法

¥Usage

fullConfig.metadata

类型

¥Type


preserveOutput

Added in: v1.10 fullConfig.preserveOutput

参见 testConfig.preserveOutput

¥See testConfig.preserveOutput.

用法

¥Usage

fullConfig.preserveOutput

类型

¥Type

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

projects

Added in: v1.10 fullConfig.projects

已解决的项目列表。

¥List of resolved projects.

用法

¥Usage

fullConfig.projects

类型

¥Type


quiet

Added in: v1.10 fullConfig.quiet

参见 testConfig.quiet

¥See testConfig.quiet.

用法

¥Usage

fullConfig.quiet

类型

¥Type


reportSlowTests

Added in: v1.10 fullConfig.reportSlowTests

参见 testConfig.reportSlowTests

¥See testConfig.reportSlowTests.

用法

¥Usage

fullConfig.reportSlowTests

类型

¥Type

要报告的慢速测试文件的最大数量。默认为 5

¥The maximum number of slow test files to report. Defaults to 5.

测试持续时间(以毫秒为单位)被认为是缓慢的。默认为 15 秒。

¥Test duration in milliseconds that is considered slow. Defaults to 15 seconds.


reporter

Added in: v1.10 fullConfig.reporter

参见 testConfig.reporter

¥See testConfig.reporter.

用法

¥Usage

fullConfig.reporter

类型

¥Type

| "list" | "dot" | "line" | "github" | "json" | "junit" | "null" | "html"

报告器名称或模块或文件路径

¥Reporter name or module or file path

具有报告器选项的对象(如果有)

¥An object with reporter options if any


rootDir

Added in: v1.20 fullConfig.rootDir

报告器中使用的所有相对路径的基本目录。

¥Base directory for all relative paths used in the reporters.

用法

¥Usage

fullConfig.rootDir

类型

¥Type


shard

Added in: v1.10 fullConfig.shard

参见 testConfig.shard

¥See testConfig.shard.

用法

¥Usage

fullConfig.shard

类型

¥Type

分片总数。

¥The total number of shards.

要执行的分片的索引,从一开始。

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


updateSnapshots

Added in: v1.10 fullConfig.updateSnapshots

参见 testConfig.updateSnapshots

¥See testConfig.updateSnapshots.

用法

¥Usage

fullConfig.updateSnapshots

类型

¥Type

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

version

Added in: v1.20 fullConfig.version

Playwright 版本。

¥Playwright version.

用法

¥Usage

fullConfig.version

类型

¥Type


webServer

Added in: v1.10 fullConfig.webServer

参见 testConfig.webServer

¥See testConfig.webServer.

用法

¥Usage

fullConfig.webServer

类型

¥Type


workers

Added in: v1.10 fullConfig.workers

参见 testConfig.workers

¥See testConfig.workers.

用法

¥Usage

fullConfig.workers

类型

¥Type