-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Specs: JUnit formatter #2455
Specs: JUnit formatter #2455
Conversation
Could this be done as As for the XML escape/substitution, perhaps the HTML ones can be reused instead? https://github.com/crystal-lang/crystal/blob/master/src/html.cr |
Future formatters might also take custom parameters too. I'm not sure what is the most extensible and consistent way of handling this. |
Regarding XML escaping: I'm not an expert on this but most of the substitutions used for I wouldn't do it just for code reuse... it's just a Am I missing something? |
You're correct, for a moment I thought that the substitution list looked lot like HTML one, but seems is very specific to HTML than the XML counterpart. My apologies. As for the formatter, perhaps an standard can be defined? say the formatter requires a parameter/directory, so:
And Cheers. |
I think the current option is fine, especially since it's something that should happen additionally, not replacing the current formatter. We can look into cleaning up the options once we do have some formatters and a better overall picture on their needs. Could you please rebase? |
@jhass I agree. I wanted to think of a better way to integrate this, like using |
a14eb02
to
c2d903e
Compare
Rebased :) |
Cool, could you squash ( |
10107f9
to
b9bca94
Compare
Done! |
Unfortunately not, make sure to pass |
b9bca94
to
fe1ffda
Compare
Sorry, I thought you just wanted me to update instead of cleaning up the history :) |
Uh, I liked the separate commits for the separate stuff, I just wanted the last two go into the one introducing what they're fixing :( One more try? |
Reporting in this format allows interoperability with CI tools such as Circle
This caused an error in a JUnitFormatter, which was assuming the spec name was a valid string.
fe1ffda
to
6fd1d60
Compare
Perfect, thank you! |
I almost sure I got it right this time :-P |
This PR adds the option to enable JUnit xml output to a file while running specs. This allows more detailed reporting of tests and API access to results in CircleCI. See:
https://circleci.com/blog/announcing-detailed-test-failure-reporting/
https://circleci.com/docs/test-metadata/
Usage:
This will displayed as:
![screen shot 2016-04-14 at 5 19 28 pm](https://cloud.githubusercontent.com/assets/753421/14542400/1d059c9c-0265-11e6-80c1-70c66609a1ba.png)
Also, this could be useful to integrate with other CI services in the future, since this format seems to be a de facto standard for reporting test results.