01 March 2010 - 3.5 user guide eclipse intellij netbeans maven download nightly forum bugs blog sf.net eviware


Eviware Logo

soapUI Pro DataSink Step

Often you want save the data when doing Web Service testing. This can be in to take a response and use it in later Requests, save info for logging purposes or even to actually populate a business database.

This can be done in soapUI by writing a Groovy script, but is simplified in soapUI Pro.

Start soapUI Testing
Did you know?

soapUI Pro has functionality for saving data from your tests easily - for example to data bases or Excel- easily.

The Data Source Steps soapUI pro will improve your productivity and make Web Service Testing fun.

Try soapUI pro to soap test

soapUI Pro includes a specialized DataSink TestStep that greatly eases the task of saving of data collected during a test to an external storage. The following DataSink types are supported:

The soapUI Pro DataSink Editor

The DataSink editor is divided into 4 parts;

  • A list of properties to the left containing the values to be saved.
  • A toolbar to the top right for selecting a DataSink and setting properties and options
  • A DataSink specific configuration panel to the right
  • A Data Log inspector at the bottom for displaying rows processed by the DataSink

The soapUI Pro DataSink Editor

The list of Properties should contain those properties that will be passed to the configured Datasink, they are added/removed using the Add/Remove toolbar buttons. The DataSink dropdown selects the DataSink to use

soapUI Pro DataSink Options

The DataSink Options dialog is as follows:

The soapUI Pro DataSink Editor Options

The following settings are available:

  • Shared - controls whether this DataSink should be shared between threads in a LoadTest (see below)

soapUI Pro DataSink Execution

Every time the TestCase execution flow passes the DataSink Step it will call the configured DataSink with the current property values. Values should have been previously set by either a Groovy script or a property transfer, or can alternatively contain a PropertyExpansion syntax.

It is possible to drag properties from the Navigator tree into the Properties table to either add new a new property containing a PropertyExpansion for the dragged property, or if dragged onto an existing propertys' value; to create a PropertyExpansion there instead.

The "Shared" option in the toolbar controls if the DataSink should be shared between threads during a LoadTest, meaning that all running threads will write (synchronized) to the same DataSink instead of each creating their own.

soapUI Pro JDBC DataSink

The JDBC DataSink has the following configuration panel:

The soapUI Pro JDBC DataSink configuration panel

There are 5 available options pretty straight forward, with buttons for using wizard for configuring them, and for testing if properly configured:

  • Driver - the JDBC Driver to load and use for this DataSink. Must be available in the soapUI classpath either by placing it in a soapui/bin/ext directory, the jre/lib/ext directory or by directly modifying the soapui.bat/.sh files to include the required jar files
  • Connection String - the connection string to use, pass_value will be replaced with real password value at the time of connecting
  • Password - the masked password value
  • SQL Update - the update statement to issue for the created connection, using Prepared Statement syntax (ie ? is used as value placeholder).
  • Stored Procedure - select if the SQL statement calls a stored procedure

JDBC DataSink Configuration wizard

    Configuration wizard has several steps for setting driver/connection string, checking if stored procedure and creating query

    JDBC Connection configuration wizard

    JDBC Connection stored procedure check

    JDBC Connection query wizard

    Notice that when using this wizard in case of stored procedures only procedures with input parameters will be listed because current configuration has no registerParameter option

soapUI Pro JDBC Connection DataSink

The JDBC DataSink has the following configuration panel:

The soapUI Pro JDBC Connection DataSink configuration panel

Configuration options are pretty much the same as for JDBC DataSink except that here JDBC Connection set on project level is used instead of configuring driver/connection string for this particular data sink.

soapUI Pro Excel DataSink

The Excel DataSink has the following configuration panel:

The soapUI Pro Excel DataSink configuration panel

The 4 available options are pretty straight-forward:

  • File - the source excel file to use as a template for adding data
  • Out File - the target excel file to write. If not specified the data is written to the source file
  • Worksheet the worksheet to which the data should be added
  • Start at Cell - the top-left cell to start at when writing data.

soapUI Pro File DataSink

The File DataSink has the following configuration panel:

The soapUI Pro File DataSink configuration panel

Files will be written in a simple row format, using the specified separator. The available options are:

  • File - the file to write to
  • Separator - the separator for the columns in each row
  • Trim Values - values will be trimmed before writing
  • Append Values - values will be appended to an existing file instead of creating a new one when the TestCase starts

soapUI Pro Groovy DataSink

The Groovy DataSink has the following configuration panel:

The soapUI Pro Groovy DataSink configuration panel

This step allows any kind of DataSink to be created for a DataSink Step. Available context variables are:

  • "context" - the current TestRunContext for storing context-specific values
  • "properties" - a Map containing the current property values
  • "testRunner" - the current TestRunner object
  • "log" - a log for logging

soapUI Pro Property DataSink

The Property DataSink has the following configuration panel:

The soapUI Pro Property DataSink configuration panel

This step allows for aggregation of values into a property that can be used elsewhere:

  • Result Property - the target property in this TestStep to write to (must be defined!)
  • Prefix - the prefix for the property value
  • Content - the content to add for each time the DataSink is executed
  • Suffix - the suffix for the property value

As seen in the example screenshot, property-expansion is supported in these fields. The example will continously "build" an XML list of items which can for example be used in a later request by referring to the DataSinks "test" property.

soapUI Pro SubReport DataSink

The SubReport DataSink collects data and exposes it to generated reports:

The soapUI Pro SubReport DataSink configuration panel

The configuration panel shows a read-only table containing data currently written to the DataSink. The data is made available to reports as a Data Export DataSet and as JRDataSource parameters named as the DataSink step, both for TestCase reports and LoadTest reports if the DataSink is set to be shared between threads.


Next: DataGen TestStep