Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20990

set filename by report generating

$
0
0

I try to generate report in testRunListner.afterRun and have to save it with the same name like test case name.

I found an example to do it but generated report has always the same name: "Testcase Report.html"

How can I set file name for report generating? Any ideas?

I guess this could be done via first parameter for generate method or via changing some properties of availableReport but how?

 

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

availableReports[0].generate( report.getModelItem().getSettings(), (String[])[ "HTML" ], "c:\\Users\\User01\\Documents\\Reports")
availableReports[0].release()


Viewing all articles
Browse latest Browse all 20990

Trending Articles