-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Feature request: Support JUnit XML output format #459
Comments
Good idea! Do you want to work on it, or should I mark this issue as up-for-grabs? |
I can give it a go, but will probably reach out for assistance once I have something ready for a PR. |
There is a tool already available one could leverage -- https://github.com/jstemmer/go-junit-report. I did the following in my local env --
|
@zegl can you assign this issues to me? I will try to upload a pr within the next week. |
@kaluzaaa any progress on the PR. I think this is a useful feature to integrate with gitlab CI |
@zegl please lmk if this is up for grabs, or if not what's the timeline |
@wscourge I don't think that anyone is working on this at the moment. Feel free to work on it, and send a PR. :-) |
example in gitlab ci kube-score-junit:
stage: test
when: always
needs:
- kube-score
image:
name: node
before_script:
- npm install -g sarif-junit@latest
script:
- sarif-junit -i result.json -o result.xml
artifacts:
reports:
junit: "result.xml"
kube-score:
stage: test
# allow_failure: true
image:
name: zegl/kube-score
entrypoint: [""]
script:
- $(/kube-score score *.yaml -v -o sarif > result.json) || true
- /kube-score score *.yaml
artifacts:
when: always
paths:
- result.json |
I've experimented a bit with this tool on some YAML files at work. The output format is currently limited to
human
(which is neat for just finding and fixing potential issues) andci
(just one line per test). It'd be nice to support also junit. This format allows to see the results more clearly for each of the tests. JUnit is supported also by GitLab, and on other platforms (GitHub), and despite the misleading name, it appears to be a more universal format.https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=trx%2Cyaml
https://docs.gitlab.com/ee/ci/unit_test_reports.html
https://support.atlassian.com/bitbucket-cloud/docs/test-reporting-in-pipelines/
The text was updated successfully, but these errors were encountered: