Main Content

matlab.unittest.measurement.MeasurementResult Class

Namespace: matlab.unittest.measurement

Base class for classes holding measurement results

Description

The MeasurementResult class is the base class for classes that hold the results from running a measurement experiment on test suites. These classes contains the measurement values, categories, and timestamps, and information about the functional test results.

When you run an experiment, the testing framework returns an object of a concrete class that is derived from the MeasurementResult class. One object for each Test object in the suite.

Properties

expand all

Name of the test suite element that corresponds to the measurement result, returned as a character vector.

Indicator if the measurement is valid, returned as logical 0 or 1. A measurement is valid (logical 1) if it is collected from a passing test. Otherwise it is invalid (logical 0).

Information about sample measurements, returned as a table containing these columns:

Column NameDescription
NameName of the test suite element.
MeasuredValueValue of the measurement. Experiments can give this column a more specific name, such as MeasuredTime.
TimestampTime of measurement.
HostMachine name.
PlatformPlatform architecture.
VersionMATLAB Version.
RunIdentifierUnique identifier of measurement run.

The Samples table does not include information from warm-up runs.

Information about all test activity, including the warm-up measurements, returned as a table. This table is useful when you want all the data, such as during debugging or when performing a more involved data analysis. The TestActivity table contains these columns in addition to the columns described for Samples:

Column NameDescription
PassedLogical value indicating if the test passed
FailedLogical value indicating if the test failed
IncompleteLogical value indicating if test run is incomplete
ObjectiveCategorical value indicating the type of measurement: sample or warmup
TestResultTestResult object from the functional test

Methods

sampleSummaryCreate table of summary statistics from MeasurementResult array
samplefunApply function across samples of MeasurementResult array

Version History

Introduced in R2016a

expand all