Options

browser

string

Browser to use for tests, one of 'all', 'chromium', 'firefox' or 'webkit'. If a playwright config is provided/discovered then the browserName value is expected from the configured 'projects'

config

string

Configuration file, or a test directory with optional

headed

boolean

Run tests in headed browsers

debug

boolean

Run tests with Playwright Inspector. Shortcut for 'PWDEBUG=1' environment variable and '--timeout=0',--max-failures=1 --headed --workers=1' options

forbidOnly

boolean

Fail if test.only is called

fullyParallel

boolean

Run all tests in parallel

grep

g
string

Only run tests matching this regular expression

globalTimeout

number

Maximum time this test suite can run in milliseconds

grepInvert

gv
string

Only run tests that do not match this regular expression

ignoreSnapshots

boolean

Ignore screenshot and snapshot expectations

lastFailed

boolean

Run only the tests that failed in the last run

list

boolean

Collect all the tests and report them, but do not run

maxFailures

x
oneOf [number, boolean]

Stop after the first N failures

noDeps

boolean

Do not run project dependencies

output

string

Folder for output artifacts

passWithNoTests

boolean
Default: true

Makes test run succeed even if no tests were found

project

Array<string>

Only run tests from the specified list of projects

quiet

q
boolean

Suppress stdio

repeatEach

number

Run each test N times

reporter

string

Common Reporter values to use, comma-separated, 'list', 'line', 'dot', 'json', 'junit', 'null', 'github', 'html', 'blob'. To configure reporter options, use the playwright configuration.

retries

number

Maximum retry count for flaky tests, zero for no retries

shard

string

Shard tests and execute only the selected shard, specify in the form 'current/all', 1-based, for example '3/5'

skipInstall

boolean
Default: false

Skip running playwright install before running playwright tests. This is to ensure that playwright browsers are installed before running tests.

testFiles

t
Array<string>

Test files to run

timeout

number

Specify test timeout threshold in milliseconds, zero for unlimited

trace

string
Accepted values: on, off, on-first-retry, on-all-retries, retain-on-failure

Force tracing mode, can be 'on', 'off', 'on-first-retry', 'on-all-retries', 'retain-on-failure'

updateSnapshots

u
boolean

Update snapshots with actual results. Snapshots will be created if missing.

ui

boolean

Run tests in interactive UI mode

uiHost

string

Host to serve UI on; specifying this option opens UI in a browser tab

uiPort

number

Port to serve UI on, 0 for any free port; specifying this option opens UI in a browser tab

workers

j
oneOf [number, string]

Number of concurrent workers or percentage of logical CPU cores, use 1 to run in a single worker