1. Exporting Data and Statistics
Ok, you've run your LoadTest and now need to either create some reports or export the gathered data for more detailed analysis. There are several options available for you which we'll look at in order:
Export the data of the statistics table (open-source only).
Export data from the statistics diagrams.
Export data continuously while the test runs.
Create Printable Reports or export underlying report data to XML or CSV files (SoapUI Pro).
Let's check these out in order.
Quick Tip: SoapUI Pro Event Handlers allow you collect and process data collected during LoadTests in any way you want, for example you might want to write all results to a database for detailed analysis. Check them out at Custom Event Handlers.
1.1. Export Statistics
In the open-source version of SoapUI, the "Export Statistics" button in the LoadTest Toolbar prompts for a filename which will get the contents of the statistics table in comma-separated format, for example the below results:
As you can see this is same as seen in the UI.
1.2. Export Statistics Diagrams
Both statistics diagrams have corresponding export buttons. The data frequency is that of the "Resolution" setting in the Diagram, in our case 250ms which is the default "Sample Interval" in the LoadTest Options dialog. The Statistics Diagram for the above execution is:
And exports as:
As you can see all underlying statistics for the selected TestStep (or Total as in the screenshot) are exported, allowing you to import this into other applications for graphing and analysis.
Correspondingly the Statistics History Diagram for the above is:
And exports as:
Here you can see the selected statistic (TPS in our case) has been exported for each TestStep and Total, together with the ThreadCount (for correlation analysis).
1.3. Export Data Continuously
For long-running tests the data collected by the Statistics Diagrams can easily fill up memory, therefore an option to turn off these is available in the LoadTest Options dialog ("Disable Statistics"). To still be able to gather this data, the "Statistics Log" tab in the LoadTest Options dialog lets us configure just that.
Specify a folder for the target logs and set the desired log interval which controls how often SoapUI will export the statistics. For example, setting the interval to 1000 will export once each second. When running SoapUI will create one csv file for each TestStep and the Total in the specified folder, naming them after their corresponding objects. So if we run the above test again with this enabled we get the following files in our output folder.
Each of these contain the statistics for the corresponding item from the Statistics Table, perfect for further analysis in another tool.
The "Log on ThreadCount Change" option will write an extra row to the log (marked with "ThreadCount changed..." in the last column) making it easy to separate this event during analysis.
Exporting Data in SoapUI Pro
The reporting functionality in SoapUI Pro allows for export of underlying report-data as well, pressing the "Create Report" button (after running a LoadTest) and selecting DataExport will show the following:
Select the desired DataSets, format and folder and press "Ok", SoapUI will create one file for each DataSet in the specified folder containing the corresponding data. If we in the above select all DataSets and the CSV format, we get the following output.
As you can see there are more files than DataSets, this is because both the StatisticsHistory and the TestStepStatisticHistory DataSets are hierarchic and contain references to sub-data files. For example the StatisticHistory file contains.
referring to separate files for each statistic.
1.4. Creating Printable Reports with SoapUI Pro
If you instead of Data Export select the "LoadTest Report" option in the Create Report dialog:
You will get the following report containing both overview, statistics-diagrams, etc...
Selecting the "Detailed Error Information" option (as we have done in the above dialog) also adds the actual contents of each failed assertion:
The underlying reporting system for these reports also allows for extensive customization and is covered in detail in Getting Started with Reporting, check it out!
1.5. Final Words
The above exporting and reporting options should cover most of your needs, and as hinted in the beginning you can use SoapUI Pro event handlers or also SoapUI extensions to do any kind of data collection. But most importantly; if you miss some kind of reporting/logging related functionality don't hesitate to let us know!