Issue running playwright tests into codefresh or another CI/CD tool

51 Views Asked by At

I have the following code to run the playwright tests into codefresh:

    test:
        title: 'Run E2E Tests'
        type: 'freestyle'
        image: 'mcr.microsoft.com/playwright:v1.40.0-jammy'
        working_directory: '${{clone}}'
        stage: test
        fail_fast: false
        commands:
            - npx playwright install --with-deps
            - xvfb-run npx playwright test

and I opened the browser to the tests like this:

   const browser = await chromium.launchPersistentContext('', {
        args: ['--disable-web-security', '--allow-insecure-localhost', '--no-sandbox', '--disable-setuid-sandbox'],
        bypassCSP: true,
        headless: false,
    });

But I have this error when the tests try to run:

Executing command: xvfb-run npx playwright test

Running 2 tests using 1 worker
°
Timed out waiting 1000s for the test suite to run

Timed out waiting 1000s for the teardown for test suite to run

  2 skipped
  Timed out waiting 1000s for the entire test run
Reading environment variable exporting file contents.
Reading environment variable exporting file contents.

Any idea?

0

There are 0 best solutions below