Main Content

Test Case Type Distribution

Metric ID

TestCaseTypeDistribution

Description

This metric returns a distribution of the types of test cases that run on the unit. A test case is either a baseline, equivalence, or simulation test. For more information on test case types, see TestType (Simulink Test).

Use this metric to determine if there is a disproportionate number of test cases of one type.

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 includes only test cases in the project that test the model or subsystems in the unit for which you collect metric data.

Collection

To collect data for this metric:

  • In the Model Testing Dashboard, view the Tests by Type widget.

  • Programmatically, use getMetrics with the metric ID TestCaseTypeDistribution.

Collecting data for this metric loads the model file and requires a Simulink® Test™ license.

Results

For this metric, instances of metric.Result return Value as a structure with these fields:

  • BinCounts — A numeric vector indicating the number of test cases for each test case type:

    • BinCounts(1) — Number of simulation tests.

    • BinCounts(2) — Number of equivalence tests.

    • BinCounts(3) — Number of baseline tests.

  • BinEdges — A cell array of descriptive labels for each test case type:

    • 'Simulation' — Simulation test.

    • 'Equivalence' — Equivalence test.

    • 'Baseline' — Baseline test.

Compliance Thresholds

This metric does not have predefined thresholds. Consequently, the compliance threshold overlay icon appears when you click Uncategorized in the Overlays section of the toolstrip.

See Also

Objects

Functions

Topics