CI: Don't overwrite /app/reports
directory with html reporter.
#4246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Michael Nelson minelson@vmware.com
Description of the change
This PR doesn't fix any failing tests (see Rafa's #4243 for that), but rather solves an issue of the disappearing local screenshots and videos.
In the end, it was simply that the 1.0.0 image had the html reporter enabled and set to write to the same directory as the test reports. Turns out the reporter overwrites the directory. So the screenshots and videos were being written and saved, then at the end the html report was generated and overwrote the directory.
This doesn't happen by default, because the default output directory used for automatic screenshots etc. is
test-results
and the default output for the html reporter isplaywright-report
. But on the 1.0.0 image, both were set to the samereports/
.I've enabled the reporter, assuming that is the intention given it's enabled on the 1.0.0 image (though I noticed it's commented out on the 1.0.1 image, but perhaps it was for this reason). I'll let you push the 1.0.2 image if you approve Rafa.
Benefits
We can view the screenshots and videos as well as the html report.
Possible drawbacks
None.
Applicable issues
Additional information
How did I find the cause? I wrote a new test which created explicit screenshots to different paths, and noted that even then, all would be written fine except the ones I added to the
/app/reports
directory, which were missing. I then touched some files in that directory and re-ran my test, noting that those files disappeared when the test ran, so something was wiping the directory clean. Then it was just figuring out what was causing it.