Version 6.2.2 or higher
Determine number of child elements
In objectiF RPM you can “count” the number of elements of a particular stereotype that are assigned to an activity or test set execution.
When you create the property 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. And if you create the property for activities, the number of subordinate activities 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.
Define calculation
The first step is to create a property for the stereotype (which contains the elements to be counted).
- In a project, open the window Stereotypes.
- Go to the stereotype Package and choose Properties from the 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.
Activate calculation
The calculation does not apply to all elements of the stereotype. It must be specifically activated for the desired package, test set execution or activity. 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.
The previously created property is now offered to you for all packages, which you must now activate for the corresponding packages.
- In the Further Properties tab, click on the blue Activate/ Deactivate Calculated Properties button on the right.
The check mark signifies that the calculation is activated.
- 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.
There are 7 elements in the Business Epics package that correspond to the configuration.