Forum Discussion

Thugzilla's avatar
Thugzilla
Occasional Contributor
14 years ago

How to output DataSink data to report from testrunner?

Hi,

I'm launching my SoapUI projects/testsuites/testcases via Groovy using something like this:

SoapUIProTestCaseRunner runner = new SoapUIProTestCaseRunner()
runner.environment = args[0] //args[0] just has an environment name I've set up in the target project
runner.projectFile = args[1] //args[1] just has the path to the project
runner.settingsFile = args[2] // args[2] has a settings file that I altered to change where to look for the script extensions
runner.setJUnitReport(true)
runner.outputFolder = "test-results"
runner.run()


And from reading the SoapUI API I am yet to figure out how I can tell the runner to:
    A) Generate a pdf/html/custom report
    B) Publish some Datasink subreport data into either the same report or add to the Junit report


My goal is to export some Datasink data that is gathered during runtime in a tidy way in my continuous integration setup. Below are some options from the command line: they may, or may not be what I'm trying to get to using the API directly. Thanks!

R : Selects which report to generate for the test objects executed, for example if running the entire project, this could specify the name of a test-suite-level report that would be generated for each TestSuite. The report is saved as specified with the -F option to the folder specified with the -f option. (soapUI Pro only)


F : Sets the format of the report specified with the -R option, for Printable reports this is one of PDF, XLS, HTML, RTF, CSV, TXT, and XML. For Data Export this is either XML or CSV (soapUI Pro only)

3 Replies

  • Hi again!

    Sorry, but why do you want to generate the DataSink report from Groovy?
    Can't you just create an DataSink TestStep and create the report from there?

    ---
    Regards
    Erik, SmartBear Support
  • Thugzilla's avatar
    Thugzilla
    Occasional Contributor
    The project is invoked in my CI environment in an automated fashion using groovy as the harness (called from Gradle). I have a datasink test step with the sink type of SubReport that I was hoping to merge into the jasper reporting built into soapUI.

    Temporarily what I've done is export the datasink properties to my own html data file using a groovy script but the solution relies on my own custom formatting and isn't as organized as having a single all-encompassing report.