Main Content


Return errors that occurred during artifact tracing



errors = getArtifactErrors(metricEngine) returns the errors that occurred when the metric engine analyzed the testing artifacts. When you collect metric results by using the execute function, the engine object does not collect results for artifacts that return errors during analysis.


collapse all

Collect metrics for the testing artifacts in a project. Then, check if artifacts returned errors and were not analyzed.

Open the project. At the command line, 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.


Collect results for the metric Requirements per test case by using the execute function on the metric.Engine object.


Access the errors that occurred during analysis.

ans = 

  0×0 empty struct array with fields:


For this example, the artifacts did not return errors.

Input Arguments

collapse all

Metric engine object that you want to check for errors, specified as a metric.Engine object.

Output Arguments

collapse all

Artifact errors that occurred when you executed the metric.Engine object, returned as an array of structures that correspond to the errors. The structure for an error contains these fields:

  • Address — Address of the artifact that returned the error

  • UUID — Unique identifier of the artifact

  • ErrorID — Identifier of the error

  • ErrorMessage — Description of the error

Introduced in R2020b