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]: json report not generated using merge-reports #33131

Open
vvargas90 opened this issue Oct 16, 2024 · 2 comments
Open

[Bug]: json report not generated using merge-reports #33131

vvargas90 opened this issue Oct 16, 2024 · 2 comments

Comments

@vvargas90
Copy link

Version

1.46.1

Steps to reproduce

  1. Generate several blob reports into the /all-blob-reports folder.
  2. Execute npx playwright merge-reports --reporter json ./all-blob-reports to generate a combined json report

Expected behavior

There is a generated report.json file in /playwright-report directory

Actual behavior

The report is displayed as stdout but not stored into any file

Additional context

When running the same command but having as output an html report it does generate all the necessary artifacts in playwright-report folder. Example output:

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

merging reports from /Users/my-user/repos/my-project/all-blob-reports
extracting: all-blob-reports/report-chromium.zip
extracting: all-blob-reports/report-ios.zip
extracting: all-blob-reports/report-firefox.zip
extracting: all-blob-reports/report-mobile.zip
merging events
processing test events
building final report
finished building report

Environment

System:
OS: macOS 13.5
CPU: (8) arm64 Apple M2
Memory: 75.84 MB / 16.00 GB
Binaries:
Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node
npm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npm
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/test: ^1.46.1 => 1.46.1

@vvargas90
Copy link
Author

As a workaround I'm doing npx playwright merge-reports --reporter json ./all-blob-reports > playwright-report/report.json

@vvargas90 vvargas90 changed the title [Bug]: [Bug]: json report not generated using merge-reports Oct 16, 2024
@dgozman
Copy link
Contributor

dgozman commented Oct 16, 2024

You need to pass an environment variable to make it write into a file. See docs. Let me know if you have any other questions.

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