Main Content

sltest.testmanager.TimingInfo Class

Namespace: sltest.testmanager

Test execution timing information object

Since R2024a

Description

Objects of the sltest.testmanager.TimingInfo class contain the durations of the test execution phases for test results. The phases, which are properties of the TimingInfo object, are:

The specific test execution phases returned in the TimingInfo object depend on whether you obtain timing information at the test file, test suite, test case, or test iteration hierarchy level. At the test file and test suite levels, only the Setup and Cleanup callbacks and Coverage TimingInfo object properties are available. At the test case and test iteration levels, all of the TimingInfo properties, except Setup and Cleanup callbacks, are available. If a phase is not included in a test, the property for that phase is omitted from the TimingInfo object. If a test fails, the TimingInfo object includes information up to the failure point.

To view the timing information for a test file result, test suite result, test case result, or test iteration result programmatically, use its getTimingInfo method.

Note

Multiple-release tests, real-time tests, RoadRunner tests, and tests that you run using Run with Stepper do not create TimingInfo objects.

Timing information is also not available for result sets.

Test result reports do not include timing information data.

The sltest.testmanager.TimingInfo class is a handle class.

Creation

You do not create sltest.testmanager.TimingInfo objects explicitly. Running a test creates the test result set object, which contains the TimingInfo from the test results.

Properties

expand all

Duration of the PreLoad callback phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the PostLoad callback phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the Setup callback phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the Cleanup callback phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the baseline criteria phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the equivalence criteria phase in seconds, returned as a scalar double. For equivalence tests, which have two simulations, the TimingInfo object contains one value for both simulations for each of these phases:

  • EquivalenceCriteria

  • Assessments

  • CustomCriteria

  • Coverage

For each equivalence test simulation, the TimingInfo object has a separate value for these phases:

  • PreLoad

  • PostLoad

  • Cleanup

  • SimulationInitialization

  • SimulationExecution

  • SimulationTermination

Attributes:

GetAccess
public
SetAccess
protected

Duration of the assessments phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the custom criteria phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the coverage phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the simulation initialization phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the simulation execution phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Duration of the simulation termination phase in seconds, returned as a scalar double.

Attributes:

GetAccess
public
SetAccess
protected

Examples

collapse all

Open the sltestParameterOverridesExample, load it into the Test Manager, and open the Test Manager.

openExample("sltestParameterOverridesExample")
sltest.testmanager.load('sltestParameterOverridesTest.mldatx');
sltest.testmanager.view

Select the Test Override test case and click Run.

After the test runs, go to the Results and Artifacts pane, expand Results, and select the Test Override test case.

In the Summary section, expand the Execution Timing Information.

Test timing information for callbacks and simulation

To view timing information at the command line, enter:

result_set = sltest.testmanager.run;

tfr = result_set.getTestFileResults;
tsr = tfr.getTestSuiteResults;
tcr = tsr.getTestCaseResults;
timing = tcr.getTimingInfo

Version History

Introduced in R2024a