Sponsored Link
Looking for a unified way to  viewmonitor, and  debug Playwright Test Automation runs?
Try the Playwright Dashboard by today. Use the coupon code PWSOL10 for a 12 month 10% discount.

Is there a way to list all the Playwright tests without running them?

Yes, yes there is! The below command can be run and will give you a list of all the tests that would be run. Listing out the tests gives you access to the file name and location of the test, test name, total number of tests, and total number of files. Using reporter=json will provide a file that can be consumed by other programs.

npx playwright test --list

npx playwright test --list --reporter=json

Enjoy!