Rayrun
← Back to Discord Forum

Playwright VSCode extension not picking up my tests

As the title says. As of yet, I've been exclusively running playwright from the CLI, but I want to play around with the locator generators in the VSCode extension. However, when I install the Playwright extension and open the "Tests" tab, no tests show up. I have playwright.config.js at the root of my vscode workspace, and test/xyz.spec.js, matching the testDir option in my config file. But the tests don't show up. When I try clicking the "refresh" button in the test tab, I get a vscode warning telling me "Please install Playwright Test via running npm i --save-dev @playwright/test" - but I already have that installed. It's in my package.json and I can run things fine from the CLI. I ran the install anyways, but it didn't change anything.

This thread is trying to answer question "Why is the Playwright VSCode extension not picking up my tests despite having the correct configuration and installation?"

3 replies

I also tried uninstalling and reinstalling the Playwright Test extension, but no luck there.

Can you post your config file, also your a screenshot of your source tree showing a spec file and your terminal where you start your command.

One thing you can try is see if a default project works out of the box. If this works the issue usually is just configuration. If it doesn't work you might have a VS code extension conflicting with playwright extension.

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.