Problem with JUnit Publishing
Hi! We're using RTC to automate WebSphere Integration Developer (WID) 6.2.0.2 component test. WID is an IBM integrated development environment. Its component test allows you to define test suites and test cases for automated testing of the integration components.
Our test runs fine but there's an error parsing the XML file when publishing the JUnit results. The output from the WID component test looks like the following:
The warning message is for the "resource" tag. I'm not sure if it's for the high-level one or the one in the variations. Is this a valid JUnit XML file? Should the RTC publish be able to handle this? We have an old version of RTC (1.0.1.1) so it's possible this is fixed in a more recent version. FWIW, I've tried searching for a schema or DTD that defines the JUnit test results but I couldn't find anything. Thanks in advance for any help. Benny L. Higdon |
8 answers
Hi! We're using RTC to automate WebSphere Integration Developer (WID) 6.2.0.2 component test. WID is an IBM integrated development environment. Its component test allows you to define test suites and test cases for automated testing of the integration components. I've verified that IBM is using an internal format. Also, the latest WID release (V7) also uses this proprietary format :-( By trial and error, I was able to create an XSLT to generate a JUnit compatible format. So, I'm good to go. Benny L. Higdon |
Hi Benny,
I see this was never responded to. Sorry about that. Is this still an issue for you? Regarding the non-standard format, are you saying that WID outputs a non-standard format, or that RTC does not honour the standard format, or both? Even if it's non-standard, we could perhaps enhance the existing JUnit publisher to understand this format, if it makes sense. Thanks, Nick |
Nick,
This is no longer an issue since I was able to create a stylesheet to transform the WID format into one that RTC would publish. I believe that it is WID that is using a non-standard format. However, I'm not a JUnit guru so I can't say for sure. I included an example of the WID output in my append so perhaps someone more knowledgeable about JUnit can comment. As for existing the existing JUnit publisher, I'm not sure that it should be tied to an IBM proprietary format. Benny |
Looking at the source for Ant's XMLJUnitResultFormatter, it only uses <testsuite> as the root element(s) and knows nothing about <resource> elements, so I agree the WID format is non-standard. And I agree that it would be odd for RTC to support this. Thanks for clarifying.
|
Is anyone aware of an Ant task than can be used to parse a WID component test output XML file and publish the results to the RTC server as a part of the build report?
|
Since the format is so close (yet so far) from the JUnit XML file format, it should be pretty straightforward to come up with a sed or awk shell script, or XSLT transform, that removes the extra <resource> tags.
You could then use the existing junitLogPublisher task. |
For an example of using XSLT to process test results, see:
http://jazz.net/forums/viewtopic.php?t=5906 |
Benny actually posted an XSLT to do exactly as suggested above:
http://ibmforums.ibm.com/forums/message.jspa?messageID=1762894 Not sure if that's behind the firewall, so I'm posting it here too: <?xml version="1.0"?> Benny, if you're not OK with me posting it here, just let me know and I'll delete this 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.