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 BI tests, you must first configure them in the ODBC Data Source Administrator as described in chapter "Create an ODBC connection to a database (ODBC data sources)".

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

The Tosca BI 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 BI Templates folder.

    If you want to use a template that you have created manually, make sure to move it to the _Tosca BI 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 do not want to use the Field Test TestCase templates provided in the Tosca BI Modules And Samples.tsu subset, you can also create a template manually.

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

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

Open the Field Tests: Single Database Wizard via context menu

  1. In the Tosca BI TestSheet properties dialog, click Yes.

Create BI 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 BI 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 Tosca BI tests in parallel".