Manage test cases

AD
DM

In the Test Cases section of the Entity Groups page, you can click through to individual test cases, see when tests were last run and which ones passed or failed, and you can enable or disable test cases.

To view results for an individual test case, click the test case link in the list. The test case page opens with detailed information.

Drilling down through test cases

To enable or disable individual test cases for the current entity group, click the corresponding checkbox in the ENABLED? column.

Click the checkbox next to the column heading to enable or disable all test cases, .

Save your changes.

Adding or updating test cases

To create and add a test case, click +Add Test Case.

The test case page displays the query editor containing the query that defines the test case conditions, as well as a list of the entity groups and their corresponding results for the test case.

Tip: Have fewer than 250 test cases to minimize run and preview times.

Available actions

  • Define the name, description and query for the test case.
  • Add users to receive email notifications for the test case.
  • Define the failure condition and threshold.
  • Drill through to entity groups.
  • Enable entity groups to run for the test case.
  • Add entity groups to the test case.
  • Customize or add language translations.

Note: Common test case names should follow a convention; for example, all address checks should include address in the name. This will make it easier to filter results in the dashboard.

Create or update the test case query

The query editor used for editing test cases includes the same functionality as the SQL Query Editor for Network MDM Reports. The query editor offers tools for auto completion, as well as easy access to quick lists of available keywords, tables, fields, and operators. As you construct your query, the editor automatically validates it.

Rules for defining test cases

When you add or update a test case, the following rules apply:

  • SELECT statements must include vid__v and is_veeva_master__v
  • Address, License, and ParentHCO queries must include entity_vid__v
  • UNIONS are only allowed in sub-queries
  • No semicolon at end of the query

Example

SELECT entity_vid__v,
       vid__v,
       formatted_address__v,
       address_status__v,
       record_state__v,
       address_type__v,
       created_date__v,
       modified_date__v,
       is_veeva_master__v
FROM ADDRESS
WHERE coalesce(address_type__v, '') = ''

Add or update a test case query

Updating an existing test case

  1. On the Data Quality Report dashboard, select a test case from one of the rows in the test case results table.

  2. At the top of the Test Case Details page, click the Gear icon and select Edit.

Adding a test case

To add or update the test case query:

  1. On Data Quality Report dashboard, click the + (add) button and select Test Case.

    The Test Case page appears with an empty query editor. By default, all entity groups are enabled for the new test case.

  2. Type a Name and Description for the test case.
  3. Begin typing your SQL code in the text area. While you type, you can press Control-Space to display auto complete options for keywords, tables, fields, and operators.

    Double-click a selection in the drop-down list to use it in your code.

    As you type, an icon appears to the lower left indicating whether your code is valid. See the Validate the query section for information on automatic query validation.

  4. Click the corresponding links at the bottom of the text area to view valid keywords, tables, fields, reference data, or operators.

View or hide invalid records

The Record State icon in the editor, by default, is set to hide any records with a state of INVALID, DELETED, or MERGED_INTO from the results.

To include those records in the results, click the icon. When these record states are unhidden, the Eye icon appears open. Click the icon again to hide these record states.

Validate the query

As you type your query, an icon appears to the lower left indicating whether or not your code is valid. Note that until you finish complete sections of code, the icon will appear as an x.

Once you have completed a successful section of code, it should appear as a check mark, indicating that the code is valid.

If the code is not validating, click View Errors next to the x icon to see the errors in your code.

If you leave this option enabled, the error messages will resolve as you fix the code, and re-appear as you type additional code, until the code is complete and valid. Click Hide Errors link next to the x icon to hide these messages.

Once you have completed your code and it validates successfully, the green check mark icon will re-appear in the lower left corner.

Configure the failure threshold

Select an option next to Allow Record Failures to define acceptable limits for the test case:

None – This test case will fail if one or more records fails.

Max – The test case will fail if the maximum number of failed records you specify is exceeded. This setting is used when there are a known (fixed) number of exceptions.

Max per group – The test case will fail based on the maximum number of failed records specified for each individual entity group.

Manage entity groups

In the Entity Groups section of the Test Case page, you can select entity groups for the test case.

  • Enable or disable entity groups for the current test case - Click the checkbox in the ENABLED? column.

  • Enable or disable all entity groups - Click the checkbox next to the column heading.

  • Filter the list by entity group name.

  • Add an entity group - Click +Add Entity Group .

    For more information on creating entity groups, see the Drill down by entity group section.

Save your changes.

Define languages

Reports and report emails display in a user’s preferred language, for all languages currently supported in Network MDM.

For other languages (as well as those already translated), you can customize or add translations at the bottom of the Test Group page.