[Bug]: json report not generated using merge-reports
Version
1.46.1
Steps to reproduce
- Generate several blob reports into the
/all-blob-reportsfolder. - Execute
npx playwright merge-reports --reporter json ./all-blob-reportsto 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
As a workaround I'm doing npx playwright merge-reports --reporter json ./all-blob-reports > playwright-report/report.json
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.
Closing as per above.