After you have configured the Parasoft JDBC Driver for your specific setup, follow these steps in order to prepare the Virtualize Server for receiving the recorded database data:

  • Start Virtualize and verify that the associated JDBC Controller appears in the Virtualize Server view

Note that you do NOT need to restart your AUT as you switch to (or from) record mode.

You can now record data as follows:

  1. Change the Parasoft JDBC Driver mode to Record. For details on how to change modes, see Switching Parasoft JDBC Driver Modes.

  2. Exercise the application by running use cases that result in the database being queried. Virtualize Console will display an entry every time it receives a SQL query along with its associated ResultSet data.

The recorded data is saved under VirtualAssets/database_recorded_data (You can view this folder by switching to the Navigator view and refreshing the project in order for it to display the latest file state). The database_index.txt file includes a unique identifier for the database data that has been received.

The database (each entry in that file) is identified by the JDBC connection URL that is used by your application (or Data Source configuration in the application server). Each entry in the database_index.txt file corresponds with a folder named database_[idvalue]. If database recording with more than one JDBC connection URL was performed, then more than one database entry in the index file is added and more than one folder is created. Each database folder contains a query_index.txt file and a number of data_[idvalue].csv files. Each query corresponds with a CSV file.

Once you are done executing the desired scenarios with the application under test, the recorded data in VirtualAssets/database_recorded_data can be used to generate a SQL Responder using that data to virtualize the database connection; this is described in Creating SQL Responders from a Database Recording and Creating Message Responders Manually.

  • No labels