26 September 2008 - 2.5-beta1 home user guide eclipse intellij netbeans maven PDF files forums bugs sourceforge eviware.com


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.

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

The 4 available options are pretty straight forward:

  • 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
  • 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

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


Next: Load Testing Web Services with soapUI