Five Playwright CLI features you should know



AI Summary

The video explains advanced Playwright test running commands and options to improve test efficiency. It demonstrates running all tests with npx playwright test and selectively running tests by specifying file paths or only changed files using Git awareness. It highlights usage of the --last-failed flag to rerun only failed tests from the last run, aiding in quicker debugging. The video also introduces repeating tests multiple times to identify flaky tests and the --forbid-only flag to prevent accidental commits of test.only in CI pipelines. Finally, it covers running Playwright tests in UI mode with the --headed and --workers=1 flags for better debugging. The content aims to help Playwright users optimize their testing workflows and avoid common pitfalls.