Rayrun
← Back to Discord Forum

Playwright test failed when i run npx playwright test but passed in VS code playwright extension

thestructionposted in #help-playwright
Open in Discord

Hello, some of my tests are failing when i run npx playwright test on terminal but all passed VS code playwright extension.

image.png
image.png
image.png

This thread is trying to answer question "Why do some Playwright tests fail due to timeouts when run all at once in the terminal but pass when run individually or with the VS Code Playwright extension?"

6 replies

When i run test file one at a time using npm playwright test on terminal, it will passed, but when i run all the test at once some will fail due to timeout.

all passed when i ran the test file alone

image.png
mittree_47147

@thestruction did you ever find out what was causing this?

There is nothing useful here to say anything other than it sounds like tests are not independant.

Would assume that those tests that are failing have an issue when running in parallel. Capture a trace on, you should see the difference when running sequentially versus parallel. Based on the timeout, you are not on the page you are expecting so the element is not found. Again, only assumptions based on the data provided.

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].