How to create CSV reports in SoapUI Open Source?
This article focuses on generating external reports based on test run results in SoapUI OS.
As you know SOAPUI comes in the following 2 variants:
1. SoapUI OS (Open Source)
2. SoapUI Pro (Licensed)
The Open version is free to download but, it comes with few restrictions and one of them is lack of generating external reports based on test run results.
WSDL used in this article: http://www.dneonline.com/calculator.asmx?WSDL
Here are the steps to achieve this:
Step 1: In the existing SoapUI project, create a new Test Suite with the name: Library
Step 2: Disable the Library test suite to avoid its execution along with the project
Step 3: Create a new test case with the name: Reporting_Utility inside the test suite
Step 4: Add Groovy Script Step with the name: GenerateCSVReport in the test case and copy/ paste below code.
Step 5: Open the “TearDown Script” section for each test case from the test case window and add code to call GenerateCSVReport.
// Code to execute the GenerateCSVReport test step
testRunner.testCase.testSuite.project.testSuites["Library"].testCases["Reporting_Utility"].
testSteps["GenerateCSVReport"].run(testRunner, context);
Step 6: Execute the SoapUI Project/Test Suite/Test Case
Your CSV results will be available inside \SoapUIResults\CSV Reports folder.
This technique of generating reports using groovy can be used for SOAP, as well as REST project.
Hope this was useful. Entire project is available at Git.
Git
https://github.com/raghwendra-sonu/Calculator-soapui-project
References:
https://www.soapui.org/reporting/getting-started.html
Let me know if this was helpful. If you ever need my help, you can write in comments sections. Also, you can contact me through my LinkedIn Profile.