Main Content

SIL Test Status Distribution

Since R2023a

Metric ID

slcomp.sil.TestStatusDistribution

Description

This metric returns a distribution of the statuses of the software-in-the-loop (SIL) test results. A SIL test can have a status of either:

  • Passed

  • Failed

  • Disabled

  • Untested

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:

  • Includes only tests in the project that test the model or subsystems in the unit for which you collect metric data.

  • Shows tests as untested if the test only ran in normal mode or processor-in-the-loop (PIL) mode.

Collection

To collect data for this metric, use getMetrics with the metric ID slcomp.sil.TestStatusDistribution.

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

Results

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

  • BinCounts — The number of tests in each bin, returned as a vector.

  • BinEdges — The outputs of the test status metric, returned as a vector. The outputs represent the test result statuses:

    • 0 — The test failed.

    • 1 — The test passed.

    • 2 — The test is disabled.

    • 3 — The test is untested.

  • OverallCount — The total number of tests. The metric calculates OverallCount as the sum of the integers in BinCounts.

  • Ratios — The ratio of a test result status to the total number of tests, returned as a vector that contains these elements:

    • Ratios(1) — Percentage of tests that failed.

    • Ratios(2) — Percentage of tests that passed.

    • Ratios(3) — Percentage of tests that are disabled.

    • Ratios(4) — Percentage of tests that are untested.

    The percentages are in decimal form. For example, if 10% of unit tests passed and the remaining unit tests are untested, Ratios returns a vector with the percentages in decimal form: [0; 0.1000; 0; 0.9000].

Compliance Thresholds

The default compliance thresholds for this metric are:

  • Compliant — Each of the tests passed

  • Non-Compliant1 or more tests are untested, disabled, or have failed

  • Warning — None

See Also

|

Related Topics