Main Content

matlab.unittest.plugins.diagnosticrecord.DiagnosticRecord class

Package: matlab.unittest.plugins.diagnosticrecord

Diagnostic information

Description

The DiagnosticRecord class defines the diagnostic information that the DiagnosticsRecordingPlugin includes on the TestResult. The DiagnosticsRecordingPlugin creates this class, so there is no need for test authors to construct the class directly.

Properties

expand all

Name of recorded event, returned as a character vector. This property corresponds to the event on the TestCase instance.

Example: 'VerificationPassed'

Example: 'ExceptionThrown'

Example: 'DiagnosticLogged'

Data Types: char

Location of event, returned as a character vector. This property corresponds to the label of the test content.

Example: 'myTestClass'

Example: 'myTestClass/testMethod1'

Example: 'myTestClass[classSetupParam=value1]/testMethod1'

Example: 'mySharedTestFixture'

Data Types: char

Scope where event originated, returned as an instance of matlab.unittest.Scope. This property corresponds to the label of the test content.

Example: matlab.unittest.Scope.TestMethod

Example: matlab.unittest.Scope.TestClass

Example: matlab.unittest.Scope.SharedTestFixture

Stack trace to the location of the diagnostic event, returned as a structure containing the fields file, name, and line.

Data Types: struct

All diagnostic information, returned as a character vector. The report provides an overall summary of the event.

Data Types: char

Methods

selectFailedReturn diagnostic records for failed events
selectIncompleteReturn diagnostic records for incomplete events
selectLoggedReturn diagnostic records for logged events
selectPassedReturn diagnostic records for passed events
Introduced in R2016a