Class: matlab.unittest.TestSuite
Package: matlab.unittest
Reorder test suite based on shared fixtures
sortedSuite = sortByFixtures(suite)
[sortedSuite,I] = sortByFixtures(suite)
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
.
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.