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

Add JUnit reporter #586

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add JUnit reporter #586

wants to merge 6 commits into from

Conversation

mrdannael
Copy link

Closes #568

PR aims to implement a reporter for generating JUnit xml. Without --reporter-options it will output the results to the console. By providing path value, the reporter will try to put the output into the file.

Added small "fast-xml-parser" package to the knip package.

Also updated the docs with info about Junit reporter.

</testsuite>
<testsuite name="Unlisted dependencies" tests="2" failures="2">
<testcase tests="1" failures="1" name="Unlisted dependencies" classname="src/index.ts">
<failure message="Unlisted dependencies - unresolved" type="Unlisted dependencies">Unlisted dependencies: "unresolved" inside src/index.ts</failure>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know anything about this format, but will each issue be in its own node, or should it be? This example gives me the impression that all unlisted dependencies will end up in this single node? Or will each one have the "Unlisted dependencies: " prefix?

Maybe you could show an example of how it looks like in the CI environment (eg. Bitbucket)?

Copy link
Author

@mrdannael mrdannael Apr 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing. I've already used this junit reporter during development and tested it with configured Bitbucket. I'll gather some real-life data and post it here for further discussion.

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.

Junit reporter
2 participants