Forum Discussion
SmartBear_Suppo
15 years agoSmartBear Alumni (Retired)
Hello,
Here is an example..
this is to enable coverage from groovy( before run test case ) :
Let me know does it helps,
robert
Here is an example..
import com.eviware.soapui.reporting.ReportEngineRegistry
import com.eviware.soapui.reporting.reports.testcase.*
def report = new WsdlTestCaseReport(context.testCase)
def availableReports = ReportEngineRegistry.getAvailableReports( report ) // get list of all reports for test case
// generate 2nd , format PDF ( here you can add other formats ), at location "/home/robert/Documents/soapui-projects"
availableReports[1].generate( report.getModelItem().getSettings(), (String[])[ "PDF" ], "/home/robert/Documents/soapui-projects" )
availableReports[1].release()
this is to enable coverage from groovy( before run test case ) :
import com.eviware.soapui.impl.coverage.report.CoverageBuilder
context.testCase.addTestRunListener( new CoverageBuilder() )
Let me know does it helps,
robert