Generate and combine Instances

The main purpose of TestCase-Design is to generate entire test datasets from defined Attributes and their value ranges. If you combine all of your defined Instances into one dataset, you can later use this dataset to organize your TestCases.

You can generate and combine Instances for the following objects: TestSheets, TestCase-Design Classes, and TestCase-Design Attributes.

To do so, right-click the respective object and select Generate Instances->the desired combinatorial method from the context menu.

Generate TestSheet Instances

The number of Instance combinations depends on which combinatorial method you choose.

By default, the maximum number of allowed Instance combinations is 1000. You can change the default number in your ToscaCommander.config.exe file.

For more information, refer to the Tricentis Knowledge Base: https://support.tricentis.com/community/article.do?number=KB0013660

Combinatorial methods

You can choose different combinatorial methods to meet your specific project needs. Depending on the granularity of your requirements, you may want a greater or lesser number of possible combinations from which to build your TestCases.

The following combinatorial methods are available:

All combinations

Choosing All combinations ensures that all possible Instance combinations are taken into account for testing. This method will result in the highest number of possible combinations.

In a TestSheet that contains 3 Attributes with 3 Instances each, this results in 27 possible combinations:

Generate Instances with All combinations

Orthogonal combination

Choosing the Orthogonal combination method results in the lowest number of possible combinations. The only requirement for an Orthogonal combination is that each Instance value is used once.

In a TestSheet that contains 3 Attributes with 3 Instances each, this results in 3 possible combinations:

Generate Instances using Orthogonal method

Pairwise combination

This method combines each pair of possible value combinations for any two Attributes.

In a TestSheet that contains 3 Attributes with 3 Instances each, this results in 10 possible combinations:

Generate Instances using Pairwise method

Linear expansion

In order to use linear expansion, you must define a StraightThrough path. This path is frequently used and thus carries the highest risk if it were to fail. Linear expansion switches out one StraightThrough Instance for one non-StraightThrough Instance in each combination.

In a TestSheet that contains 3 Attributes with 3 Instances each, this results in 7 possible combinations:

Generate Instances using Linear expansion

Linear expansion [Relations]

To further fine-tune your dataset, you can use Relations to generate Instances using linear expansion. See chapter "Create instances using Relations" for more details.

Complete Instances

If you want to update your Instance combinations to include additional Instances without creating duplicates, you can combine Instances that have not been combined yet. Tricentis Tosca displays Instances that have not been combined yet in bold font.

To complete your Instances, follow the steps below:

  1. Right-click on a TestSheet, TestCase-Design Class, or TestCase-Design Attribute and select Complete Instances from the context menu.

  2. Select the desired combinatorial method.

Generate selected objects

If you want to combine only specific objects within your TestSheet, you can generate combinations for specifically selected objects. You can do this with both Attributes and Instances.

Generate specific Attributes

To combine specific Attributes, follow the steps below:

  1. Select the Attributes you want to combine by holding the Ctrl key.

  2. Right-click on one of the Attributes, and select Generate Instances from the context menu.

  3. Select the desired combinatorial method.

In the example below, the Attributes Age and Residence are combined using All combinations, which results in 9 possible combinations. The Gender Instances are not used, and therefore appear in bold.

Generate specific Attributes

Generate specific Instances

To combine only specific Instances, follow the steps below:

  1. Select the Instances you want to combine by holding the Ctrl key.

  2. Right-click on one of the Instances, and select Generate Instances from the context menu.

  3. Select the desired combinatorial method.

In the example below, the Instances >25, <25, Male, City, and Suburbs are combined using Linear expansion. This results in 3 possible combination. Unused Instances are displayed in bold.

Generate specific Instances

Propagate Instances

You can propagate Instances in a TestSheet in order to add specific Instance combinations to your TestSheet without having to select a combinatorial method. This allows you to choose a specific combination you will want in your TestCases.

To propagate Instances, follow the steps below:

  1. Select one or more Instances you want to propagate. This can be either Instances that have already been used or unused Instances.

  2. While holding down the Ctrl key, select one or more top level Instances that you want to propagate your Instance(s) with.

  3. Right-click the top level Instance and select Propagate Instance(s) from the context menu.

Tricentis Tosca creates a new Instance combination.

In the example below, the Instances <18 and Female are propagated with the top level Instance Suburb.

Propogate Instances

Show Instance usage

The Instance Usage column shows you how often an Instance has been used. This column is hidden by default, but can be added by using the Column Chooser. Objects that contain Instances, such as Attributes, show the cumulative Instance usage in percent at the object level.

Show Instance Usage

Filter Instances

You can filter Instances at the TestSheet or Attribute level using the Filter column. You can add this column via the Column Chooser.

Filter out Female Instances

For a quick overview of the values that have been filtered out, hover your mouse over the TestSheet. A tooltip will appear to indicate which Instances have been filtered out.

Filtered values tooltip

To remove your filter, right-click on the TestSheet and select Reset Instances Filter from the context menu.

Delete generated Instances

When you generate Instances, Tosca automatically creates an Instances collection directly below the relevant TestSheet. To remove the generated Instances, simply delete this Instances collection. You can now generate new Instances using a different combinatorial method if you wish.

Delete generated Instances