-
Notifications
You must be signed in to change notification settings - Fork 109
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 file attr #71
Add file attr #71
Conversation
Hey thanks for clarifying. I'm concerned about merging this because, as far as I can tell, it would not be a valid junit xml file after this change. You can see from here https://github.com/jest-community/jest-junit/blob/master/__tests__/lib/junit.xsd that testcase elements don't have a "file" attribute or sub-element. We do have an automated test which tests the generated xml against the xsd included in the project so clearly it passed. But my concern is that it may mess with other CI environments/systems that are possibly more strict? Let me do a bit of research on this and see if this could cause any potential problems. I would love to extend the junit and add all sorts of things but it's crucial that we maintain compatibility. |
In my experience the "classname" is the attribute on "testcase" which can represent the path to the file. In a java system it tends to, anyway. This is already configurable in jest-junit and your previous PR would make that a relative file path. Would circle-ci handle "classname" like you are wanting? |
It seems no. Without file attrhttps://circleci.com/gh/mtsmfm/jest-junit/7 With file attr |
Ok thanks for the detailed explanation and for being patient on this. I merged the other PR. Will spend a few days researching if this change would cause any known issues. Regardless, this change + the other PR will likely result in a new major version to be on the safe side since this would potentially be a breaking change. |
@palmerj3 Have you found this change breaks something? |
Hey @mtsmfm I'm doing my best to talk with a few CI vendors about this to see if there is any likelihood if it breaking. Again, my main concern here is that this is technically not valid junit xml. If it is only circle ci that makes use of this non standard attribute then I would prefer for them to update their systems to support className. But if you don't mind giving me another week I'll do my best to see if this is likely to actually break anything and possibly talk to the folks at circle. |
@mtsmfm so after speaking to some folks from circle and a few other folks familiar with this space I think it's safe for me to merge this. I will be even more safe and do a major version bump even though it's probably not necessary. Thanks again for making this change! |
@mtsmfm 6.0.0 has been published with these changes. Thank you! https://github.com/jest-community/jest-junit/releases/tag/v6.0.0 |
@palmerj3 Thanks!
Just curious though, could you tell me why did you change your mind?
I researched and I couldn't find any other tools which accepts |
@mtsmfm all the folks I talked to reassured me that there was no, one, standard for junit files. So, although they do all follow a similar structure, something like this should cause no harm to systems that don't recognize the "file" attribute. |
@mtsmfm so it appears that this change causes a problem with jenkins xunit processor. I feel it's the right move to rollback right now and publish a patch release. I'll continue looking into this. But, for now, you might consider resubmitting this PR and add a configuration option where this attribute is conditionally added. |
Okay, sorry for introducing the problem 🙇 |
Ref: #70
This PR depends on #70
@palmerj3
I'd like to add
file
attr because some tools (ex. circleci) show file path if the report has this attr.I thought to fix the path and to add attr can be split but actually, this PR is what I need.
sj26/rspec_junit_formatter#22