Requirements Execution Coverage Breakdown
Metric ID
RequirementsExecutionCoverageBreakdown
Description
This metric returns the fraction of overall achieved execution coverage that comes from requirements-based tests.
Supported Artifacts
This metric collects metric results for Units in the project. To control what the dashboard classifies as a unit, see Categorize Models in Hierarchy as Components or Units.
Computation Details
The metric:
Analyzes the overall aggregated coverage results.
Does not analyze coverage from tests that run in software-in-the-loop (SIL) or processor-in-the-loop (PIL) mode.
Collection
To collect data for this metric:
In the Model Testing Dashboard, in the Achieved Coverage Ratio section, point to the widget for Requirements-Based Tests, point to the three dots, and click the run button.
Use
getMetricswith the metric IDRequirementsExecutionCoverageBreakdown.
Collecting data for this metric loads the model file and test results files and requires a Simulink® Coverage™ license.
Results
For this metric, instances of metric.Result return the
Value as a structure that contains these fields:
Numerator— The number of requirements-based tests that contribute to the overall achieved execution coverage.Denominator— The total number of tests (requirements-based and non-requirements-based) that contribute to the overall achieved execution coverage.Value— The ratio of requirements-based tests to all tests that contribute to execution coverage, calculated by dividing theNumeratorby theDenominator.
Compliance Thresholds
The default compliance thresholds for this metric are:
Compliant—100%of the overall achieved execution coverage comes from requirements-based testsNon-Compliant— Less than100%of the overall achieved execution coverage comes from requirements-based testsWarning— None