views:

1124

answers:

1

So here's an issue at my work. I've got a few testng cases that, if run within the primary batch of test cases, wreak havock throughout the other test cases. Rather than going through and changing all our test cases, I've made a group for the involved cases. I run the main test suite, excluding that group, and then make a second ant call to run the affected group. This way all test cases pass, but I'm ending up having to create two TestNG reports so that the first one doesn't get overriden with the results from the second group.

So here's my question. Is it possible to merge the second test result report with the first, or am I stuck with the two?

Thanks in advance.

+2  A: 

I think that the only way you would be able to do this is to process the TestNG XML output after the two runs. You should be able to collate the XML files from the two runs and combine it into a single HTML report using the Ant JUnit Report task.

If you aren't happy with the output you get from this, it could be because TestNG organises its JUnit XML output oddly. You get better results (in my opinion) if you use the JUnitXMLReporter from my ReportNG project and run JUnit Report on that.

Alternatively, you might be able to use this XSLT reporter for TestNG to combine the XML output from the two test runs into a single HTML report, though I've no idea if it supports this or not.

Dan Dyer
Sounds good to me. Right now I just have the two reports generating as is. I've configured cruise control to make them available as separate artifacts. Once I have a bit more time, I'm definitely going to try out your solution.
Gopherkhan