sortByFixtures
Class: matlab.unittest.TestSuite
Namespace: matlab.unittest
Reorder test suite based on shared fixtures
Syntax
sortedSuite = sortByFixtures(suite)
[sortedSuite,I] = sortByFixtures(suite)
Description
reorders the test suite to reduce shared fixture setup and teardown operations. Do not rely on
the order of elements in sortedSuite
= sortByFixtures(suite
)sortedSuite
as it might change in a future
release.
[
also returns a sort index sortedSuite
,I
] = sortByFixtures(suite
)I
that describes the arrangement of the
elements of suite
into sortedSuite
.
Input Arguments
Output Arguments
Examples
Tips
If you create a test suite using a single call to the testsuite
function instead of several calls to a method of matlab.unittest.TestSuite
, the suite is automatically sorted based on shared
fixtures. However, if you add, remove, or reorder elements after initial suite creation, call
the sortByFixtures
method to sort the suite.
Version History
Introduced in R2018b