Working with TestCase templates

Templates are models for concrete TestCases.

TestCases with a similar sequence can be generalized with a template and be dynamically created using an external DataSource. This process is called dynamic TestCase generation.

Select the option Convert to Template from the context menu in order to convert a TestCase or a Business TestCase into a template.

TestCases which are marked as TestCase templates have a different icon:

Icon

Description

TestCase

TestCase Template

In order to create concrete TestCases out of templates a TestCase TemplateInstance has to be generated (see chapter "Creating TemplateInstances").

Note that TestCase templates and instantiated TestCases always maintain their connection to their test data source. This means that if you copy and paste TestSteps from a template, even partially, the copy keeps hidden references which can't be removed.

Properties

SchemaPath

This describes the path to the DataSource that contains the schema of the template data. The schema is used to support the input of references to the DataSource and for verifying references in the template. This manipulation can be performed either directly in the properties or with the SchemaSource-Wizard.

When using an Excel schema source, variables can be defined instead of absolute paths (see chapter "Options - General").

InstanceName

If TestCase templates are instantiated, the TestCase names are automatically generated by using the instance names of the data source. If a data source is used for several Template Instances, the names of the instantiated TestCases are the same for all Template Instances.

The property InstanceName enables to manipulate the names of TestCases to be created.

If a fixed value is specified, all instantiated TestCases are assigned this value with consecutive numbering as name.

If the syntax <Value>{XL[Instance.Name]}<Value> is used as value, the instantiated TestCases are assigned the name of the instances linked to the data source with an additional value. The fixed value can be specified prior to or after the dynamic value.

Property InstanceName

Options

Create Template Instance

Creates a TestCase TemplateInstance.

Check Template

Verifies the template on the basis of the schema source. The names used in the template are compared with the attribute names of the schema source. If a condition is specified for a template, it is also verified. Customer-specific properties, test configuration parameters and the property InstanceName are additionally considered. Errors are displayed in the tooltip of the corresponding object.

A warning message will be displayed if an attribute name contains one of the following characters in the schema source: -> or . (dot). This is a problem only if two attributes exist that are distinguished by -> or .. In this case, only the first of the two attributes is used for instantiation.

Edit SchemaPath

Opens a wizard to adjust the schema source.

Convert to TestCase

Converts the template into a TestCase.

After this operation, all information saved in the template is lost!

Automated TestCase in Tosca

TestCases or data-related TestCases are automated in Tosca Commander. For this purpose, a TestCase for the dialog control is shown and then specified as a template.

TestCase in Tosca Commander

Beneath the TestCase are groups of actions to process the business cases. The actions are mapped as TestSteps. Individual data to be entered or used for testing are displayed as lists:

Test of insurance premium

Use Business TestCases as a template

Creating and managing Business TestCases with templates is similar to technical TestCases.

In addition it is possible to assign one or more technical TestCase templates to a Business TestCase template by using drag & drop.

Assign TestCase templates using drag & drop

If a TestCase Template Instance is generated from a Business TestCase template, the TestCases are instantiated from the associated TestCase templates.

TestCase Template Instance from a Business TestCase template