Rayrun

What are some potential reasons for continuous test execution with @playwright/test on a new computer and how can they be addressed?

Answer

Troubleshooting Continuous Test Execution in Playwright

If your tests keep running non-stop on your new machine, it could be due to your CI environment settings.

Azure Pipelines

For Azure Pipelines, check your trigger setup. Here's an example configuration for running Playwright tests with different browsers and sharding:

trigger:
  branches:
    include:
    - master
    - releases/*
  paths:
    exclude:
    - README.md

Sharding helps distribute tests across multiple jobs for better parallelization.

GitHub Actions

For GitHub Actions, your workflow file should have the necessary steps. Here's an example:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
  with:
    node-version: '18'
- run: npm ci
- run: npx playwright install --with-deps
- run: npm test

This workflow checks out code, sets up Node.js, installs dependencies, and runs tests.

Other Causes

Misconfigured triggers or event handlers in your CI pipeline could also cause continuous test execution. Check for any deployment status events or triggers that might initiate test runs automatically.

To fix this, review and adjust your CI configuration files. Make sure all dependencies are installed correctly and triggers/events are set up properly. If you're still having issues, check out the Playwright documentation or seek help from community forums or support channels.

References

Thank you!
Was this helpful?
Still have questions?

If you still have questions, please ask a question and I will try to answer it.

Related Discord Threads

Related Questions

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.