Main Content

matlab.unittest.plugins.diagnosticrecord.LoggedDiagnosticRecord Class

Namespace: matlab.unittest.plugins.diagnosticrecord
Superclasses: matlab.unittest.plugins.diagnosticrecord.DiagnosticRecord

Diagnostic information about logged events

Description

The LoggedDiagnosticRecord class defines the diagnostic information about logged events 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

Logged diagnostic result, returned as a cell array of character vectors. A single log call can result in multiple logged diagnostics.

Data Types: char

The time the log method was called, returned as a date and time.

Data Types: datetime

Verbosity level of the logged message, returned as a matlab.automation.Verbosity enumeration object.

Example: Terse

These properties are inherited from matlab.unittest.plugins.diagnosticrecord.DiagnosticRecord:

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

Inherited 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

Version History

Introduced in R2016a