← Back to Discord Forum

Running 3 tests using 3 workers

I have only one test in my 'apiTest.spec.ts' file and I'm running it with 'npx playwright test apiTest.spec.ts ' command. My question is, why it says:"Running 3 tests" but there is only one test? Why is a single test run 3 times? Only Chromium browser is enabled and the rest of the browsers are disabled.

This thread is trying to answer question "Why does Playwright report 'Running 3 tests' when there is only one test in the 'apiTest.spec.ts' file?"

4 replies

if you have default playwright.config.ts file, it has 3 projects defined

Jesus Christ! (facepalm) I didn't comment on the whole object but just the 'name:..., use:...' part. Tnx Julius!

Note that if you just want to run on one browser (ie. one project), you can specify it on the commandline, instead of commenting the others out, e.g:

npx playwright test --project=chromium

Tnx guys

Related Discord Threads

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.