Rayrun
โ† Back to Discord Forum

No tests found

imene_66383posted in #help-playwright
Open in Discord

I'm currently working on setting up Playwright for testing, and I've run into an issue that I could use some assistance with. I've followed all the necessary steps to create a new folder and a new test file, but when I attempt to run the test using the following command: 'npx playwright test .\tests\example.spec.js' I encounter the error message "No test found." However, when I run the basic test using just 'npx playwright test' it works perfectly.

image.png

This thread is trying to answer question "Why does the error message 'No test found' appear when trying to run a specific test file in Playwright?"

8 replies
debbieobrien
debbieobrien

check your config file to see what your test directory is set to

I'm new, can you told me how ?

@imene_66383: https://playwright.dev/docs/test-configuration the testDir property

still have the same problem, when i add the file name to the test command it says error

Thank you ๐Ÿ™

You probably changed the name of your directory to something else, it's usually test by default and that is what you are referring to in your cli command.

it's working now, i changed the directory in the config.js file

thank you everyone!

Related Discord Threads

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 [email protected].