- 28 Jul 2023
- 6 Minutes to read
- PDF
Configuring a Test
- Updated on 28 Jul 2023
- 6 Minutes to read
- PDF
Overview
Configuring a Validatar test is simple. Here's what you need to know:
There are two types of test creation methods in Validatar:
- Standard Tests
- Template Tests
In this article, you'll learn about creating a standard test that is ideal for ad-hoc, one-time use cases. View the related articles to learn more about Template Tests.
When to Use a Standard Test
Here are a few examples of when you would choose to create a standard test.
- For ad hoc test scenarios
- Business rules only apply to one or a few tables
- All object names are known and/or won't change
Data Sources
A user must have Create & Edit Tests permissions enabled in Data Source Permissions to select a data source. You will only see the list of Data Sources you have access to.
Test Data Types
A test data type is exactly as it sounds: you are choosing the type of data you want to test. The options are:
Single Value SQL (String or Numeric) | Write a SQL statement that returns a single string or numeric value. For example,
|
Key-Value List SQL (String or Numeric) | Write a SQL statement that returns two columns. The first column is a key and the second column can either be a string or numeric value. A Key-Value List SQL script usually includes a Group By clause when the second column returned is an aggregate.
|
Profile Result | If you've executed a profile set against a table or column, you can use that profile result in a Validatar test. You have to link the appropriate table or column to the test using the Metadata Links section before you can select a profile result. If Create a link to the metadata that contains profile data remains after you've linked table or column, go to Profile Set Executions and verify that a profile was run against the appropriate table or column. |
Target Data Type
Target Data Type is where you choose the type of data you want to compare the previously selected data to. The options include Single Value SQL, Key-Value List SQL, and Profile Result as well as a few new options:
Numeric Value | Compare your data to a single numeric value without having to write a SQL statement. You would choose this option when you expect a specific number in your data and don't plan to change it. |
Numeric Range | See if your data lies between a range of numbers. The range is inclusive. |
String Value | Compare your data to a single string value. To search for patterns, check the Regular Expressions checkbox. Learn more about Regular Expressions syntax here. |
Previous Profile Result | Compare your data to a previous profile result. You have to link the appropriate table or column to the test using the Metadata Links section before you can select a previous profile result. You can compare to either the average, minimum, or maximum of previous results for a selective amount of days, weeks, or executions. If Create a link to the metadata that contains profile data remains after you've linked table or column, go to Profile Set Executions and verify that a profile was run against the appropriate table or column. |
The available options in the Target Data Type field depends on what is selected in the Test Data Type above.
Test Data Type | Available Target Data Types |
---|---|
Single Value SQL (string) | Single Value SQL (string), Profile Result, Previous Profile Result, String Value |
Single Value SQL (numeric) | Single Value SQL (numeric), Profile Result, Previous Profile Result, Numeric Value, Numeric Range |
Key-Value List SQL (string) | Key-Value List SQL (string), Single Value SQL (string), String Value |
Key-Value List SQL (numeric) | Key-Value List SQL (numeric), Single Value SQL (numeric), Numeric Value, Numeric Range |
Profile Result | Profile Result, Previous Profile Result, Numeric Value, Numeric Range, Single Value SQL (numeric) |
Starting in Validatar 2021.3, the Multi-Value SQL test data type is now referred to as Key-Value List SQL.
Metadata Links
Metadata Links allow profile results that have been run against a table or column to be used in a Validatar test. Linking metadata is not required but is highly recommended to
- Use data profile results in test cases
- Create a relationship between metadata and their related test cases
- Discover how comprehensive testing is
Start typing the name of a table or column to search for the object and select it. You can add multiple metadata links to a test.
Result Configuration
The Result Configuration section is used to tell Validatar what it should consider as a failed test. You can also select options to increase execution efficiency when running the test. The contents of the result configuration section depend on the combination of test and target data types selected in the previous sections.
Configuration Setting | Description |
---|---|
Missing Key Settings | One benefit of using Validatar is to identify missing values in a data set. When that scenario happens, you're able to tell Validatar how that missing value should be evaluated. The comparison can either
|
Value Success Criteria | For string tests: Choose if the test should pass or fail based on how the source value compares to the target value. When a regular expression is used, the only comparison option is for the source value to match the target value. |
Result/Record Success Criteria | For numeric tests: Compares the two pieces of data from the test together and calculate the difference. There are various comparison methods
|
Overall Success Criteria | For Key-Value List SQL tests: Since Key-Value List SQL results return multiple records that have been compared, the overall success criteria option allows the user to decide how many failed records account for a failed test. There are multiple comparison methods
|
Only Keep Failures | Choose Yes if you only want to return failed records. This keeps your results repository from being overloaded. |
Abort Processing After Failures | Allows Validatar to abort the execution of a test after a certain number of record failures. |
Abort Processing After Rows | Allows Validatar to abort the execution of a test after a certain number of rows have been returned. |
Scripts Include Order By | Choose Yes if your SQL script includes an order by clause. This lets Validatar know that it does not have to sort your data, optimizing execution time. |
Purge Results After Days | Allows Validatar to clear the results of this test from the Validatar database after a certain number of days. Configuring this option overrides the default purge settings set at the global level. |
Access
- Click on Tests in the navigation pane or from the project home page.
- Select the New button.