A metric is information about a specific aspect of the model. A collection of various metrics can be used to evaluate the current state of your model. When calculated at regular intervals, they can help track the evolution of the model's development.
There are two metric suites dedicated to coverage analysis:
- The Design metric suite checks incoming satisfy relations.
- The Test cases metric suite checks incoming verify relations.
Example of metrics table.
When working with requirements, it is useful to know what and how many requirements are covered by design elements (satisfy relations), by test cases (verify relations), are user requirements covered with system requirements, and how many requirements are already implemented or tested. In these situations metrics help you evaluate the current state of requirements in your model and track the progress of their coverage.
The metric suite Requirement Coverage (Treat Owner as Grouping Element) is considered as covered if it satisfies one of the following conditions:
- A requirement has a satisfy relation with a design element.
- The owning requirement is covered.
- All owned requirements are covered.
The metric suite Requirement Coverage (Treat Owner as Regular Requirement) is considered as covered if the requirement has a satisfy relation with a design element:
- If all child requirements have incoming satisfy relations, grouping requirements are not considered as satisfied unless they also have incoming satisfy relations.
- If the grouping requirement has incoming satisfy relation, its child requirements are not considered as covered unless they have incoming satisfy relations.
Examples of covered requirements.
To use coverage analysis metrics
- Select the package that includes the requirements.
- From the shortcut menu, select Tools > Metrics > New Metric Table.
- In the Create Metric Table dialog, set to true one of the metric suite:
- Requirement Coverage (Treat Owner as Grouping Element).
- Requirement Coverage (Treat Owner as Regular Requirement).
- Click OK.
The new metric table with calculated results is created.
You can create custom metric suites using structured expressions or scripts. For detailed procedures on creating metric suites, calculating metrics, and managing metric results, please see Creating Metric Suites and Metric table.
Related pages