Access test case results data
sltest.testmanager.TestCaseResult enables you to access results
from executing test cases or test files.
sltest.testmanager.TestCaseResult class is a
For information on class attributes, see Class Attributes.
tcr = getTestCaseResults(
tcr a test case result from a
Duration — Length of time the test case ran, in seconds
Length of time the test case ran, in seconds, returned as a duration.
NumDisabledIterations — Number of disabled tests
The number of disabled tests in an individual test case result, returned as an integer.
NumFailedIterations — Number of failed tests
The number of failed tests in an individual test case result, returned as an integer.
NumIncompleteIterations — Number of incomplete tests
The number of incomplete tests in an individual test case result, returned as an integer.
NumPassedIterations — Number of passed tests
The number of passed tests in an individual test case result, returned as an integer.
NumTotalIterations — Total number of tests
The total number of tests in an individual test case result, returned as an integer.
Outcome — Outcome of test case result
0 | 1 | 2 | 3
The outcome of an individual test case result. The integer
0 means the test case was disabled,
1 means the test case execution was incomplete,
2 means the test case passed, and
3 means the test case failed.
Parent — Parent of the result object
Parent of the result. The parent of a test case result is a test suite result or result set object.
Release — Release in which the test was run
Release in which the test was run, returned as a character vector.
RunOnTarget — Target indicator
Indicates if the simulation runs on a target, returned as a cell array of Booleans.
StartTime — Time the test case began to run
Time the test case began to run, returned as a datetime.
StopTime — Time the test case completed
Time the test case completed, returned as a datetime.
Tags — Tags to filter test file results
Tags to filter the test file results. Use tags to view a subset of the test results. See Tags for more information.
TestCasePath — Result hierarchy path
The hierarchy path in the parent result set.
TestCaseType — Type of test case
The type of test case from the three available test cases in the Test Manager: simulation, baseline, and equivalence.
TestFilePath — Test file path
The path of the test file used to create the test case result.
TestSequenceScenario — Test sequence scenario
Test sequence scenario used in the test case, returned as a struct. The
struct contains two fields,
TestSequenceBlock field is the path of the Test
Sequence block that contains the scenario. The
TestSequenceScenario is the name of the scenario that
ran during the test. The test sequence information is returned in the
TestCaseResult object only if the test case did not
include iterations. If iterations were included, the
TestSequenceScenario is returned in a
ErrorMessages — Error messages
array of strings
Error messages produced by the test case, returned as an array of strings.
LogMessages — Log messages
array of strings
Log messages produced by the test case, returned as an array of strings.
UserData — Custom data stored with test case results
any data type
Custom data stored with the test case results, specified as any type of data. Use this field to add custom information, such as the settings used to obtain the results.
|Get test case baseline dataset|
|Get test case that produced result|
|Get test data comparison result|
|Get test case signal comparison results|
|Get coverage results|
|Get plots from test case custom criteria|
|Get custom criteria results from test case result|
|Get iteration results|
|Get inputs from simulations captured with the test result|
|Get test case simulation output results|
|Get plots from test case callbacks|
|Get test case verify statement|
Get Test Case Result From Results Set
% Run test file in Test Manager and output results set resultset = sltest.testmanager.run; % Get test file result object tfr = getTestFileResults(resultset); % Get test suite result object tsr = getTestSuiteResults(tfr); % Get test case result object tcr = getTestCaseResults(tsr);