Contenido principal

Functional Requirements With Tests

R2026b
Since R2026b

Metric ID

modeltesting.TestAnalysisOverview[project.FunctionalRequirementWithTests]

Description

This metric returns the number of functional requirements in the project that are linked to at least one test, the number that are not linked to any test, and the total number of functional requirements.

Use this metric to assess the percentage of functional requirements that have test coverage.

Supported Artifacts

This metric collects results at the project level.

Collection

To collect data for this metric, execute the metric engine with the metric ID.

metric_engine = metric.Engine;
results = execute(metric_engine,"modeltesting.TestAnalysisOverview[project.FunctionalRequirementWithTests]")

View the metric result values.

results.Value

To collect all metrics in the modeltesting.TestAnalysisOverview group at once, use the group name with empty brackets. Use the MetricID property to distinguish results from different metrics in the group.

results = execute(metric_engine,"modeltesting.TestAnalysisOverview[]")

Results

The metric returns a single metric.Result object for the project.

The Value property returns a structure with these fields:

  • Total — Total number of functional requirements in the project.

  • Linked — Number of functional requirements linked to at least one test.

  • Unlinked — Number of functional requirements not linked to any test.

See Also

Objects

Functions

Topics