How can I convert a build result contribution to a JUnit Class Handle
Currently, JUnit tests are reported/displayed to the "Tests" tab of our RTC builds. I'm trying to write some custom tooling around getting the test suite/class names that fail out on each build. I've written code to get the build result contributions for each build. However, I'm having trouble converting those contributions into a form that I can use with the IJUnitTestCase and IJUnitTestClass api. Any suggestions/help with this would be really appreciated.
|
One answer
you need to retrieve the content from the contribution object.
I don't know how to convert that to what you need.. I don't know what the data stream looks like. here is a post with code to get the contents https://jazz.net/forum/questions/176187/how-to-download-log-file-from-build-result-through-plain-java-client-library Comments
S S
commented Mar 17 '15, 3:36 p.m.
Thanks for the info, Sam. I've written a function to return a list of Build Results and I'm able to get the buildContributionResults for each build result. Here's an example:
com.ibm.team.build.internal.common.model.impl.BuildResultContributionsHandleImpl@6ceb6ceb (stateId: <unset>, itemId: [UUID XXXXXXXXXXXXX], origin: com.ibm.team.repository.client.internal.TeamRepository@22d022d, immutable: true)
Unfortunately, I don't see how I'm supposed to use this to get to the JUnit tests stored on the "Tests Tab".
I don't know 'exactly', but if you get the source for the
S S
commented Mar 23 '15, 2:10 p.m.
Sam, I was able to get the JUnit Handles for each build result:
I'm now having issues converting this to a IJunitTestCase so I can go in and grab the error data associated with each build result. I keep running into an incompatible type error.
sam detweiler
commented Mar 23 '15, 2:42 p.m.
I haven't done anything with these types of objects..
|
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.