Use TestCase templates from the subset

The TestCase templates in the Tosca Data Integrity Modules And Samples.tsu subset form the basis of your Data Integrity tests. When you run a DI Wizard, the Wizard uses the respective template to create your TestCase.

For instance, if you want to run field tests on a database table, you need to work with the TestCase templates in Field Tests->Single Database Table.

TestCase templates in the _DI Templates folder

If you do not want to use one of the provided TestCase templates, you can also create your own TestCase templates.

Use existing templates

To use TestCase templates for your Data Integrity tests, follow the steps below:

  1. Create a new TestCases folder in the _DI Templates folder.

  2. Cut and paste the TestCase template you want to use from the _DI Templates folder into the newly created TestCases folder.

    Alternatively, you can copy and paste the TestCase template into the TestCases folder. In this case, you need to rename the template, so you know which template to select in the Wizard.

  1. Modify the SQL statement according to your database needs.

    For example, the screenshot below shows the SQL statement for MS SQL databases. If you are testing an Oracle database, you need to change DATALENGTH to LENGTH.

SQL statement in the Min length TestCase Template

Set the connection

You can set the connection for your TestCases in one of the following ways:

  • Define the connection in your DI Wizard.

    You only define whether its a source or target connection via the property DIWizardConnection. The connection in the template remains empty and the ActionMode is set to Input. Tosca DI then uses the connection you define in the Wizard to populate your TestSteps appropriately.

  • Define the connection that you want to use in the TestCase template. Data Integrity then automatically copies it in the TestCase.

Create your TestCases

Once you have adapted the TestCase template, you can run the Wizard and create your TestCases.

To do so, create a new Data Integrity folder and run the respective Wizard on this folder.