matlab.unittest.diagnostics - Summary of classes in MATLAB diagnostics interface - MATLAB (original) (raw)

Main Content

Summary of classes in MATLAB diagnostics interface

Description

Use diagnostics to convey important information from tests. To associate a diagnostic message with a test, specify the diagnostic as an input to a matlab.unittest.qualifications qualification method. In addition to the diagnostics that you specify, the testing framework provides specific diagnostic information about the qualification. By default, diagnostics appear only when a qualification fails. To display diagnostics for both passing and failing qualifications, you can add a DiagnosticsOutputPlugin instance to the test runner.

Classes

The matlab.unittest.diagnostics namespace consists of the following classes.

matlab.unittest.diagnostics.ConstraintDiagnostic Diagnostic with fields common to constraints
matlab.unittest.diagnostics.FigureDiagnostic Diagnostic to save specified figure
matlab.unittest.diagnostics.FrameworkDiagnostic Diagnostic provided by testing framework
matlab.unittest.diagnostics.LoggedDiagnosticEventData Event data for DiagnosticLogged event listeners
matlab.unittest.diagnostics.ScreenshotDiagnostic Diagnostic to capture screen as image file

Version History

Introduced in R2013a

expand all

To reflect support for additional automated workflows, a group ofmatlab.unittest.diagnostics classes have been renamed. For example,matlab.unittest.diagnostics.Diagnostic is now namedmatlab.automation.diagnostics.Diagnostic.

This table shows the affected classes and their new names. The behavior of these classes remains the same, and existing instances of these classes in your code continue to work as expected. There are no plans to remove support for existing instances of these classes.

R2022b and Earlier Starting in R2023a
matlab.unittest.diagnostics.Diagnostic matlab.automation.diagnostics.Diagnostic
matlab.unittest.diagnostics.DiagnosticResult matlab.automation.diagnostics.DiagnosticResult
matlab.unittest.diagnostics.DisplayDiagnostic matlab.automation.diagnostics.DisplayDiagnostic
matlab.unittest.diagnostics.FileArtifact matlab.automation.diagnostics.FileArtifact
matlab.unittest.diagnostics.FunctionHandleDiagnostic matlab.automation.diagnostics.FunctionHandleDiagnostic
matlab.unittest.diagnostics.StringDiagnostic matlab.automation.diagnostics.StringDiagnostic

See Also

Classes

Namespaces

Topics