Post-Subset Actions Introduction
Further, actions can be performed following a subset. Each is again informed by information in the Control spreadsheet and leverages an automated and pre-defined VIP Workflow. The post-Subset Actions are:
ADDPKEYS: Adds Primary Key Constraints to the Subset in the Staging Database.
ADDFKEYS: Adds Foreign Key constraints.
ADDKEYS: A composite action that performs both ADDPKEYS and ADDFKEYS, adding both Primary and Foreign Key Constraints to the Staging Database.
VALIDATEPKEYS: Checks that all Primary Keys are unique.
VALIDATEFKEYS: Checks whether Foreign Keys can be added to the data.
VALIDATEKEYS: A composite action that runs both VALIDATEPKEYS and VALIDATEFKEYS.
DELETEORPHANS: Removes rows that do not fulfil Foreign Key constraints. This is useful if FoundCriteria have been specified.
Data edits: Various actions will edit the resultant data Subset:
DROPFKEYS: Drops Foreign Keys.
DROPPKEYS: Drops Primary Keys.
DROPKEYS: A composite action that runs DROPFKEYS and DROPPKEYS, dropping both Foreign and Primary Key Constraints.
TRUNCATE: Deletes the data from the target Database or Schema, allowing you to subset iteratively.
DROP: Drops the tables created by the PREPENV Action.
Many of these Actions performed post-Subset create a functioning data set that can be used during testing and QA. For instance, adding Primary and Foreign Keys incorporates the relationships in the data needed for many types of automated testing.
Knowledge Base articles are provided on configuring each relevant sheet in the Basic/Advanced Control Spreadsheet, and running the Action associated with them. The below table summarises all Actions available when subsetting using Test Data Automation, and the sheets used to configure them. It also summarises which sheets the actions overwrite or populate in the Control Spreadsheet; if blank, it means that these actions are performed on the basis of the Source Data only:
Action | Definition | Informed by data in the following sheets | Populates/overwrites data in |
---|---|---|---|
Retrieves the metadata from the Source Data that is needed to run the Subset A composite action, it runs the TABLES, GETKEYS and FINDIDENTITYCOLUMNS actions. |
|
| |
Retrieves metadata from the source database. | |||
Retrieves metadata from the source database. |
| ||
Finds identity columns in the source database |
| ||
Creates tables and indexes in the Staging Database. |
|
| |
Creates the rules to drive the Subset. | |||
Writes data to the staging database. | |||
Adds Primary Key Constraints to the Data Subset. |
| ||
Adds Foreign Key constraints. |
| ||
| |||
Checks that all Primary Keys are unique. |
| ||
Checks whether Foreign Keys can be added to the data. |
| ||
Runs VALIDATEPKEYS followed by VALIDATEFKEYS. |
| ||
Deletes Foreign Keys from the Data Subset. |
| ||
Deletes Primary Keys from the Data Subset. |
| ||
| |||
Deletes the data from the target Database or Schema, allowing you to subset iteratively. |
|
| |
Drops the tables created by the PREPENV action. |
|
|
The Knowledge Base articles on data subsetting will explain how to configure and perform the Actions associated with a Basic Subset. It then sets out how to refine the Advanced Control Spreadsheet and perform iterative Subsets, before detailing the Actions that might be performed Post-Subset.
The Data Subsetting of the Knowledge Base does not provide instructions on exposing a Subset to a shared server or self-service test data web portal. This process is generic to all Test Data Automation utilities.