Main Content

Requirements in Project

Since R2025a

Metric ID

project.mt.Requirements

Description

You can use this metric to count the number of functional requirements in the project, including both implemented and unimplemented functional requirements.

The Project Model Testing dashboard uses the results from this metric in the Requirements Traceability section of the dashboard, in the Requirements in Project widget.

Requirements Traceability section showing the percentage of tests with requirements, percentage of requirements with tests, the number of requirements in components, and the number of requirements in the project

Supported Artifacts

You can collect this metric for the Units in your project. To control what the dashboard classifies as a unit, see Categorize Models in Hierarchy as Components or Units.

Computation Details

The metric:

  • Queries the digital thread for the project to identify requirements where the Type is set to Functional.

  • Counts both implemented and unimplemented requirements. Implemented requirements are functional requirements implemented in components in the project. If you only want to see the number of implemented functional requirements, see the metric project.mt.ComponentRequirements instead.

Collection

To collect data for this metric, execute the metric engine and use getMetrics with the metric ID project.mt.Requirements.

metric_engine = metric.Engine;
execute(metric_engine,"project.mt.Requirements");
results = getMetrics(metric_engine,"project.mt.Requirements")

Collecting data for this metric loads the model file and requires a Requirements Toolbox™ license.

Results

For this metric, the function getMetrics returns a metric.Result instance. Instances of metric.Result include these properties.

PropertyDescriptionData TypeExample Value
ValueNumber of functional requirements in the projectstruct
  struct with fields:

    Count: 77
ArtifactsInformation about the functional requirementsstruct array
  1×77 struct array with fields:

    UUID
    Name
    ParentUUID
    ParentName

Compliance Thresholds

This metric does not have predefined thresholds.

See Also

| | | |

Topics