WilliamU
11 years agoNew Contributor
Test suite report via groovy
I have a teardown script right now that grabs the status of the test suite and sends out an email with it. I would like to expand on this by putting an HTML summary of this suite in the body of the email. The HTML summary would be of the type that SoapUI generates (as in I do not want to iterate through my test cases, check status, and build html myself). Is there a way to access SoapUI's reporting capabilities from groovy? I have tried putting
import com.eviware.soapui.report.JUnitReportCollectorin the Setup and then accessing it from the teardown. This gives me a nice looking empty SoapUI report on disk. Obviously I don't want it to be empty, and I would prefer to just have the report as a groovy object I can toString() and put in the body (instead of writing the report to disk, then reading the file, shoving it into the email, then deleting the file). Thank you for your help!
context.collector = JUnitReportCollector.createNew(11)