Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get junit logs from jenkins to RTC

Hello team,

Environment
RTC 4.0.0.1 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.

0 votes



2 answers

Permanent link
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 https://pzolee.blogs.balabit.com/2012/11/jenkins-vs-junit-xml-format/

0 votes

Comments

Nick, Thanks that led me in the right direction


Permanent link
For examples of ant tasks see the following link.
http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m2/index.jsp?topic=%2Fcom.ibm.team.build.doc%2Ftopics%2Fr_publishbuildresult.html&resultof%3D%2522%2562%2575%2569%256c%2564%2522%2520%2522%2572%2565%2573%2575%256c%2574%2522%2520%2522%2564%256f%2577%256e%256c%256f

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
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/305579

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,121
× 562
× 151
× 20

Question asked: Feb 21 '14, 2:51 p.m.

Question was seen: 7,778 times

Last updated: Feb 27 '14, 3:02 p.m.

Confirmation Cancel Confirm