You can use Data Bank tools to extract values from an incoming request so it can be used to populate an element of the associated response.

In this section:

Configuring JSON and XML Data Bank Tools

  1. In the tool’s configuration page, click Add Extraction.
  2. Specify your extraction as follows:
    1. Click in the XPath field and use the XPath builder to indicate which element you want to extract. For details, see Specifying XPaths.

    2. Leave Extract to set to Custom column. Note that if you are editing a Data Bank tool that was created in SOAtest Desktop, additional options (Writable data source column, Suite variable) may be shown; you can use CTP to change from your existing setting to Custom column

    3. Under Column name, specify the name of the "Custom Column" to which you want the value extracted. This will be used to reference the extracted value throughout the test scenario. For example, assume you extract into a custom column named systemID:

      You could later reference that extracted value using ${systemID}
       

       

    4. Indicate whether you want to extract the text content, the entire element, or all child nodes.

      Text content extracts the text content of the selected element. For example, XPath/Parent will output VALUE.

      Entire element extracts the entire XPath. For example, XPath/Parent will output <parent>VALUE</parent>. You can configure Index to extract, which controls which element is extracted if the element occurs more than once.

      All child nodes extracts all child nodes of the element selected.

  3. Repeat the above process for each additional extraction you want to add. A single Data Bank can perform multiple extractions
  4. Review and modify tool options as needed. Available options include:

Configuring a REST URL Data Bank

URL Data Bank only applies to Service Virtualization and requires Parasoft Virtualize 9.10.2 or higher. This tool enables you to extract the following values from a REST URL and store them in a data bank:

You can extract parameters that occur multiple times by concatenating the values. This tool is only available in CTP for message responders.

  1. In the tool’s configuration page, click Add Extraction.
  2. Choose a value type from the drop-down menu.
     
  3. Specify the name of the data source column in which to store the value. 
  4. Add additional extractions for the URL values you want to extract. You can only extract one host, port, and method, but you can add several path and parameter values to extract complex URLs.
  5. Specify any additional tool options and click Save.

Tool Options

The following options can also be configured:

(<method>)  <host>:<port>/<path 0>/<path 1>/<path . . .>/<parameter>