Return errors that occurred during artifact tracing
returns the errors that occurred when the metric engine analyzed the artifacts. When you
collect metric results by using the
errors = getArtifactErrors(
execute function, the engine object
does not collect results for artifacts that return errors during analysis.
Note that there is also a function
getArtifactErrors (Fixed-Point Designer) in the Fixed-Point Designer™ documentation.
Check for Artifact Errors After Collecting Metric Results
Collect metrics for the testing artifacts in a project. Then, check if artifacts returned errors and were not analyzed.
Open the project. For this example, in the MATLAB® Command Window, enter:
metric.Engine object for the project.
metric_engine = metric.Engine();
Update the trace information for
ensure that the artifact information is up to
Collect results for the metric
'RequirementsPerTestCase' by using
execute function on the
Access the errors that occurred during analysis.
ans = 0×0 empty struct array with fields: Address UUID ErrorId ErrorMessage
For this example, the artifacts did not return errors.
metricEngine — Metric engine object
Metric engine object that you want to check for errors, specified as a
errors — Artifact errors
Artifact errors that occurred when you executed the
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
To view artifact issues for a Model Design or Model Testing dashboard, click Artifact Issues in the dashboard toolstrip. The Artifact Issues tab shows a table of the artifact issues in the current project. You can click on the hyperlinks in the Source column to open the affected artifact. You can also sort the artifact issues by type by clicking the Message ID column header. For more information, see View Artifact Issues in Project.
Artifacts that generate errors appear in the Errors folder in the dashboard user interface. For more information, see Artifact Errors.
Introduced in R2020b