Exporting custom reports using Groovy

Another option to create reports is to use a Groovy TestStep. Consider these situations:

  • You need to include extra information that is not available via one of the standard reports, for example, by accessing test framework objects or other test data.
  • You would like to produce a custom report format, for example, HTML or PDF.
  • You would like to use the report later in TestCase; for example, use the Email TestStep (see the Sending e-mails with the Email TestStep plugin recipe of Chapter 10, Using Plugins) to e-mail the results somewhere.

In this recipe, we'll see how to extract test results from the SoapUI framework classes and export the data to a custom XML report file using Groovy.

Getting ready

The SOAPDBMock-Reporting-soapui-project.xml ...

Get SoapUI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.