The Field Tests: Single Database Wizard

Use the Field Tests: Single Database Wizard to validate business rules, for example whether a product ID has the correct format or whether foreign key relationships are adhered to.

The Field Tests: Single Database Wizard extracts the required information from a single database.

This database can come from one of the following sources:

  • An Open Database Connectivity (ODBC) connection pointing to any database vendor, including Hadoop

  • A DDL (data definition language) text file that contains all table, column and constraint information

To use ODBC connections in your Tosca Data Integrity tests, you must first configure them in the ODBC Data Source Administrator as described in chapter "Create an ODBC connection to a database".

If you run a 64-bit operating system, you can use both 32-bit and 64-bit ODBC connections.

The Tosca Data Integrity Modules And Samples.tsu subset contains Field Tests: Single Database TestCase templates that allow you to run the following tests:

Test

Description

Nullness

Verifies that columns contain no Null values.

Uniqueness

Verifies that there are no duplicate values in the selected column.

Check that row count > 0

Verifies that the table has data rows.

Run Field Tests: Single Database tests

To perform Field Tests: Single Database tests, follow the steps below:

  1. Ensure that your Field Tests TestCase templates are located in the _Tosca Data Integrity Templates folder.

    If you want to use a template that you have created manually, make sure to move it to the _Tosca Data Integrity Templates folder.

  1. In the TestCase template you are going to use for your tests, fill out the TestStepValues DSN, UserID and Password.

    Alternatively, you can create test configuration parameters which have to be set once (see chapter "About test configuration parameters").

    If you don't want to use the Field Test TestCase templates provided in the Tosca Data Integrity Modules And Samples.tsu subset, you can also create a template manually.

  2. Open the Field Tests: Database to Database Wizard: Select a Data Integrity folder and click the Single Database icon in the dynamic menu Data Integrity.

    Alternatively, you can right-click a Data Integrity folder and select Tosca Data Integrity->Field Tests: Single Database from the context menu or press CTRL+W, CTRL+E.

Open the Field Tests: Single Database Wizard via the context menu

  1. In the Tosca Data Integrity TestSheet properties dialog, click Yes.

Create Data Integrity TestSheet properties

  1. The Wizard guides you through the TestCase creation:

  2. If you have performed Step 3 - Additional Options in its entirety, you can now execute your tests.

    If you have not performed Step 3 in its entirety, you must perform additional steps before you can run your tests. For more information, see chapter "Step 3 - Additional Options".

Tosca Data Integrity offers parallel execution for specific TestCases. For more information on which tests you can run in parallel and how to do so, see chapter "Run Data Integrity tests in parallel".