It's all about the answers!

Ask a question

How to get junit logs from jenkins to RTC

Abraham Sweiss (2.4k1331) | asked Feb 21 '14, 2:51 p.m.
Hello team,

RTC using Jenkins

On the build results > logs  page in RTC I have a link to the build and compile logs.  

Question:  On Jenkins there are seperate logs for junit results.  How can I get these log files over to the build results -> logs page.

2 answers

permanent link
Nick Edgar (6.5k711) | answered Feb 21 '14, 2:57 p.m.
Hi Abraham, if the XML output is available from running JUnit, you can publish that to RTC using the junitLogPublisher Ant task. This could be set up as a separate step in the Jenkins build.
Note that the XML format is actually generated by Ant's logger for JUnit, not JUnit itself.  I assume Jenkins uses this approach too.  For more details, see

Abraham Sweiss commented Feb 27 '14, 2:59 p.m.

Nick, Thanks that led me in the right direction

permanent link
Abraham Sweiss (2.4k1331) | answered Feb 27 '14, 3:02 p.m.
For examples of ant tasks see the following link.

However, for JUnit and ECJ compiler logs, there is a way to publish these with build definition configuration only.
In the build definition editor, click the editor header drop-down menu, choose Edit Configuration...
In the post-build tab, select JUnit Publishing
You should now see a "JUnit Publishing" tab in the definition editor
Go to the JUnit Publishing tab. In the "Log or directory" field, enter the path to the JUnit output files. For example: /home/user/my-app/target/surefire-reports
Save the definition
Request a build
After the build completes, you should see a JUnit tab in the build result

I have openned up the following documentation enhancement

Your answer

Register or to post your answer.