Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

I think the Jenkins TestNG plugin will take a *.xml filter to concatenate multiple result files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top