It's all about the answers!

Ask a question

How to publish JUnit logs back to RTC build


Mallanagouda Patil (40815) | asked May 08 '14, 7:27 a.m.
 Hi,
I am using RTC, SVN & Jenkins. RTC for change management. SVN for SCM and Jenkins for build management. I have setup Jenkins job to perform build and JUnit. I have created jenkins build engine and build definition in RTC pointing to jenkins job. We use Eclise with RTC plug-in to request builds and also scheduled builds via RTC build definition. Now I do see build results and builds status from RTC build editor page. How to see JUnit results in the RTC build page itself?. 
Is it possible to publish JUnit logs back to RTC using "junitlogpublisher" ANT task? If yes, please provide steps on how to do it and changes needed on build engine or build definition. 
Note: Do not want to use Jazz SCM. I can install Jazz build toolkit if required. 

Thanks Mallanagouda.

One answer



permanent link
sam detweiler (12.5k6195201) | answered May 08 '14, 7:57 a.m.
edited May 08 '14, 8:00 a.m.
see https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.build.doc/topics/r_junitlogpublisher.html&scope=null

no changes to build engine or definition, but you have to add this task to your ant build script,
and u need the build toolkit to get the supporting ant task plugin.
see the top level topic on this here https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.build.doc/topics/r_ant-tasks.html&scope=null

Comments
Mallanagouda Patil commented May 19 '14, 7:51 a.m.

Hi Sam
Thanks for the answer. What to do in case maven is used for running build and JUnit?.
junitLogPublisher take following parameters. How do I retrieve buildResultUUID and also am not using Jazz build engine here. Do I need to pass buildResultUUID from build definition?

<junitLogPublisher repositoryAddress="${repositoryAddress}"
                           userId="${userId}"
                           password="${password}"
                           buildResultUUID="${buildResultUUID}"
                           filePath="junit.xml" />

Please provide some detailed steps to do this.
Thanks in advance


sam detweiler commented May 19 '14, 8:07 a.m.

https://jazz.net/library/article/840

Setting up a more complicated build

2.Edit your Hudson job to allow Rational Team Concert build properties to be passed into the Hudson build.

and

https://jazz.net/wiki/bin/view/Main/JazzScmWithJenkinsPlugin

Maven Builds

If using Maven, note that Jenkins does not pass on build properties as environment variables by default. The simplest approach we have found is to add something like the following to the Properties section of the Maven build step in the Jenkins job, to pass on the repository address, build result UUID, and any other needed build properties:

Your answer


Register or 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.