Main Content


Class: sltest.testmanager.TestSuiteResult
Namespace: sltest.testmanager

Timing execution information for test suite results

Since R2024a


timing = getTimingInfo(tsr)
timing = getTimingInfo(tsr,phase)


timing = getTimingInfo(tsr) returns the timing durations for the Setup and Cleanup callbacks and Coverage execution phases in the test suite result. If a phase does not exist for the file, timing for that phase is not returned.

timing = getTimingInfo(tsr,phase) returns the duration of the specified execution phase or phases in the test suite result. To obtain timing durations for more than one phase, enter a comma-separated list. If a phase does not exist for the file, timing for that phase is not returned.


Multiple-release tests, real-time tests, and RoadRunner tests do not create TimingInfo objects.

Input Arguments

expand all

Test suite result, specified as a sltest.testmanager.TestSuiteResult object.

Example: getTimingInfo(tsr)

Test execution phase, specified as a property of the sltest.testmanager.TimingInfo class. Timing at the test suite level is available only for Setup and Cleanup callbacks and Coverage test execution phases.

Example: getTimingInfo(tsr,"Setup")

Output Arguments

expand all

Duration of all or the specified test suite execution phases, returned as an sltest.testmanager.TimingInfo object. The object contains the timing information for a test suite result.


expand all

Open the mSldvdemoCruiseControl model, clear existing test files and results from the Test Manager, and then open the MergeCoverage.mldatx test file. Run the test and get the test file and test suite results. Get the timing information for the first test suite.

You must have Simulink® Coverage™ installed to run this example.



result_set =;

tfr = getTestFileResults(result_set);
tsr = getTestSuiteResults(tfr);
timing = getTimingInfo(tsr);
suitetiming = timing(1)
suitetiming = 

  TimingInfo with properties:

    Coverage: 0.0260

Version History

Introduced in R2024a