Creating a test suite or virtual asset
using the "create parameterized messages from traffic wizard"is the most common way to populate a repository. You can also import data into it and/or by manually define the structure and contents.
Excel, WSDL, or schema files can be used to structure and populate a Data Repository. This is accomplished using the Data Repository tool. The Data Repository tool specifies what data to import, how to structure it, and what repository data source should be include with the imported data. The target data source then links the imported data into the desired repository.
Use Case Clarifications
- Data Repository tool functionality is not applicable to SQL data sets. For details on how to create a virtual asset from a database recording, see Creating SQL Responders from a Database Recording.
- The Data Repository tool is not intended to create virtual assets that are parameterized from a data repository. For details on how to create parameterized message responders from traffic, see Creating Parameterized Message Responders from Traffic.
- Ensure that the Data Repository Server you will be populating is running.
To an existing (or empty) project, create a new.tst or provisioning action file with an empty test or action suite:
Choose File> New> Test (.tst) file or Provisioning Action (.pvn) file.
- Enter a file name, then click Next.
- Choose Empty, then click Finish.
- Add a new Repository Data Source to that suite.
- Be sure to specify what data set you want this data to be imported into. If you do not select an existing data set, an empty one will be created and you will need to rename the empty node later.
- Add the Data Repository tool to that suite:
Right-click the Test or Action Suite node and choose Add New> Test or Action.
- Select Data Repository Tool, then click Next.
- Use the available controls to specify how you want to initialize the data and structure, then click Finish. For details on the available options, see Tips for Initializing the Repository.
- Click Finish.
- Configure the Data Repository tool.
- Double-click the Data Repository Tool node.
- Ensure that the Target Repository is set to the Repository Data Source that you just created.
- Indicate whether you want new data to append or overwrite any existing data. If matching records are detected in overwrite mode, they will be replaced. If they are detected in append mode, new records will be added; existing records will not be altered.
- If you want to import additional items into the import data tree, use the Add button.
- Configure the node settings. For details on the available options, see Tips for Initializing the Repository.
- Select the Data Repository tool that you created, then click the Run toolbar button.
Details on the import will be reported in the Console view.
Any problems with the import will be reported in the progress view. For instance, the following message might occur if you are trying to import data into a Repository Server that is not currently running.
Tips for Initializing the Repository
- Data can be initialized from an Excel file or specified manually (by choosing None, then later adding it using the Data Editor).
- Structure can be initialized from an Excel, WSDL, or schema file—or it can be specified manually (by choosing None, then specifying the structure using controls in the data import tree)
When specifying WSDLs and schemas, be sure to indicate which data type definition you want to use. - Join Columns and Parent Join Columns indicate how your data should be structured. The Join Column is the name of the column that is used to indicate relationships across Excel sheets. The Parent Join Column is the correlated column in the parent node. If the value in a record’s Join Column matches the value in a Parent Join Column record, then that record becomes a child of the parent record.
For example, assume that you have an Excel file with 3 sheets: Books, Authors, and Publishers. All of these sheets use the Book ID column. In this case, Book ID would be the Join Column. Book ID could also be the Parent Join Column. In that case, when the Data Repositories tool processes an Authors sheet record with a Book ID set to 12345, it will make this record a child of the Books record whose Book ID is also 12345. - Data Set Keys allow you to specify key columns that Virtualize will use for responder correlations. These columns can later be selected in the Data Source Correlations tab.
If you don’t specify these key columns now, you can add them later in the Data Editor. - Multiple files can be added to the import data tree.
dsref* columns will be recognized when building the Data Record Type hierarchies. These columns will not be explicitly imported in the data repository since their meaning is implied within the layout of the data records.
See Parameterizing Arrays of Varying Size in SOAtest or Parameterizing Arrays of Varying Size in Virtualize for more information about dsref* columns.
- The [parasoft_null] (or [null]) special string will be interpreted as "null" ("nil" for XML traffic).
- The [parasoft_exclude] (or [exclude]) special string will always be interpreted as that ele-ment being excluded from the generated message—regardless of the message type.
• For details on how [parasoft_exclude] works with URL parameter data source correlations, see Matching on Absent/Empty Fields and Parameters.