In this section:
Different testing scenarios may require the data to be structured in a variety of ways. The data modeling feature enables you to modify data structures that you can use in all of your testing scenarios.
You can use the duplicate functionality to make a copy of a simple or hierarchical data set record type. Members/keys and their properties (constraints, mask, and generation settings) are also duplicated.
Choose Delete Record Type from the record type ellipsis menu to delete it.
You can add members to record types within simple and hierarchical data sets.
To delete a member from the model, choose Delete Member from the member's ellipsis menu.
Properties define the kind of interactions you can perform with the components in your data model. The following components can take properties:
Generation and mask settings and data constraints are types of properties that are added when you infer constraints or generate data.
To remove a property:
SQL templates are one or more SQL statements that represent the recorded SQL queries.
The new template will appear in the model. It will be assigned a display name in a SQL# format and include an empty results set.
To change the template display name:
To delete a template, click the ellipsis menu icon and choose Delete SQL Template.
To add a parameter:
To delete a parameter:
Columns in a SQL data set hold the data.
To delete a column:
You can generate data for SQL, hierarchical, and simple data sets. The data is generated according to the Mask and Generation Settings configured for the parameter, column, result set, member, or key member that holds the data.
A new repository will be created and populated with data based on the mask and generation settings.
You can generate a masked copy of a data set to hide sensitive information stored in your server. A masked data set contains the same number of entries as the source, but any data set components with the Mask and Generate Settings configured will be randomized according to the settings. You can mask data for the following types of components:
You can also configure the data constraints settings to ensure that the masked data is correctly generated for your test scenarios.
Click Mask Data in the toolbar.
All data members with mask and generate settings will be replaced in a new masked repository.
You can copy a subset of data from one repository into a new repository.
A copy of the repository is made that includes only the data within the constraints.
The following behaviors apply to subsetting SQL data sets:
The Data Modeling feature can automatically set constraints for generating new data based on the data in the repository. You infer constraints for the selected repository by choosing a repository in the sidebar and click Infer Constraints.
You can also infer constraints for individual members and keys by choosing Infer Constraints from the key/member ellipsis menu.
CTP will infer that the data is a Boolean, date, number, or string.
If you want to edit the constraints, click on the constraint properties and make changes in the Data Constraint Settings editor.
You can configure the following settings:
Choose the Boolean type if the key/member should be constrained to true or false.
Choose the Date type if the key/member should be constrained to a date. You can configure the following settings:
Start | Specify a start and/or time. |
---|---|
End | Specify an ending date and/or time. |
Format | Specify the pattern that the start and end dates should follow. |
Choose the Number type if the key/member should be constrained to a number. You can configure the following settings:
Minimum | Enter the lowest number that can be generated. |
---|---|
Maximum | Enter the largest number that can be generated. |
Decimals | Enter the number of decimals allowed. |
Choose the String type if the key/member should be constrained to a string. You can configure the following settings:
Pattern | Define a pattern for the string using For example, you could randomly generate social security numbers using the following pattern:
|
---|---|
Character map | Specify the range of characters that can be used in the pattern. The default value when set to fixed is all printable ASCII characters, 0x20 (space) through 0x7e (~). The character map will be ignored if the pattern does not contain any ampersand (&) characters. |
You can configure the component to reference the data in another component. This ensures that keys, members, columns, result sets, and other data-holding objects in the model remain consistent. Click in the Reference field and a hierarchical view of the objects in the data set appear.
Data constraints can be configured manually by setting properties, using the Infer Constraints functionality, or through the definition file when creating a virtual asset from traffic in Virtualize. The integrity test functionality enables you to verify that the constraints are valid for the data stored in the repository.
You can test the integrity of individual objects in the model (such as members and columns) or all objects in a data set by choosing Integrity Test from the ellipsis menu.
You can test the data integrity for the repository by clicking Integrity Test in the toolbar.
If no constraints are set, a warning will appear. If the data does not match the constraints, an error will appear, and the member will be flagged.
You can click on the error message to see details in an overlay.
You can view additional information about the integrity tests in the Test Data Assistant Tasks tab.
The Mask and Generation settings enable you to control the test data for various scenarios. Mask and Generation settings apply to the following types of data set components:
The mode is not applicable to SQL result sets. The Mask and Generate Settings for SQL result sets enable you to configure the maximum and minimum number of times a SQL column appears in the result set.
The specific settings that are available depend on the mode. You can specify the mask and generation mode when adding members or change them for existing members. The following modes are available.
Choose this mode to programmatically set constraints. Simple math, string, and date operations using JavaScript syntax are supported. You can also use the ready-made aggregate functions in your formulas (for example, SUM, COUNT, and so on).
See Consuming the Data in Tools for information on the syntax for referencing other record type members.
${
" (dollar sign and open curly brace) and end with "}
" (closed curly brace).${member}
syntax.${recordType.member}
syntax.${dataSet:ds.key}
syntax.The following formula computes a subtotal price.
SUM(${cart_item.price})*${sales_tax.rate})
The following formula generates an email address:
CONCAT(${FIRSTNAME},"_",${LASTNAME},"@parabank.com")
Choose this mode to generate data using values from an existing repository. This mode requires additional settings to be configured.
Type | Specify how the seed data should be copied to the generated repository. Random: Copies values to the generated repository randomly. Round Robin: Loops through the seed data as necessary to add records according to the generation settings. For example, if set the number of records to generate to 100, but the seed data only has 80 records, the gap will be filled by beginning copying data from the first 20 records. Unique: Each record will only be copied once. The number of records requested must be less than or equal to the number of records in the seed data during data generation. You will receive an error message if more records are requested than the number of records in the seed data. |
---|---|
Repository | Choose the seed repository. |
Data set | Choose the seed data set within the repository. |
Column | Choose a key column within the data set. |
Independent | Enable the Independent option generate member data independently from other member data that may be configured. When you generate data, you make a copy of existing repository and the selected data sets based on how the members are configured. Enabling the member data to be generated independently reduces potential conflicts. |
Choose this mode to generate random Booleans, dates, numbers, or strings. Dates, numbers, and strings require additional configuration.
You can configure the following settings for generating and masking random dates:
Start | Specify a start and/or time. |
---|---|
End | Specify an ending date and/or time. |
Format | Specify the pattern that the start and end dates should follow. |
You can configure the following settings for generating and masking random numbers:
Minimum | Enter the lowest number that can be generated. |
---|---|
Maximum | Enter the largest number that can be generated. |
Decimals | Enter the number of decimals allowed. |
You can configure the following settings for generating and masking random strings:
Pattern | Define a pattern for the string using For example, you could randomly generate social security numbers using the following pattern:
|
---|---|
Character map | Specify the range of characters that can be used in the pattern. The default value when set to fixed is all printable ASCII characters, 0x20 (space) through 0x7e (~). |
Choose this mode to generate sequential numbers and dates starting with a specified value and incrementing to a specified end value. The configurations for ranged data are the same for random data, but ranged data also has an increment field for specifying how the data should increment.