Version 7.2.2 or higher
Determine number of child elements
In objectiF RM,you can calculate the number of elements of a particular stereotype that are assigned to a package or test set execution.
When you create properties for packages, you can calculate the number of all contained elements, such as requirements, test cases, actors, etc. If the property is created for test set executions, the number of assigned tests and derived bugs is calculated.
In the following example, the number of requirements that are in a package is to be calculated and output as a number in a property.
The first step is to create a property for the stereotype (which contains the elements to be counted).
- In a project, open the Stereotypes window.
- Go to the Package stereotype and select Properties in its context menu.
- Switch to the Property Types tab and click on the Plus button.
- Enter a name in the Name column.
- In the Type column, select Calculated (Numeric) from the drop-down menu.
- Click on the […] button in the Default Value column.
- In the subsequent dialog, enter the desired stereotypes, states and properties. Use the Plus button to do so.
- Confirm with OK.
- Save with OK.
The calculation does not apply to all elements of the stereotype. It must be specifically activated for the desired package or test set execution. For common stereotypes, open the properties dialog box by choosing Edit. If you want to count child elements of a test set execution, go to the desired test set execution and open the Edit Artifact dialog from the context menu by clicking CTRL and Edit simultaneously.
- Go to the package and select Edit from the context menu.
- In the Further Properties tab, click on the blue Activate/ Deactivate Calculated Properties button on the right.
- Confirm with OK.
Display the Number of Elements
The number of elements is stored in the custom property.
- From the context menu of the package or activity, choose the Edit command.
- Switch to the Further Properties tab.
If elements are included that correspond to the configuration, the number is displayed here.