Work with Attributes

Attributes are the various characteristics of your application, or representations of your business objects. You can use Attributes to map business objects that are necessary for your TestCases.

Attributes are used in both TestSheets and TestCase-Design Classes, and can contain further sub-Attributes or Instances.

The example below includes the following Attributes: Vehicle Data, Insurant Data, Product Data, and Price per Year:

Example TestSheet with Attributes

Create an Attribute

You can create attributes within a TestSheet to help structure your TestCases appropriately. To create an Attribute, follow the steps below:

  1. Right-click the object for which you want to create an Attribute.

  2. Select Create Attribute from the mini toolbar.

  3. Rename the Attribute as desired. Attributes must have unique names.

You cannot use the special characters . (dot), -> (right arrow) and <- (left arrow) to name TestCase-Design Attributes. These characters will be automatically removed.

You can use the keyboard shortcuts Ctrl + X or Ctrl + C in order to cut or copy Attributes and insert them at another position.

Toggle Business Relevance

The color of the Attribute icon denotes the business relevance of the Attribute. You can change the business relevance by using the Toggle Business Relevance button in the ribbon menu, or with the shortcut Ctrl + F7. All sub-Attributes will adopt the business relevance of the parent Attribute.

You can set the following levels of business relevance:

Icon

Property value in Properties pane

Description

BusinessRelevant = Yes

The Attribute and its sub-Attributes are business relevant, and will affect the TestCase. This is the default value.

BusinessRelevant = No

The Attribute and its sub-Attributes are not business relevant, and therefore not relevant to the TestCase.

BusinessRelevant = Result

The Attribute and its sub-Attributes are used for verification in the TestCases.

Create binary Attributes

You can create binary Attributes at the Instances Collection level to ease your workflow. This creates binary Attributes for each Instance within the Instances Collection.

To create a binary Attribute, follow the steps below:

  1. Right-click the Instances Collection within the Attribute whose instances you want to create binary Attributes for.

  2. Select Create Binary Attributes from the mini toolbar.

Create binary Attribute

  1. In the subsequent dialog boxes you can specify the binary values you wish to have. By default, these values are true and false, but you can change them as required.

Tricentis Tosca creates a new Attribute for each Instance on the Instances Collection level with the corresponding binary values. In the example below, the two Instances Used and Hybrid have been converted to binary Attributes with the binary values true and false.

Binary Attributes

Create Attributes from a TestSheet

If you want to use the data from one TestSheet in a new TestSheet, you can drag and drop the original TestSheet onto the new TestSheet. The original TestSheet and its child elements will then become Attributes of the new TestSheet.

TestSheet 2 as Attribute of TestSheet 1

As shown above, TestSheet 2 and its child element become Attributes of TestSheet 1. However, TestSheet 2 also continues to exist in its original form.