cancel
Showing results for 
Search instead for 
Did you mean: 

Problem exporting SoapUI reports using Groovy

SOLVED
hellboy1981
Regular Visitor

Problem exporting SoapUI reports using Groovy

xxx

 

 

// https://support.smartbear.com/readyapi/apidocs/pro/com/eviware/soapui/reporting/reports/testsuite/WsdlTestSuiteReport.html
def report = new WsdlTestSuiteReport(testSuite)

// https://support.smartbear.com/readyapi/apidocs/pro/com/eviware/soapui/reporting/ReportEngineRegistry.html
def availableReports = ReportEngineRegistry
.getAvailableReports(report) def reportSettings = report
.getModelItemReportParameters() // https://support.smartbear.com/readyapi/apidocs/soapui/com/eviware/soapui/model/TestPropertyHolder.html .getModelItem() // https://www.soapui.org/apidocs/com/eviware/soapui/model/ModelItem.html .getSettings() // https://www.soapui.org/apidocs/com/eviware/soapui/model/settings/Settings.html

// get list of all reports for test case
for (availableReport in availableReports) {
String reportName = availableReport.getName()

log.info("$reportName is available")

if (reportName == "JUnit-Style HTML Report") {
// https://support.smartbear.com/readyapi/apidocs/pro/com/eviware/soapui/reporting/engine/junit/GeneratableJUnitReport.html

def jrFormats = (String[])[ "HTML" ]

// https://support.smartbear.com/readyapi/apidocs/pro/com/eviware/soapui/reporting/GeneratableReport.html#generate-com.eviware.soapui.model.settings.Settings-java.lang.String:A-java.lang.String-
def results = availableReport.generate(
reportSettings,
jrFormats,
dataExportFolder)

availableReport.release()

String path = results[0]

log.info("JUnit created $path")

return path
} else if (availableReport.getName() == "Data Export") {
def jrFormats = (String[])[ "CSV" ]

// https://support.smartbear.com/readyapi/apidocs/pro/com/eviware/soapui/reporting/GeneratableReport.html#generate-com.eviware.soapui.model.settings.Settings-java.lang.String:A-java.lang.String-
def results = availableReport.generate(
reportSettings,
jrFormats,
dataExportFolder)

availableReport.release()

String metricsPath = results[0]

log.info("Data export report has been created at '$metricsPath'")

return metricsPath
}
}

 

In both JUnit and Data Export reprts multiple statistic fields containing wrong zero values.

 

Exporting reports using SOAPUI GUI works properly.

 

Whats wrong with it? Is it settings issue? How can I export SOAP UI report correctly using Groovy?

 

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
nmrao
Community Hero

Re: Problem exporting SoapUI reports using Groovy

Even with free version, it is possible to generate the test report in Junit style.

With proversion, there are multiple type of reports available out-of-the-box. You don't have to write any script to generate reports.

You may use testrunner.bat(.sh script based on the OS) and pass the appropriate options to generate the report.

Here are the links to documentation if you haven't been thru them
https://support.smartbear.com/readyapi/docs/testing/reports/getting-started.html
https://support.smartbear.com/readyapi/docs/testing/reports/index.html


Regards,
Rao.

View solution in original post

2 REPLIES 2
nmrao
Community Hero

Re: Problem exporting SoapUI reports using Groovy

Even with free version, it is possible to generate the test report in Junit style.

With proversion, there are multiple type of reports available out-of-the-box. You don't have to write any script to generate reports.

You may use testrunner.bat(.sh script based on the OS) and pass the appropriate options to generate the report.

Here are the links to documentation if you haven't been thru them
https://support.smartbear.com/readyapi/docs/testing/reports/getting-started.html
https://support.smartbear.com/readyapi/docs/testing/reports/index.html


Regards,
Rao.

View solution in original post

TanyaYatskovska
Community Manager

Re: Problem exporting SoapUI reports using Groovy

Thanks for the help, nmrao!

 

@hellboy1981, in addition to Rao's reply, please take a look at this article - you can find it interesting:

https://smartbear-cc.force.com/portal/KbArticleViewer?name=Configuring-ReadyAPI-to-save-Project-or-T...

 
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors