Validate Both Primary and Foreign Keys (The composite ValidateKeys Action)
Search Knowledge Base by Keyword
VALIDATEKEYS is a composite action that performs both VALIDATEPKEYS and VALIDATEFKEYS. It thereby checks whether both Primary Keys and Foreign Keys are valid. Primary Keys must be unique. Foreign Key must refer to a column in another table with a valid, corresponding value.
You must first configure the Tables, ForeignKeys, and SoftKeys sheets, using instructions in the articles on VALIDATEPKEYS and VALIDATEFKEYS.
Check the Log File and Subset Report at this stage, to check that the Actions have performed correctly.
To run VALIDATEKEYS, open The VIP Server Controller from your desktop or start menu. You must open it as an administrator. If The VIP Server Controller is already running, make sure the relevant .vip workflows are Put in Memory. See this article for instructions.
Next, complete the mandatory parameters in the “Run Flow” tab. If working from a Config file created for the current Subset, you should only need to update the parAction argument and enter any additional optional parameters. You will need to update the location of the Subset Report and SQLActionsPath if these have changed. See this article for instructions on working with a Config file.
Specify “VALIDATEKEYS” for parACTION:
parAction= VALIDATEKEYS
Complete any optional parameters. See this Knowledge Base article for a full list of Arguments and example parameters.
Once you have parameterized the VALIDATEKEYS Action, make sure your Configuration Spreadsheet, Subset Report and Log file are all shut. Next, click “Create File” and then click “Start” to run the action.
In the output dialogue, you will see “Flow execution completed on remote server. Please check logs for details.” once the VALIDATEKEYS Action is complete”:
If you receive an error message in your output dialogue or log, please refer to this article to troubleshoot common issues. You can also run your Action on debug mode for a more detailed log. You can also check the Log File and Subset Report at this stage, to check that the Actions have performed correctly.
If the Primary and/or Foreign Keys are invalid, you can perform one of the following actions:
- DROPKEYS will remove both Primary and Foreign Keys.
- DROPPKEYS will remove Primary Keys.
- DROPFKEYS will remove Foreign Keys.
Run VALIDATEKEYS from the Command Line
To run VALIDATEKEYS from the Command Line, first open your re-usable .cmd script in a text editor.
If you have already configured a .cmd script for one Subset Action and wish to edit and re-use that script, you should only need to set “VALIDATEKEYS” for “Action”.
Otherwise, configure all mandatory parameters in the .cmd script.
You can also specify optional parameters at this stage.
Make sure your Control Spreadsheet, the Subset Report, and any Log Files are closed.
Run the script to validate the Primary and Foreign Keys.
Check the Log File and Subset Report at this stage, to check that the Actions have performed correctly.
If the Primary and/or Foreign Keys are invalid, you can perform one of the following actions:
-
-
-
- IEnumerable to Data Reader
- Data Table to List
- Nested String List to Data Table
- List to Data Table
- IEnumerable to List
- List to IEnumerable
- Remove from List
- Exists in List
- Value Exists in Dictionary
- Key Exists in Dictionary
- Remove from Dictionary
- Get from Dictionary
- Clear Dictionary
- Add to Dictionary
- Clear List
- Add to List
- Show all articles ( 1 ) Collapse Articles
-
-
-
-
- Introduction
- Overview of the Advanced Control Spreadsheet
- Refining the Control Spreadsheet
- The ProcessModel sheet – Toggling Subset Rules
- The Tables Sheet: Defining Metadata that will be read from the Source Database
- The ForeignKeys Sheet - Specifying which Foreign Keys to read from the Source Database
- Explanation of Remaining Sheets in the Control Spreadsheet (for reference only)
-
- Overview of Post-Subset Actions
- Add Primary Keys
- Add Foreign Keys
- Add Both Primary and Foreign Keys (The Composite ADDKEYS action)
- Validate that Primary Keys are Unique
- Validate that Foreign Keys are Unique
- Validate Both Primary and Foreign Keys (The composite ValidateKeys Action)
- Drop Foreign Keys
- Drop Primary Keys
- Drop both Primary and Foreign Keys (The composite DROPKEYS Action)
- Delete Orphans
- Truncate Data
- Drop Tables
-
-
- How to Configure the Synthetic Test Data Configuration Control Sheet
- Sample Commerce Configuration Sheet Examples
- Adding Event Hooks in Configuration sheet for custom functionality
- Use Event Hooks to call VIP Flows
- How the PreProcessVariables Table is used in the Configuration sheet
- PreProcess Variables and Parameters
- Using SQL Functions to query Databases and Using the Queries in Data Generation Functions
- Different Methods for Connecting to Source Databases
- Summary of the Process to Configure the Test Data Configuration sheet
-
-
-
-
-
- Test Modeller : System requirements (Windows, Linux)
- Test Modeller : Installation components
- Test Modeller: Software Pre-requisites
- Test Modeller Core (Linux) Installation
- Test Modeller Core (Linux) Optional – Active Directory
- Test Modeller Core (Linux) Optional – SSL Certificate Installation
- Test Modeller Core (Linux) Optional – Postgres LDAP
- Test Modeller – Maintenance
- The UI Recorder
-
-
-
- Articles coming soon
-
- Articles coming soon
-
-
-
- Welcome Selenium (Java)
- Prerequisites (Selenium Java)
- Configuration (Java)
- Scan an Existing Web App
- Build a Model (Java)
- Generate Automation Code
- Execute Tests (Java)
- Import existing framework / custom page objects (Advanced)
- Edit Code Templates (Advanced)
- Extend Test Modeller (Advanced)
- Common Problems
-
-
-