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

CI: Don't overwrite /app/reports directory with html reporter. #4246

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

absoludity
Copy link
Contributor

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 is playwright-report. But on the 1.0.0 image, both were set to the same reports/.

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

  • fixes #

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.

@castelblanque
Copy link
Collaborator

Awesome Michael, thanks!

I noticed it's commented out on the 1.0.1 image

Yeah, don't remember very well, but I disabled it due to causing some problems. Hadn't had the time to properly tackle it.

@castelblanque
Copy link
Collaborator

BTW if we want the HTML report in CircleCI we should add the integration/reports-html in the step of storing artifacts. Here and here.

@castelblanque
Copy link
Collaborator

I'll let you push the 1.0.2 image if you approve

Oki, will do.

Signed-off-by: Michael Nelson <minelson@vmware.com>
@absoludity absoludity merged commit b5bcc9b into vmware-tanzu:main Feb 8, 2022
@absoludity absoludity deleted the ci-failure-investigation branch February 8, 2022 11:10
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

Successfully merging this pull request may close these issues.

None yet

2 participants