-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
junit reporter #349
junit reporter #349
Conversation
@@ -1,7 +1,4 @@ | |||
coverage.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove these other ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't intentionally remove the other ones.
doesn't xunit work with hudson? |
It looks like it requires a plugin: I mostly use Bamboo, which is easy to setup with the junit format. --jon On Tuesday, March 27, 2012 at 11:03 AM, TJ Holowaychuk wrote:
|
}else{ | ||
console.log('test.state not known, test not recorded: ' + test); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style-wise this is all way off the rest of the project, try and copy what the rest is like. For example there's no need to have the clean
function in scope since it's not enclosing anything, and things like if (test.failed == true
can just be if (test.failed
, } else {
vs }else{
etc
Do these patches still need some tidy before the push request will be accepted? I am chasing something similar, if required I am happy to tidy them up if that is all that is required. |
yeah it's just quite different from the rest of the project's style, i'll comment some more |
testing | ||
_mocha.js | ||
.project | ||
.settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes need reverting
This reverts commit 6a92071.
Thanks for that! |
good enough :D i'll merge and refactor |
hmm might have to rebase it's not applying to master |
Thanks for trying to get his into mocha will make it much easier to integrate into existing CI servers. |
cleaning things up a bit, can junit output have multiple testsuite tags or what's the best way to describe the hierarchy? or does it just expect a flat list of test cases? |
The xsd for the xml is located at This illustrates that you can have many testsuite tags wrapped in a testsuites tag. This thread on stack overflow has some more examples. http://stackoverflow.com/questions/4922867/junit-xml-format-specification-that-hudson-supports |
hmm not a very stream-friendly format, i'll see what i can do |
Yeah I am just having a look over the ruby gem. https://github.com/nicksieger/ci_reporter Not sure if it helps with ideas on how to architect the code. |
something like 703cef4 ? |
if we want to add durations to the |
Yeah it doesn't seem to fit the stream model with the summary being written before the testsuite / testsuites items have been written. Would it be wiser to write a intermediate flattened file then transform it, only other alternative is to store this in a data structure which is then has the report built from it. |
yeah I guess that explains why Jon was building it at the end. That's too bad |
I did start with something like: but ended up moving everything to the end in commit: |
This never got merged? It's super useful to me fwiw, big +1 and thanks @jon077 :) |
Aside from dot, spec, json, json-stream, nyan, browser and TAP, I think most reporters belong in userland. It should also be the case for this one. |
Alright. I just saw above where @visionmedia said a merge was forthcoming, so I assumed that was still the case. For a userland reporter like this, should it just be released as a standalone reporter npm module? Also, how does it plug in to mocha as an available reporter? Is this a built-in API? I'm new to mocha...but I love me some jenkins graphs :) |
That's just my opinon, @visionmedia might still merge this |
yeah this should be userland and added to https://github.com/visionmedia/mocha/wiki |
via something like:
|
surely that should be called junit-reporter-mocha or something? But yeah, I get it. I'll try to extract the reporter from this pull request for my personal use, but won't publish or anything because it's @jon077's to publish :) |
doesn't have to have |
I decoupled mine recently.... |
I honestly don't even know what I was thinking...xunit reporter works just fine for what I'm doing here, don't even see how xunit / junit output differs :-\ Jenkins sees no problem with it apparently. |
Userland seems best. I will publish after vacation. --jon On Wednesday, August 15, 2012 at 1:36 PM, Josh Adams wrote:
|
@jon077 back from vacation yet? :) |
I added a junit reporter for integration with Bamboo, Hudson and other CI servers. The code is closely modeled after the xunit reporter.
Please review. If you like what you see, please request changes or merge as is.
Thanks for contributing the library. We hope to get a lot of mileage out of it.
--jon