Tindra
12 years agoOccasional Contributor
[Resolved] Customized JUnitReport
Hi,
We are currently trying to add more information of failed test cases into the JUnit report that soapUI creates.
The report itself gets aggregated to our CI-environment and it would be nice to present more information in the test cases in the same place.
However we are triggering the execution via SoapUIProTestcaseRunner like this (pseudo):
SoapUIProTestCaseRunner runner = new SoapUIProTestCaseRunner();
runner.setProjectFile("myPath");
runner.setJUnitReport(true);
runner.setPrintReport(true);
runner.setOutputFolder("myOtherPath);
runner.run();
And the code is run from a JUnit-wrapped Java class.
Now the question is how to insert more information to the failing test cases into the JUnitReport.
I've looked into this thread: https://www.eviware.com/forum/viewtopic ... dea#p40107
And this blog: http://blog.infostretch.com/customizing-soapui-reports
But with no luck.
The nicest solution would be to extend the JUnitReportCollector (or the JUnitSecurityReportCollector??) and add the messages that we want to the failing test case.
However I cant really figure out howto instantiate the customized ReportCollector to the runner.
Since the SoapUIProTestcaseRunner is extending the SoapUITestcaseRunner there is not possible to override method from the SoapUITestcaseRunner.
So I'm a bit stuck with this.
Question is: How to customize the JUnit report programmatically when using SoapUIProTestcaseRunner?
Regards
We are currently trying to add more information of failed test cases into the JUnit report that soapUI creates.
The report itself gets aggregated to our CI-environment and it would be nice to present more information in the test cases in the same place.
However we are triggering the execution via SoapUIProTestcaseRunner like this (pseudo):
SoapUIProTestCaseRunner runner = new SoapUIProTestCaseRunner();
runner.setProjectFile("myPath");
runner.setJUnitReport(true);
runner.setPrintReport(true);
runner.setOutputFolder("myOtherPath);
runner.run();
And the code is run from a JUnit-wrapped Java class.
Now the question is how to insert more information to the failing test cases into the JUnitReport.
I've looked into this thread: https://www.eviware.com/forum/viewtopic ... dea#p40107
And this blog: http://blog.infostretch.com/customizing-soapui-reports
But with no luck.
The nicest solution would be to extend the JUnitReportCollector (or the JUnitSecurityReportCollector??) and add the messages that we want to the failing test case.
However I cant really figure out howto instantiate the customized ReportCollector to the runner.
Since the SoapUIProTestcaseRunner is extending the SoapUITestcaseRunner there is not possible to override method from the SoapUITestcaseRunner.
So I'm a bit stuck with this.
Question is: How to customize the JUnit report programmatically when using SoapUIProTestcaseRunner?
Regards