Best mocha reporter to use with Jenkins is ...?

7,018 views
Skip to first unread message

Sam Roberts

unread,
Jul 6, 2013, 1:26:10 AM7/6/13
to nod...@googlegroups.com
I've been doing:

mocha -R xunit > xunit.xml

But it doesn't seem to deal well with reporting stack traces, or
capture as much info as I think could be there for failed tests.

I could experiment one by one with a dozen output formats, and various
jenkins plugins.... or maybe somebody already did this, and can tell
me the best mocha reporter and jenkins plugin to use together?

Thanks,
Sam

Santiago Gimeno

unread,
Jul 6, 2013, 3:48:44 AM7/6/13
to nod...@googlegroups.com
Hi,

I'm using https://npmjs.org/package/xunit-file as a reporter with the https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin and I'm very happy with it. One caveat: don't use xUnit Plugin versions newer than 1.58 as for some reason they were throwing when parsing the xunit file generated by the reporter.

Best regards,

Santi


2013/7/6 Sam Roberts <s...@strongloop.com>
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Sam Roberts

unread,
Jul 8, 2013, 1:41:14 PM7/8/13
to nod...@googlegroups.com
On Sat, Jul 6, 2013 at 12:48 AM, Santiago Gimeno
<santiag...@gmail.com> wrote:
> I'm using https://npmjs.org/package/xunit-file as a reporter with the
> https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin and I'm very happy
> with it. One caveat: don't use xUnit Plugin versions newer than 1.58 as for
> some reason they were throwing when parsing the xunit file generated by the
> reporter.

Thanks Santiago, I'll give xunit a try (I've been using the junit reporter).

Do you find any advantage to xunit-file over "mocha -R xunit > xunit.xml"?

José F. Romaniello

unread,
Jul 8, 2013, 1:48:55 PM7/8/13
to nod...@googlegroups.com

I used that one but have some problems with failures, this is not when the test fail but when everything fails before, so I changed to the bdd and added an ansi color pluging for jenkins. After all logs were pretty clear.

I've had lot of problems with jenkins so I switched to Teamcity few weeks ago, I think is more mature and has lot of goodness like pretested pull requests. Some day I'll make my own thing

juho.vah...@futurice.com

unread,
Jan 8, 2014, 10:36:38 AM1/8/14
to nod...@googlegroups.com
On Saturday, July 6, 2013 10:48:44 AM UTC+3, sgimeno wrote:
Hi,

I'm using https://npmjs.org/package/xunit-file as a reporter with the https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin and I'm very happy with it. One caveat: don't use xUnit Plugin versions newer than 1.58 as for some reason they were throwing when parsing the xunit file generated by the reporter.

I found this almost half a year old thread when looking for a solution. I wasn't quite happy with any of the options, the xunit plugin just stuffed all my tests to a single test suite and didn't feel like what we were looking for. I ended up writing my own reporter, and the result is now in https://github.com/futurice/mocha-jenkins-reporter repository, would like to hear if it works for someone else or especially if it doesn't work for some use case.
Reply all
Reply to author
Forward
0 new messages