Main Content


Return metric identifiers for available metrics



    availableMetricIds = getAvailableMetricIds(metricEngine) returns metric identifiers for the metrics available for the specified Metric.engine object.


    collapse all

    Collect metric data on the requirements-based testing artifacts in a project.

    Open the project that includes the models and testing files. At the command prompt, type dashboardCCProjectStart.


    Create a metric.Engine object for the project.

    metric_engine = metric.Engine();

    Update the trace information for metric_engine to reflect any pending artifact changes and ensure that all test results are tracked.


    Create a list of the available metric identifiers.

    metric_ids = getAvailableMetricIds(metric_engine);

    Collect results by executing the metric engine on the list of metric identifiers.


    Input Arguments

    collapse all

    Metric engine object for which you want to collect metric results, specified as a metric.Engine object.

    Output Arguments

    collapse all

    Metric identifiers for all available metrics, specified as a string or string array. For a list of metrics and their identifiers, see Model Testing Metrics.

    Example: "ConditionCoverageBreakdown"

    Example: ["ConditionCoverageBreakdown", "ConditionCoverageFragment", "DecisionCoverageBreakdown", "DecisionCoverageFragment", "ExecutionCoverageBreakdown", "ExecutionCoverageFragment", "MCDCCoverageBreakdown", "MCDCCoverageFragment", "RequirementWithTestCase", "RequirementWithTestCaseDistribution", "RequirementWithTestCasePercentage", "RequirementsPerTestCase", "RequirementsPerTestCaseDistribution", "TestCaseStatus", "TestCaseStatusDistribution", "TestCaseStatusPercentage", "TestCaseTag", "TestCaseTagDistribution", "TestCaseType", "TestCaseTypeDistribution", "TestCaseVerificationStatus", "TestCaseVerificationStatusDistribution", "TestCaseWithRequirement", "TestCaseWithRequirementDistribution", "TestCaseWithRequirementPercentage", "TestCasesPerRequirement", "TestCasesPerRequirementDistribution"]

    Introduced in R2021b