Test Groups from template are an easier way of creating multiple tests on one table. This feature has been made available in version 23.3 or newer of Exmon.
What is a Test Group from Template?
Test groups allow users to add and configure multiple tests on a specific table in one editor.
Currently, there are test groups for three types of data sources:
- SQL tests from template: Allows users to use a table in a SQL database as the source
- TimeXtender tests from template: Users can configure a table in a TimeXtender database as the source.
- Exmon DM tests from template: Allows users to connect to a table in their Exmon Data Management service.
Types of tests available
- Column NULL check: Allows you to select columns that should not be NULL. The test fails and notifies the user if one or more of the columns have a NULL value. Read more about this type of test here.
- Table is Empty: Checks whether the table is empty or not.
- Custom SQL: Allows the user to add a WHERE script to their data source to test a custom request. Read more about this type of test here.
- Column Dimension Validation: Checks if your source table values match values from a reference dimension. Read more about this type of test here.
How to create a Test Group from Template?
- Right-click the Object browser's Test folder and select New... > SQL Tests From Template.
- Set the Test Group properties Name: Give the Test Group a name
Description (optional): You can add a description for what this test group does
System: Select the system your Test Group should be on. - Configure the data source Data Provider: Select the data provider you want to use.
Table/Custom: You can either select a table from the list or write a custom SQL.
Note: You can click Preview to verify that you have selected the correct table. - Select the tests you want to apply to your table. There are several types of tests you can choose from.
- Configure the tests.
Note: You must have a valid configuration on all tests before going to the next step.
- Configure the exception manager settings. This includes:
Owner: Select the owner of this test group. This person will be notified when tests fail.
Schedule: Choose when you want the tests to run.
Primary Key (Recommended): Used to determine the status of exceptions (e.g. new or open). Click Verify to test if the Primary key is valid. Read more here. - Finish creating the Test Group
How to configure the tests
Column NULL Check
Check all columns that should never contain a NULL value.
Custom SQL
Write only the part that comes after 'where' in the SQL query.
Column Dimension Validation
Choose a reference dimension for the columns you want to compare. You also have the option to indicate whether the column is allowed to have empty or NULL values by selecting the corresponding checkbox.
For instance, let's consider a scenario where you have a table that stores transactions, and one of the columns represents the currency used in each transaction. Your objective is to ensure that only valid currencies are included in the currency column. To achieve this, you would first create a Dimension that provides a dataset containing all the valid currencies. If you need more information on Dimensions, you can find it here. By selecting this Currency Dimension for the currency column, any non-valid currencies will be flagged as exceptions.