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

xunit xml reporting #39

Open
tadas-subonis opened this issue Feb 9, 2022 · 6 comments
Open

xunit xml reporting #39

tadas-subonis opened this issue Feb 9, 2022 · 6 comments

Comments

@tadas-subonis
Copy link

How can I output my test results in xunit/junit XML format? This would help me integrate with CI easier.

@Shinmera
Copy link
Owner

Shinmera commented Feb 9, 2022

You'll have to write a serialiser yourself.

@tadas-subonis
Copy link
Author

tadas-subonis commented Feb 9, 2022 via email

@Shinmera
Copy link
Owner

Shinmera commented Feb 9, 2022

No. test returns a report which has a results list. Transforming that into whatever format you need should be trivial, though.

@daewok
Copy link

daewok commented Feb 24, 2022

I've got a quickly hacked together thing at: https://gitlab.common-lisp.net/cl-tar/cl-tar-file/-/blob/ee44e6e30a2074849af51199f99813141454e89c/test/report.lisp

An example of GitLab CI reading the results and displaying them: https://gitlab.common-lisp.net/cl-tar/cl-tar-file/-/pipelines/6095/test_report

Still a work in progress, but I plan to split it into its own system when it's a little more polished.

One thing I learned while doing it is there doesn't seem to be a single JUnit format. I wrote that to target GitLab. It might need some massaging to target other CI platforms (for instance, GitLab allows nested testsuite tags).

@selwynsimsek
Copy link

I've got a quickly hacked together thing at: https://gitlab.common-lisp.net/cl-tar/cl-tar-file/-/blob/ee44e6e30a2074849af51199f99813141454e89c/test/report.lisp

An example of GitLab CI reading the results and displaying them: https://gitlab.common-lisp.net/cl-tar/cl-tar-file/-/pipelines/6095/test_report

Still a work in progress, but I plan to split it into its own system when it's a little more polished.

One thing I learned while doing it is there doesn't seem to be a single JUnit format. I wrote that to target GitLab. It might need some massaging to target other CI platforms (for instance, GitLab allows nested testsuite tags).

We are interested in adding this functionality to Parachute as an extension. I've managed to get your code working locally to produce JUnit test reports.

How would you prefer to handle this? We could polish up your hack and include it, but it would have to be under the 'zlib' licence, like the rest of Parachute.

@Shinmera
Copy link
Owner

@daewok Ping

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

No branches or pull requests

4 participants