(I'm also aware of some unofficial XSLT transformers, but I'd prefer the
official goodness.)
All the APIs I'm looking at seem to require that your reported be attached
to TestNG at the time of the run, which is a big downer.
-Dan
However, I'd like to start with a more general question about
testng-results.xml. Is there *any* code currently in existence that
consumes testng-results.xml?
It seems to me that there isn't. Am I right in thinking that
testng-results.xml is currently not used by any Java code?
I ask because it seems like the first thing I'd want to do is take a
testng-results.xml file and turn it into an in-memory object model. If
there's no code like that yet in existence, I guess I'd need to start
writing a SAX parser for it, but it seems very weird that I'd be the first
person to do this.
-Dan
Cédric Beust ♔ wrote:
> Hi Dan,
>
> That's an interesting question.
>
> It's not possible without some work, because as you correctly diagnosed, the
> current HTML reporter works off the IReporter listener interface.
>
> There are two approaches you could try:
>
> - See if ISuite can be serialized. If it can, then the current HTML
> reporter will work off that serialized information with very few changes.
> - Modify the current reporter to be able to work off the XML file that
> I'm not 100% positive, but I think that ReportNG (the XSL reporter) uses it
> to produce its reports.
I don't think so. Scroll down to "How to use ReportNG;" it says you need
to attach it as a listener to your run.
https://reportng.dev.java.net/
Assuming I'm right, am I definitely right in thinking that no code in the
TestNG source tree consumes testng-results.xml?
-Dan
-- Cosmin Marginean
Hello Dan,
There isn't code in the TestNG codebase doing this, however there is this XSL consumer for this: http://code.google.com/p/testng-xslt/