Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: merge-report does not generate any output for the HTML reporter #31417

Open
OptimusCrime opened this issue Jun 24, 2024 · 3 comments
Open

Comments

@OptimusCrime
Copy link

OptimusCrime commented Jun 24, 2024

Version

1.44.1

Steps to reproduce

We have copied the blueprint for combining reports into a single report in a GitHub action:

      - name: Download blob reports from GitHub Actions Artifacts
        uses: actions/download-artifact@v4
        with:
          path: all-blob-reports
          pattern: blob-report-*
          merge-multiple: true

      - name: Merge into HTML Report
        env:
          CI: true
          PW_TEST_HTML_REPORT_OPEN: never
        run: npx playwright merge-reports --reporter=html ./all-blob-reports

      - name: Upload HTML report
        uses: actions/upload-artifact@v4
        with:
          name: html-report--attempt-${{ github.run_attempt }}
          path: playwright-report
          retention-days: 14

From: https://playwright.dev/docs/test-sharding#github-actions-example

The output:

merging reports from /home/runner/path/to/workspace/all-blob-reports
extracting: all-blob-reports/report-1.zip
extracting: all-blob-reports/report-2.zip
extracting: all-blob-reports/report-3.zip
-----
Warning: No files were found with the provided path: playwright-report. No artifacts will be uploaded.

Expected behavior

I expect the report to be in the playwright-report directory.

Actual behavior

There's no output from the merged report, without any explanation as to why.

Additional context

This problem seems to happen sporadically, but I can't narrow down when it works and when it does not work. I originally though that it had something to do with rerunning jobs, but I don't think so.

I have also tried to sleep after generating the report, in case this was a timing issue. No luck. I have also tried to ls the contents of the work directory and the playwright-report directory, but sometimes it is just outright missing.

There is nothing in the merge-report output that ever explains what went wrong.

Environment

N/A. Running on GitHub Actions.
@pavelfeldman
Copy link
Member

I expect the report to be in the playwright-report directory.

This is a wrong expectation. See https://playwright.dev/docs/test-reporters#blob-reporter for more details.

@OptimusCrime
Copy link
Author

OptimusCrime commented Jun 25, 2024

@pavelfeldman Not sure if I understand. The fragmented reports were generated by the blob reporter, but I am trying to combine these reports into a single report, using this command:

npx playwright merge-reports --reporter=html ./all-blob-reports

This uses the html reporter as far as I can tell? Maybe I have misunderstood? We're using the setup found here: https://playwright.dev/docs/test-sharding#github-actions-example

@pavelfeldman
Copy link
Member

I misunderstood your case. If it happens sporadically, that would mean that someone is removing this folder. Playwright itself removed the folder when the tests are starting. Cold it be that you are running Playwright tests on the same machine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants