Playwright CLI Grep Option
grep & grep-invert
07/13/2025
read time: 1 min
Playwright has some interesting CLI options for the regular npx playwright test
command. Today I learned about the --grep
and --grep-invert
options. They both search for a regex in the test names and test tags. the --grep
runs all tests matching the regex and --grep-invert
runs all tests that don’t match the regex. Pretty cool!