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

Enhancement: Merge summary reports from shards #28

Open
Vivek-Kini opened this issue Dec 24, 2024 · 4 comments
Open

Enhancement: Merge summary reports from shards #28

Vivek-Kini opened this issue Dec 24, 2024 · 4 comments

Comments

@Vivek-Kini
Copy link

First of all, thanks a lot for getting this summary. Its very useful snapshot after the gha completes Test execution for a quick view.

We usually use the test matrix to run our tests and hence we have different shards within the GHA CI workflow. Is there a possibility where we can merge these different sections of reporting to be merged into one consolidated view report so that one github summary section covers everything?

@estruyf
Copy link
Owner

estruyf commented Dec 25, 2024

If you shard your tests, you should be able to collect all shards and run the merge-reports command.

npx playwright merge-reports --config=merge.config.ts ./blob-reports

The config (merge.config.ts):

import type { GitHubActionOptions } from "@estruyf/github-actions-reporter";

export default {
  testDir: "./tests",
  reporter: [
    ['@estruyf/github-actions-reporter', <GitHubActionOptions>{
      title: 'All test results',
      showError: true
    }],
  ],
};

@Vivek-Kini
Copy link
Author

Thanks, I do merge reports and then have a final html report available to analyze from blobs(generated by shards).

However, this reporter (gha reporter) does take the results to display on GitHub summary after the individual shard's execute and not on merged final report.

@estruyf
Copy link
Owner

estruyf commented Jan 4, 2025

@Vivek-Kini that is why you should create a separate configuration which you use for the merge-reports command. It should be handled by Playwright that way.

How are you currently doing this for the HTML report?

@Vivek-Kini
Copy link
Author

@Vivek-Kini that is why you should create a separate configuration which you use for the merge-reports command. It should be handled by Playwright that way.

How are you currently doing this for the HTML report?

currently, we have setup for each shards to create blob reports and then after all the shards are completed, I create one HTML report after merging. However, gha reporter creates summary based on the test execution on shards.. so I see the individual summaries.

Rather, if there's a specific input file which can be provided to gha reporter which can provide summary would be helpful.

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