This topic explains how to convert your database recordings from a Parasoft JDBC Driver into virtual assets with SQL Responders.

Sections include:

Overview

Virtualize provides a wizard to create and deploy SQL Responders for database recordings that were created using a Parasoft JDBC Driver (as described in Using the Parasoft JDBC Driver). These database recordings capture database queries along with their corresponding results.

Virtualize will create one SQL Responder to handle the SQL queries for a particular JDBC URL. When a SQL Responder receives a query, it attempts to match it against the set of available query templates. If a match is found, the correlated result set is used as a response. The data used to match queries and provide correlated responses can be saved as either a data repository or a .csv file. 

Repository-driven Versus CSV-driven SQL Responders

Virtualize provides two options for generating SQL Responders from database recordings:

Creating Repository-driven SQL Responders


Before you can start creating repository-driven SQL Responders:

  • Your team must have a Data Repository Server installed and running. For details, see Installing a Remote Data Repository Server.
  • You must have access to a running Virtualize Server that hosts the database recording files for which you want to create SQL Responders.

It’s helpful to keep the Console view visible as you are creating SQL Responders. This view will display any warnings, errors, and informational messages that are generated while processing the database recording file.


To automatically create and deploy repository-driven SQL Responders:

  1. Right-click the VirtualAssets project and choose Add New> Virtual Asset (.pva) file.



  2. Specify a file name, then click Next.
  3. Select Recorded Database Queries, then click Next.



  4. Complete the Recorded Database Queries wizard page as follows:
    1. For Server, select the Virtualize Server where the database recording file is located.
    2. For Databases, select the appropriate data source from the list of JDBC URLs. This list is populated based on the available recordings; the available URLs will direct Virtualize to the appropriate set of files that captured the recording.
    3. For Responder Data Source Type, select Data Repository.



    4. (Optional) If you want date fields automatically replaced with wildcards, enable Wildcard Date Fields. If this option is enabled and a query takes a date as a parameter, Virtualize won’t require the dates to match exactly. We recommend enabling this option when a query takes the current time or a changing data as input, but you want a consistent response from Virtualize (ignoring changes in the date field).
    5. Click Next.
  5. In the Parasoft Data Repository Settings page, specify which data repository should store the data used to parameterize the SQL Responder, then click Next.

  6. Click Finish.

The following items will be created and configured:

Creating CSV-driven SQL Responders


Before you can start creating .CSV-driven SQL Responders, you must have access to a running Virtualize Server that hosts the database recording files for which you want to create SQL Responders. 

It’s helpful to keep the Console view visible as you are creating SQL Responders. This view will display any warnings, errors, and informational messages that are generated while processing the database recording file.


To automatically create and deploy .CSV-driven SQL Responders:

  1. Choose the Recorded Database Queries option in one of the available creation wizards.



    For details on accessing the wizards, see Adding Projects, Virtual Assets, and Responder Suites.
  2. Complete the Recorded Database Queries wizard page as follows:
    1. For Server, select the Virtualize Server where the database recording file is located.
    2. For Databases, select the appropriate data source from the list of JDBC URLs. This list is populated based on the available recordings; the available URLs will direct Virtualize to the appropriate set of files that captured the recording.
    3. For Responder Data Source Type, select .csv files.



    4. (Optional) If you want date fields automatically replaced with wildcards, enable Wildcard Date Fields. If this option is enabled and a query takes a date as a parameter, Virtualize won’t require the dates to match exactly. We recommend enabling this option when a query takes the current time or a changing data as input, but you want a consistent response from Virtualize (ignoring changes in the date field).
    5. Click Finish.

The following items will be created and configured:


For details on deployment settings, see Configuring Individual Virtual Asset Deployment Settings.

Customizing the Virtual Asset

You can modify or extend the database behavior by editing the SQL Responder tool configuration. This is described in SQL Responder.