-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add junit report format #920
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
Add junit report format #920
Conversation
Hey @zricethezav, this PR is ready for review 🚀 |
@maltemorgenstern would you mind updating this? Also since I do not have any junit experience would you mind keeping an eye on this moving forward when it gets merged in? |
Hey @zricethezav
Sure - I will take a look at this the next few days and solve the conflicts!
I must admit that I am not really familiar with the But I should definitely be able to take a look at future PRs and test them with the GitLab integration. |
@zricethezav this PR is now up-to-date again and ready for review/merge. |
Would really love to see junit support to integrate with CI and have a standardized format. ;) |
Hey @zricethezav, |
been keeping an eye on the PR, as it seems really useful. it has been open for quite some time... any plans on merging it? |
|
||
for _, test := range tests { | ||
// create tmp file using os.TempDir() | ||
tmpfile, err := os.Create(filepath.Join(tmpPath, test.testReportName+".xml")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zricethezav report_test.go
declares tmpPath
but this file doesn't (re: comment on Discord).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can confirm tmpPath is not declared. my pipelines broke today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix't in b1d59bf
* add junit report format * add fingerprint to expected test result to fix tests * fix expected junit test report
Description:
This merge request adds
junit
as a new report format.As described in #404 junit reports can be integrated with CI/CD systems as test reports for easier visualisation in the browser and merge requests. I tested these changes with the GitLab Unit Test Reports feature.
That's why the generated
junit
format follows the GitLab requirements. In general it is based on the IBM junit format with some additional and missing attributes (some of them could be added in the future if needed).Here is an example of the GitLab integration:
Click to expand!
Links/Docs:
This MR closes #404
Unrelated change
I also added
testdata/expected/report/*.got.*
to the.gitignore
because they should not be commited to the repo.Checklist: