Use Class references

After you have created a TestCase-Design Class, you can create Class references to make use of the classes you have created.

When you drag and drop a Class onto a TestSheet, Tricentis Tosca creates a Class reference that allows you to use the Class Attributes and Instances in your TestSheet.

If you modify an Attribute or Instance in the Class, Tricentis Tosca automatically updates all Class references. Conversely, if you make any modifications to a Class reference, the system automatically changes the corresponding Class.

Create a Class reference

Use an existing Class to create a Class reference.

To create a Class reference, follow the steps below:

  1. Select the TestCase-Design Class you want to use as a reference. You can select more than one Class by holding the Ctrl key.

  2. Drag and drop the Class(es) onto the target object. The target object can be another Class, a TestSheet or an Attribute.

Tosca Commander will then create the Class reference(s). Class references are denoted with the icon.

Vehicle Data class dragged and dropped onto the Insurance TestSheet

Resolve a Class reference

You can resolve Class references, for instance if you want to modify a single Attribute without also modifying the entire class. To do so, follow the steps below:

  1. Right-click the TestCase-Design Class reference you want to remove.

  2. Select Resolve Class Reference from the context menu.

Tricentis Tosca removes the Class reference, and the icon reverts to an Attribute icon:

Deactivate Class reference Attributes

You can use TestCase-Design Classes as Class references in multiple TestSheets. However, the relevance of the referenced Attributes may vary across TestSheets.

You can disable irrelevant Class reference Attributes. To do so, follow the steps below:

  1. Add the Relevance column to the Details view by using the Column Chooser.

  2. Select the Class reference within which you want to activate or deactivate Attributes.

  3. In the row of respective Attribute(s), enable or disable the Relevance checkbox.

Deactivated Attributes are grayed out, and can either be shown or hidden by using the F11 key.

Deactivated Class reference Attribute [kW]