Package: sltest.testmanager
Superclasses:
Create or modify test iteration
Iterations let you test a combination of model settings for testing methods such as Monte Carlo and parameter sweeping. Iterations initialize during test execution but before model callbacks and test callbacks. Once you create a test iteration object, you can override aspects of the test case for each iteration using the class methods.
You create your iteration script in the text window under the Iterations section of a test case. Iteration scripts cannot run in the MATLAB® command window.
The examples scripts in this reference page must be inserted into this section and other sections of the test case must be defined. For more information on iterations and scripted iterations, see Test Iterations.
returns
a test iteration object. The object is used to construct a single
iteration in a test case. Each iteration you want to create in the
test must use a single iteration object.iterationObj
= sltest.testmanager.TestIteration
You can also create a test iteration within a iteration script
using the sltestiteration
function.
If you use a for
loop in the MATLAB command window to add many iterations to a test case, then the MATLAB command window might become temporarily unusable. Instead, use
vectorization in the command window to add iterations to a test case. For
example:
iterations(100) = sltest.testmanager.TestIteration; addIteration(tc,iterations);
getIterationResults | Get test iteration results history |
setModelParam | Set model parameter for iteration |
setTestParam | Set test case parameter |
setVariable | Set model variable override |
If you do not want to use a script to create iterations, then you can use table iterations in the test case. For more information about table iterations, see Test Iterations.