Closed hari-prasad1 closed 4 months ago
In Windows a filename cannot contain a colon :
. Could you try e.g.:
reporter: [['html', { outputFolder: 'playwright-report-' + new Date().toISOString().replace(/[:\.]/g, '-') }]],
that might be the issue.
@mxschmitt this worked. Thanks also is there a way to add the testname to the foldername?
A HTML Report contains multiple tests for multiple test files, so this won't work.
Closing since the original issue has been solved.
🚀 Feature Request
I see that everytime a test is ran, the index.html file is overwritten. Is there a way to bypass that? As I need the result files to be individual with more no of tests that I run. I tried changing the output folder name to be dynamic as suggested in a similar prev query as below
reporter: [['html', { outputFolder: 'my-report'+ (new Date()).toISOString() }]]
but when this is used, I'm getting the below error
Error in reporter Error: ENOENT: no such file or directory, mkdir 'C:\Users\hari.prasad\Demo\Sample\my-report2024-05-28T03:33:37.485Z'
any suggestions would be much appreciated
Example
No response
Motivation
It'll help storing results more efficiently