diff --git a/docs/src/test-cli-js.md b/docs/src/test-cli-js.md index 6791560ca0..ff5dd8a5a8 100644 --- a/docs/src/test-cli-js.md +++ b/docs/src/test-cli-js.md @@ -67,50 +67,31 @@ Here are the most common options available in the command line. ## Reference -Complete set of Playwright Test options is available in the [configuration file](./test-advanced.md). Following options can be passed to a command line and take a priority over the configuration file: +Complete set of Playwright Test options is available in the [configuration file](./test-use-options.md). Following options can be passed to a command line and take priority over the configuration file: -- `--headed`: Run tests in headed browsers. Useful for debugging. - -- `--browser`: Run test in a specific browser. Available options are `"chromium"`, `"firefox"`, `"webkit"` or `"all"` to run tests in all three browsers at the same time. - -- `--debug`: Run tests with Playwright Inspector. Shortcut for `PWDEBUG=1` environment variable and `--timeout=0 --max-failures=1 --headed --workers=1` options. - -- `-c ` or `--config `: Configuration file. If not passed, defaults to `playwright.config.ts` or `playwright.config.js` in the current directory. - -- `-c ` or `--config `: Directory with the tests to run without configuration file. - -- `--forbid-only`: Whether to disallow `test.only`. Useful on CI. - -- `-g ` or `--grep `: Only run tests matching this regular expression. For example, this will run `'should add to cart'` when passed `-g "add to cart"`. - -- `--grep-invert `: Only run tests **not** matching this regular expression. The opposite of `--grep`. - -- `--global-timeout `: Total timeout for the whole test run in milliseconds. By default, there is no global timeout. Learn more about [various timeouts](./test-timeouts.md). - -- `--list`: List all the tests, but do not run them. - -- `--max-failures ` or `-x`: Stop after the first `N` test failures. Passing `-x` stops after the first failure. - -- `--output `: Directory for artifacts produced by tests, defaults to `test-results`. - -- `--project `: Only run tests from one of the specified [projects](./test-advanced.md#projects). Defaults to running all projects defined in the configuration file. - -- `--quiet`: Whether to suppress stdout and stderr from the tests. - -- `--repeat-each `: Run each test `N` times, defaults to one. - -- `--reporter `: Choose a reporter: minimalist `dot`, concise `line` or detailed `list`. See [reporters](./test-reporters.md) for more information. - -- `--retries `: The maximum number of [retries](./test-retries.md#retries) for flaky tests, defaults to zero (no retries). - -- `--shard `: [Shard](./test-parallel.md#shard-tests-between-multiple-machines) tests and execute only selected shard, specified in the form `current/all`, 1-based, for example `3/5`. - -- `--timeout `: Maximum timeout in milliseconds for each test, defaults to 30 seconds. Learn more about [various timeouts](./test-timeouts.md). - -- `--trace `: Force tracing mode, can be `on`, `off`, `on-first-retry`, `retain-on-failure` - -- `--ignore-snapshots`: Whether to ignore [snapshots](./test-snapshots.md). Use this when snapshot expectations are known to be different, e.g. running tests on Linux against Windows screenshots. - -- `--update-snapshots` or `-u`: Whether to update [snapshots](./test-snapshots.md) with actual results instead of comparing them. Use this when snapshot expectations have changed. - -- `--workers ` or `-j `: The maximum number of concurrent worker processes that run in [parallel](./test-parallel.md). +| Option | Description | +| :- | :- | +| `--headed` | Run tests in headed browsers. Useful for debugging. | +|`--browser`| Run test in a specific browser. Available options are `"chromium"`, `"firefox"`, `"webkit"` or `"all"` to run tests in all three browsers at the same time. | +| `--debug`| Run tests with Playwright Inspector. Shortcut for `PWDEBUG=1` environment variable and `--timeout=0 --max-failures=1 --headed --workers=1` options.| +| `-c ` or `--config `| Configuration file. If not passed, defaults to `playwright.config.ts` or `playwright.config.js` in the current directory. | +| `-c ` or `--config `| Configuration file. If not passed, defaults to `playwright.config.ts` or `playwright.config.js` in the current directory. | +| `--forbid-only` | Whether to disallow `test.only`. Useful on CI.| +| `-g ` or `--grep ` | Only run tests matching this regular expression. For example, this will run `'should add to cart'` when passed `-g "add to cart"`. | +| `--grep-invert ` | Only run tests **not** matching this regular expression. The opposite of `--grep`. | +| `--global-timeout ` | Total timeout for the whole test run in milliseconds. By default, there is no global timeout. Learn more about [various timeouts](./test-timeouts.md).| +| `--list` | list all the tests, but do not run them.| +| `--max-failures ` or `-x`| Stop after the first `N` test failures. Passing `-x` stops after the first failure.| +| `--output ` | Directory for artifacts produced by tests, defaults to `test-results`. | +| `--pass-with-no-tests` | Allows the test suite to pass when no files are found. | +| `--project ` | Only run tests from one of the specified [projects](./test-advanced.md#projects). Defaults to running all projects defined in the configuration file.| +| `--quiet` | Whether to suppress stdout and stderr from the tests. | +| `--repeat-each ` | Run each test `N` times, defaults to one. | +| `--reporter ` | Choose a reporter: minimalist `dot`, concise `line` or detailed `list`. See [reporters](./test-reporters.md) for more information. | +| `--retries ` | The maximum number of [retries](./test-retries.md#retries) for flaky tests, defaults to zero (no retries). | +| `--shard ` | [Shard](./test-parallel.md#shard-tests-between-multiple-machines) tests and execute only selected shard, specified in the form `current/all`, 1-based, for example `3/5`.| +| `--timeout ` | Maximum timeout in milliseconds for each test, defaults to 30 seconds. Learn more about [various timeouts](./test-timeouts.md).| +| `--trace ` | Force tracing mode, can be `on`, `off`, `on-first-retry`, `retain-on-failure` | +| `--ignore-snapshots` | Whether to ignore [snapshots](./test-snapshots.md). Use this when snapshot expectations are known to be different, e.g. running tests on Linux against Windows screenshots. | +| `--update-snapshots` or `-u` | Whether to update [snapshots](./test-snapshots.md) with actual results instead of comparing them. Use this when snapshot expectations have changed.| +| `--workers ` or `-j `| The maximum number of concurrent worker processes that run in [parallel](./test-parallel.md). |