Main Content


Class: sltest.testmanager.TestIteration
Namespace: sltest.testmanager

Get RoadRunner custom variable value

Since R2023b


varValue = getRoadRunnerCustomVariableValueByName(varName)


varValue = getRoadRunnerCustomVariableValueByName(varName) gets the value varValue of the specified RoadRunner custom variable varName. Use setRoadRunnerVariable to specify a custom variable to use in RoadRunner test cases or test iterations.

Input Arguments

expand all

Name of custom variable, specified as a string or character vector.

Output Arguments

expand all

Value of the specified custom variable, returned in the format determined by the custom RoadRunner variable..


expand all

This example shows how to get the value of a custom RoadRunner variable. First, create a test file, test suite, and RoadRunner test case. Then, create an iteration named speed50, add the iteration to the test case, and set the speed variable to 50. Finally, create another iteration named speed70, add the iteration to the test case, and set the speed variable to 70.

tf = sltest.testmanager.TestFile("myTestFile");
ts = sltest.testmanager.TestSuite(tf,"myTestSuite");
tc = sltest.testmanager.TestCase(ts,"simulation",...

ti = sltest.testmanager.TestIteration;
ans =

Version History

Introduced in R2023b