Playwright Test found no tests for the command you ran. First check that you are in the intended project and using the intended configuration; then verify that your test files are inside the configured test directory, match the configured filename pattern, and are not excluded by ignore rules or command-line filters. Run npx playwright test --list to see what Playwright collects without running it.
The message does not, by itself, mean your browser or test code is broken. An empty new project can produce it before you add a test; an existing project may have a discovery or selection mismatch.
What “No Playwright Tests Found” means
Playwright Test discovered zero tests for the current invocation. That is a collection or selection result, not proof that a browser failed to launch: if collection is empty, there is no test for the runner to execute.
The CLI may display Error: No tests found. Make sure that arguments are regular expressions matching test files. or simply No tests found. The wording can point toward path arguments, but the underlying issue may instead be an empty project, the active configuration, filename conventions, ignore rules, or other filters.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Work through the checks below in order. Use --list to confirm collection before investigating browser installation, navigation, or assertions.
1. Confirm the project directory and active config
By default, the Playwright test command looks for playwright.config.ts or playwright.config.js in the current directory. If you launch it from a different directory, it may not use the configuration you expect. You can select a config explicitly with -c.
- Change to the project directory that contains the config you intend to use, then list collected tests:
cd path/to/project
npx playwright test --list - If the config is elsewhere or you want to remove ambiguity, specify it directly:
npx playwright test -c path/to/playwright.config.ts --list - Compare the config path in the command with the repository and scripts you actually use. A package script or CI command may pass a different config or run from a different working directory.
If the explicit-config command finds tests but the ordinary command does not, focus on the current directory, the config selected by the ordinary command, and any options added by your script or CI job.
2. Check the configured test directory
testDir tells Playwright where to look. It scans that directory recursively and, if it is not set, defaults to the directory containing the config. A project-specific testDir can also differ from the top-level setting, so check both the global config and the project whose tests you expect to run.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- Find the test files’ actual locations in your repository.
- Compare those paths with the global and project-specific
testDirvalues in the active config. - Make sure the files are below the directory used by the project you intend to select.
For example, if the active test directory is tests but your specs live in e2e, either move the files or change the configuration to point to the intended directory. A project’s test directory is not necessarily the same as the repository root.
3. Make sure filenames match testMatch
Even when a file is under testDir, Playwright only collects it if it matches testMatch and is not excluded. The documented default pattern is **/*.@(spec|test).?(c|m)[jt]s?(x). It accepts common names such as login.spec.ts and login.test.js, as well as supported CommonJS, ES module, JavaScript, TypeScript, JSX, and TSX variants.
- Check for the
.specor.testsegment before the extension when using the default pattern. - Check for a misspelling, unexpected extension, or a custom suffix such as
_test.ts. - If the project intentionally uses another naming convention, update
testMatchin the active config to include it.
Do not assume a file is a Playwright test just because it contains test-like code. The path and filename must also pass discovery rules, and the file must define tests in the form expected by Playwright Test.
4. Inspect ignore rules
A matching file can still be hidden by testIgnore. Check the active configuration for global and project-specific ignore patterns, and see whether a pattern catches the file or one of its parent directories.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
There is also a conditional .gitignore behavior: when neither a global nor a project-specific testDir is set, Playwright ignores files matching .gitignore entries by default. If you explicitly set a test directory, that default behavior does not apply in the same way. Check the relevant .gitignore entries rather than assuming every ignored repository path is eligible for discovery.
For a temporary diagnostic, adjust or remove the specific exclusion and rerun --list. Avoid broadly removing ignore rules without checking why they were added.
5. Remove command-line filters temporarily
Playwright can find test files and still collect none for a particular command because its filters narrow the selection. For a clean diagnostic, rerun the list command without these options:
- Positional path arguments: these are regular-expression matches against full test file paths. A path that looks plausible as a directory or filename may not match the resolved path as expected.
--grepand--grep-invert: these filter tests by title. A typo or overly narrow expression can exclude every test.--project: this selects configured projects. The chosen project may use a different test directory or otherwise not include the files you are checking.
For example, compare your filtered command with npx playwright test --list. If the unfiltered command lists tests, add your original positional argument, grep expression, and project selection back one at a time. The option that makes the list empty identifies the selection mismatch.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsRank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
6. Use --list to verify collection
--list collects tests and prints the files and test titles without executing the tests. It is the most direct way to distinguish a discovery problem from failures that happen during browser execution.
- Run
npx playwright test --listfrom the intended project directory. - Review the printed file paths and titles. Confirm the expected spec files and tests appear.
- If the list is empty, return to the config, directory, filename, ignore, and filter checks above.
- Once the expected tests appear, run
npx playwright testwith the intended options to execute them.
If your installed version’s available options differ, run npx playwright --help to see the command options available in that installation.
7. If this is a new project, add a test
If there are no test files yet, the message is expected. The WordPress Developer Blog shows Error: No tests found before its first test is created, then adds a main.spec.js file. Create a file below the configured test directory using a recognized suffix, add a Playwright Test case, and run --list again.
For example, with the default config directory as the test directory, a file named tests/example.spec.ts is discoverable if tests is below that directory and no configuration or CLI filter excludes it. If you choose a different location or naming convention, configure testDir or testMatch accordingly.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Common symptoms and fixes
| Symptom | Likely check | How to verify or fix |
|---|---|---|
--list is empty, and the project has no specs. |
No tests have been written yet. | Add a test file under the configured directory with a name matching testMatch, then rerun --list. |
| Specs exist, but none appear in the list. | Active config, testDir, filename pattern, or ignore rule. |
Pass the intended config with -c; compare file paths with global and project-specific settings. |
| Tests appear without filters but vanish with your usual command. | Positional path, grep, or project selection. | Remove filters, then restore them one at a time while checking --list. |
| A file is in the expected directory but is not collected. | Its name does not match testMatch, or it is ignored. |
Use a supported default name such as login.spec.ts, or deliberately adjust the pattern; inspect testIgnore and applicable .gitignore rules. |
| Local runs find tests, but a script or CI run does not. | Different working directory, config, arguments, or project selection. | Compare the exact command and working directory, then run its equivalent with --list. |
| The list shows expected tests, but execution fails afterward. | This is no longer a zero-discovery issue. | Use the actual execution error to investigate browser setup, navigation, test hooks, or assertions. |
Or skip the browser setup
ScreenshotNeo is a separate option for taking website screenshots through an API or MCP server; it does not configure Playwright Test or fix test discovery. If your task is to capture a website image rather than run Playwright tests, one GET request can return a screenshot. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and other MCP clients. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots. Details are at ScreenshotNeo. Sign up for 1,000 free screenshots a month, with no card required.
Frequently Asked Questions
Should I install browsers when Playwright says no tests were found?
Not as the first step. Check collection with npx playwright test --list; browser installation is relevant only after Playwright has collected tests and execution reports a browser-related error.
Can a test file be discovered if its extension is JavaScript or TypeScript?
Yes. The default filename pattern includes supported JavaScript and TypeScript variants, provided the basename also matches the spec or test naming pattern.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

