new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · Test runner API · all subjects

fullconfig

49 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

FullConfig.webServer configuration

FullConfig.webServer is either null or an object containing web server configuration, corresponding to TestConfig.webServer. Available since v1.10.

FullConfig.workers integer count

FullConfig.workers is an integer representing the number of worker processes, corresponding to TestConfig.workers. Available since v1.10.

FullConfig.version Playwright version string

FullConfig.version is a string representing the Playwright version. Available since v1.20.

FullConfig.argv captures process.argv

FullConfig.argv is an array of strings that captures a snapshot of process.argv from the runner process. It allows reading custom command-line arguments, for example arguments supplied after the -- separator (such as npx playwright test -- --build-path=./out). Playwright does not parse these arguments; consumers are responsible for slicing and interpreting them using an argument-parsing library. Available since v1.61.

FullConfig.configFile path

FullConfig.configFile is an optional string representing the path to the configuration file used to run the tests. The value is an empty string if no config file was used. Available since v1.20.

FullConfig.failOnFlakyTests boolean flag

FullConfig.failOnFlakyTests is a boolean property corresponding to TestConfig.failOnFlakyTests. Available since v1.61.

FullConfig.forbidOnly boolean flag

FullConfig.forbidOnly is a boolean property corresponding to TestConfig.forbidOnly. Available since v1.10.

FullConfig.fullyParallel boolean flag

FullConfig.fullyParallel is a boolean property corresponding to TestConfig.fullyParallel. Available since v1.20.

FullConfig.globalSetup path or null

FullConfig.globalSetup is either null or a string representing the path to the global setup file, corresponding to TestConfig.globalSetup. Available since v1.10.

FullConfig.globalTeardown path or null

FullConfig.globalTeardown is either null or a string representing the path to the global teardown file, corresponding to TestConfig.globalTeardown. Available since v1.10.

FullConfig.globalTimeout integer milliseconds

FullConfig.globalTimeout is an integer representing the timeout in milliseconds, corresponding to TestConfig.globalTimeout. Available since v1.10.

FullConfig.grep regex or array of regexes

FullConfig.grep is either a single RegExp or an array of RegExp objects used for filtering tests, corresponding to TestConfig.grep. Available since v1.10.

FullConfig.grepInvert regex for negated filtering

FullConfig.grepInvert is either null, a single RegExp, or an array of RegExp objects used for negated test filtering, corresponding to TestConfig.grepInvert. Available since v1.10.

FullConfig.maxFailures integer limit

FullConfig.maxFailures is an integer representing the maximum number of failures to allow before stopping the test run, corresponding to TestConfig.maxFailures. Available since v1.10.

FullConfig.metadata object

FullConfig.metadata is an object containing metadata, corresponding to TestConfig.metadata. Available since v1.10.

FullConfig.preserveOutput preservation strategy

FullConfig.preserveOutput is a string that can be one of 'always', 'never', or 'failures-only', determining when output artifacts are preserved, corresponding to TestConfig.preserveOutput. Available since v1.10.

FullConfig.projects array of resolved projects

FullConfig.projects is an array of FullProject objects representing the list of resolved projects. Available since v1.10.

FullConfig.quiet boolean flag

FullConfig.quiet is a boolean property corresponding to TestConfig.quiet. Available since v1.10.

FullConfig.reporter configuration

FullConfig.reporter can be a string (reporter name, module name, or file path), an array where the first element is a string and the second is an options object, or a built-in reporter name ('list', 'dot', 'line', 'github', 'json', 'junit', 'null', or 'html'), corresponding to TestConfig.reporter. Available since v1.10.

FullConfig.reportSlowTests slow test reporting

FullConfig.reportSlowTests is either null or an object with the following properties: max (integer, the maximum number of slow test files to report) and threshold (float, test file duration in milliseconds that is considered slow), corresponding to TestConfig.reportSlowTests. Available since v1.10.

FullConfig.rootDir base directory string

FullConfig.rootDir is a string representing the base directory for all relative paths used in the reporters. Available since v1.20.

FullConfig.shard sharding configuration

FullConfig.shard is either null or an object with the following properties: total (integer, the total number of shards) and current (integer, the index of the shard to execute, one-based), corresponding to TestConfig.shard. Available since v1.10.

FullConfig.tags array of global tags

FullConfig.tags is an array of strings containing resolved global tags, corresponding to TestConfig.tag. Available since v1.57.

FullConfig.updateSnapshots snapshot update strategy

FullConfig.updateSnapshots is a string that can be one of 'all', 'changed', 'missing', or 'none', determining the snapshot update strategy, corresponding to TestConfig.updateSnapshots. Available since v1.10.

FullConfig.updateSourceMethod source update method

FullConfig.updateSourceMethod is a string that can be one of 'overwrite', '3way', or 'patch', determining the method for updating sources, corresponding to TestConfig.updateSourceMethod. Available since v1.50.

FullConfig is resolved configuration for test runners

FullConfig is the resolved configuration accessible via TestInfo.config and is passed to test reporters. It contains the complete configuration state used for test execution. Available since v1.10.

TestConfig.build property

The `build` property is an optional object that configures Playwright transpiler settings. It has one field: `external` (optional array of strings) - paths to exclude from transpilation expressed as glob patterns. Typically heavy JS bundles are listed here.

TestConfig.captureGitInfo property

The `captureGitInfo` property is an optional object controlling whether git information is captured and stored in metadata. It has two optional boolean fields: `commit` - whether to capture commit and pull request information such as hash, author, timestamp; `diff` - whether to capture commit diff. Default values depend on the environment: true when tests run in CI where it is safe, false otherwise.

TestConfig.expect property

The `expect` property is an optional object configuring the expect assertion library. Fields: `timeout` (optional int, defaults to 5000ms) - default timeout for async expect matchers in milliseconds; `toHaveScreenshot` (optional object) with fields: `animations` (optional 'allow'|'disabled', defaults to 'disabled'), `caret` (optional 'hide'|'initial', defaults to 'hide'), `maxDiffPixels` (optional int, unset by default), `maxDiffPixelRatio` (optional float between 0 and 1, unset by default), `scale` (optional 'css'|'device', defaults to 'css'), `stylePath` (optional string or array of strings), `threshold` (optional float 0 to 1, defaults to 0.2 for pixelmatch comparator), `pathTemplate` (optional string for screenshot location); `toMatchAriaSnapshot` (optional object) with fields: `pathTemplate` (optional string), `children` (optional 'contain'|'equal'|'deep-equal' for how children of snapshot root are matched); `toMatchSnapshot` (optional object) with fields: `maxDiffPixels` (optional int, unset by default), `maxDiffPixelRatio` (optional float between 0 and 1, unset by default), `threshold` (optional float 0 to 1, defaults to 0.2 for pixelmatch comparator); `toPass` (optional object) with fields: `intervals` (optional array of ints for probe intervals in milliseconds), `timeout` (optional int for timeout in milliseconds).

TestConfig.failOnFlakyTests property

The `failOnFlakyTests` property is an optional boolean. When set to true, the test run will exit with an error if any tests are marked as flaky. Useful on CI. Also available via the `--fail-on-flaky-tests` command line option.

TestConfig.forbidOnly property

The `forbidOnly` property is an optional boolean. When set to true, the test run will exit with an error if any tests or groups are marked as `.only` or `describe.only`. Useful on CI.

TestConfig.globalSetup property

The `globalSetup` property is an optional string or array of strings specifying path(s) to global setup file(s). The file(s) will be required and run before all tests. Each file must export a single function that takes a FullConfig argument. When an array is provided, multiple global setup files can be specified.

TestConfig.globalTeardown property

The `globalTeardown` property is an optional string or array of strings specifying path(s) to global teardown file(s). The file(s) will be required and run after all tests. Each file must export a single function. When an array is provided, multiple global teardown files can be specified.

TestConfig.globalTimeout property

The `globalTimeout` property is an optional integer specifying the maximum time in milliseconds the whole test suite can run. A value of zero (the default) disables this behavior. Useful on CI to prevent broken setup from running too long and wasting resources.

TestConfig.maxFailures property

The `maxFailures` property is an optional integer. The test suite will stop and exit with an error after reaching this maximum number of test failures. A value of zero (the default) disables this behavior. Also available via the `--max-failures` and `-x` command line options.

TestConfig.metadata property

The `metadata` property is an optional Metadata object containing key-value pairs to be included in the report. For example, the JSON report will include metadata serialized as JSON.

TestConfig.name property

The `name` property is an optional string. The config name is visible in the report and during test execution, unless overridden by TestProject.name.

TestConfig.preserveOutput property

The `preserveOutput` property is an optional string controlling whether to preserve test output in outputDir. Accepts values: 'always' (preserve output for all tests, the default), 'never' (do not preserve output for any tests), 'failures-only' (only preserve output for failed tests).

TestConfig.projects property

The `projects` property is an optional array of TestProject objects. Playwright Test supports running multiple test projects at the same time.

TestConfig.quiet property

The `quiet` property is an optional boolean. When set to true, stdio and stderr output from the tests will be suppressed.

TestConfig.reporter property

The `reporter` property is an optional string, array, or builtin reporter name. It specifies the list of reporters to use. Each reporter can be: a builtin reporter name like 'list', 'dot', 'line', 'github', 'json', 'junit', 'null', or 'html'; a module name like 'my-awesome-reporter'; a relative path to the reporter like './reporters/my-awesome-reporter.js'. Options can be passed to reporters in a tuple like ['json', { outputFile: './report.json' }]. If not specified, Playwright uses 'dot' reporter when CI environment variable is set, 'list' reporter otherwise.

TestConfig.reportSlowTests property

The `reportSlowTests` property is an optional object or null. When set, reports slow test files. Contains fields: `max` (int, defaults to 5) - the maximum number of slow test files to report; `threshold` (float, defaults to 5 minutes/300000ms) - test file duration in milliseconds considered slow. Passing null disables this feature. Test files exceeding the threshold are reported, no more than max of them. Passing zero as max reports all test files that exceed the threshold.

TestConfig.retryStrategy property

The `retryStrategy` property is an optional string controlling when failed tests are retried. Defaults to 'immediate'. Accepted values: 'immediate' (a failed test is retried as soon as a worker is available, interleaved with the rest of the run, the default); 'isolated' (retries run at the end after all other tests have finished, one by one in a single worker, minimizing interference at the expense of total run time).

TestConfig.shard property

The `shard` property is an optional object or null for sharding tests. Contains fields: `current` (int) - the index of the shard to execute, one-based; `total` (int) - the total number of shards. Specify in the form like { total: 5, current: 2 }.

TestConfig.tag property

The `tag` property is an optional string or array of strings. Each tag is prepended to each test in the report, useful for tagging test runs to differentiate between CI environments. Each tag must start with the @ symbol.

TestConfig.tsconfig property

The `tsconfig` property is an optional string specifying a path to a single tsconfig applicable to all imported files. By default, tsconfig for each imported file is looked up separately. This property has no effect while the configuration file or any of its dependencies are loaded. Ignored when `--tsconfig` command line option is specified.

TestConfig.updateSnapshots property

The `updateSnapshots` property is an optional string controlling whether to update expected snapshots. Defaults to 'missing'. Accepted values: 'all' (all executed tests update snapshots), 'changed' (executed tests update snapshots that did not match; matching snapshots not updated; also creates missing snapshots), 'missing' (missing snapshots are created, the default), 'none' (no snapshots updated).

TestConfig.updateSourceMethod property

The `updateSourceMethod` property is an optional string defining how to update snapshots in source code. Accepted values: 'patch' (create a unified diff file that can be used to update source code later, the default), '3way' (generate merge conflict markers in source code allowing manual picking of relevant changes), 'overwrite' (overwrite the source code with new snapshot values).

TestConfig.webServer property

The `webServer` property is an optional object or array of objects launching development web server(s) during tests. Fields: `command` (string, required) - shell command to start; `cwd` (optional string) - current working directory of spawned process, defaults to config file directory; `env` (optional object) - environment variables for the command, defaults to process.env; `gracefulShutdown` (optional object) - how to shut down the process with fields `signal` ('SIGINT'|'SIGTERM') and `timeout` (int milliseconds); `ignoreHTTPSErrors` (optional boolean, defaults to false); `name` (optional string) - custom name for web server, defaults to '[WebServer]'; `port` (optional int) - port expected for http server; `reuseExistingServer` (optional boolean) - re-use existing server if available; `stderr` (optional 'pipe'|'ignore', defaults to 'pipe'); `stdout` (optional 'pipe'|'ignore', defaults to 'ignore'); `wait` (optional object) with `stdout` (optional RegExp) and `stderr` (optional RegExp) for output to wait for before considering command started; `timeout` (optional int, defaults to 60000ms) - how long to wait for process startup; `url` (optional string) - url expected to return 2xx, 3xx, 400, 401, 402, or 403 status code when ready. Either port or url should be specified. When port is specified, the port (but not url) is passed to Playwright as baseURL.

Give your agent this brain