I wanted to have my Playwright reports generated in a specific folder (other than default) for an unrelated requirement.
I set the PLAYWRIGHT_HTML_REPORT
as an environment variable (with dotenv) and successfully got the report generated there
The problem is that npx playwright show-report
- which should show me the last generated report - does not seem to honor this setting
As a result, my script always fails to find the generated report until I manually add that path as an argument into the show-report command.
Is this the correct and expected behavior or am I missing something that would allow show-report to find the last report correctly using the env var
This thread is trying to answer question "Is it expected behavior for the `npx playwright show-report` command to not find the last report correctly using the `PLAYWRIGHT_HTML_REPORT` environment variable, or is there a way to make it do so?"
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].