Locating extra junit xml files

17 views
Skip to first unread message

John D. Ament

unread,
Nov 2, 2015, 5:18:31 PM11/2/15
to Jenkins Users
My build uses maven to kick off some grunt tasks to test my javascript code.  The grunt tests use jasmine and output junit styled xml files.  These XML files are not picked up in my build in jenkins.  Any idea how I can get jenkins to load these files?

R. Tyler Croy

unread,
Nov 2, 2015, 5:29:07 PM11/2/15
to jenkins...@googlegroups.com
(replies inline)
Have you configured a post-build action "Publish JUnit Test Reports" and told
Jenkins where it can find those JUnit XML files?

Usually if you're not seeing the test reports you expect means that this field
needs a new pattern to find the XML files, e.g. `build/reports/**/*.xml`



- R. Tyler Croy

------------------------------------------------------
Code: <https://github.com/rtyler>
Chatter: <https://twitter.com/agentdero>

% gpg --keyserver keys.gnupg.net --recv-key 3F51E16F
------------------------------------------------------
signature.asc

John D. Ament

unread,
Nov 2, 2015, 5:37:04 PM11/2/15
to Jenkins Users


On Monday, November 2, 2015 at 5:29:07 PM UTC-5, R Tyler Croy wrote:
(replies inline)

On Mon, 02 Nov 2015, John D. Ament wrote:

> My build uses maven to kick off some grunt tasks to test my javascript
> code.  The grunt tests use jasmine and output junit styled xml files.
>  These XML files are not picked up in my build in jenkins.  Any idea how I
> can get jenkins to load these files?


Have you configured a post-build action "Publish JUnit Test Reports" and told
Jenkins where it can find those JUnit XML files?

I don't even see that option.  Debugging.
 

Usually if you're not seeing the test reports you expect means that this field
needs a new pattern to find the XML files, e.g. `build/reports/**/*.xml`

For the other maven jobs, they're going to target/surefire-reports.  I told the UI guys to drop them there, but not being picked up.  I'm guessing its different?

John D. Ament

unread,
Nov 2, 2015, 5:42:23 PM11/2/15
to Jenkins Users
It would appear I'm hitting https://issues.jenkins-ci.org/browse/JENKINS-9980 :-(

R. Tyler Croy

unread,
Nov 2, 2015, 5:48:39 PM11/2/15
to jenkins...@googlegroups.com
(replies inline)

On Mon, 02 Nov 2015, John D. Ament wrote:

>
>
> On Monday, November 2, 2015 at 5:29:07 PM UTC-5, R Tyler Croy wrote:
> >
> > (replies inline)
> >
> > On Mon, 02 Nov 2015, John D. Ament wrote:
> >
> > > My build uses maven to kick off some grunt tasks to test my javascript
> > > code. The grunt tests use jasmine and output junit styled xml files.
> > > These XML files are not picked up in my build in jenkins. Any idea how
> > I
> > > can get jenkins to load these files?
> >
> >
> > Have you configured a post-build action "Publish JUnit Test Reports" and
> > told
> > Jenkins where it can find those JUnit XML files?
> >
>
> I don't even see that option. Debugging.


"Add post build action" button at the bottom of the configuration page, the
exact menu item is called "Publish JUnit test result report." It sounds like
this might already be enabled for your jobs though.

> > Usually if you're not seeing the test reports you expect means that this
> > field
> > needs a new pattern to find the XML files, e.g. `build/reports/**/*.xml`
> >
>
> For the other maven jobs, they're going to target/surefire-reports. I told
> the UI guys to drop them there, but not being picked up. I'm guessing its
> different?


I'm assuming that the front-end developers are using grunt-junit to generate
the appropriately formatted XML? Jenkins natively speaks JUnit format, there
are additional plugins which add support for parsing different test formats
(e.g. xUnit) but I can't speak to how well they work with Grunt.
signature.asc

R. Tyler Croy

unread,
Nov 2, 2015, 5:50:01 PM11/2/15
to jenkins...@googlegroups.com
(replies inline)

On Mon, 02 Nov 2015, John D. Ament wrote:

> It would appear I'm
> hitting https://issues.jenkins-ci.org/browse/JENKINS-9980 :-(

Ah, the Maven job type is no bueno in my opinion :)

I assumed you were using a Freestyle or Workflow type job
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/db90e734-f7cd-4d6a-9ae4-097b4e2f600e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
signature.asc
Reply all
Reply to author
Forward
0 new messages