Use TestCase templates from the Tosca BI subset

The TestCase templates in the Tosca BI Modules And Samples.tsu subset form the basis of your Tosca BI tests. When you run a Tosca BI 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 _Tosca BI 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 Tosca BI tests, follow the steps below:

  1. Create a new TestCases folder in the _Tosca BI Templates folder.

  2. Cut and paste the TestCase template you want to use from the _Tosca BI 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 BI Wizard.

    You only define whether its a source or target connection via the property BIWizardConnection. The connection in the template remains empty and the ActionMode is set to Input. Tosca BI 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. Tosca BI 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 BI folder and run the respective Wizard on this folder.