Main Content


Class: sltest.testmanager.TestCase
Namespace: sltest.testmanager

Get test case property


val = getProperty(tc,propertyName)
val = getProperty(___,simulationIndex)


val = getProperty(tc,propertyName) gets a test case property.

val = getProperty(___,simulationIndex) gets a test case property. If the test case is an equivalence test case, then specify the simulation index.

Input Arguments

expand all

Test case to get test setting property from, specified as an sltest.testmanager.TestCase object.

Test case property names, specified as one of these options, as a string or character vector. Set these properties by using the setProperty method. The available properties are:

  • "Model" — Name of the model to be tested

  • "SimulationMode" — Simulation mode of the model during the test

  • "OverrideSILPILMode" — Override SIL or PIL simulation mode of block to Normal mode

  • "HarnessName" — Harness name used for the test

  • "HarnessOwner" — Harness owner name

  • "ComponentUnderTestName" — Name of Model block to test

  • "OverrideStartTime" — Override start time

  • "StartTime" — Start time override value of simulation

  • "OverrideStopTime" — Override stop time

  • "StopTime" — Stop time override value of simulation

  • "StopSimAtLastTimePoint" — Stop the simulation at end of input data instead of model Stop Time

  • "OverrideInitialState" — Override initial state

  • "InitialState" — String or character vector evaluated to specify the initial state of the system under test

  • "PreloadCallback" — String or character vector evaluated before the model loads and before model callbacks

  • "PostloadCallback" — String or character vector evaluated after the system under test loads and PostLoadFcn callback completes

  • "PreStartRealTimeApplicationCallback" — String or character vector evaluated before the real-time application is started on target computer

  • "CleanupCallback" — String or character vector evaluated after simulation completes and model callbacks execute

  • "UseSignalEditorScenarios" — Use signal editor scenarios for test input

  • "SignalEditorScenario" — Signal editor scenario name to use

  • "IsTestDataReferenced" — Create test case using test data from an external file, such as an Excel® or MAT file

  • "TestDataPath" — Character vector path to the external file being referenced for creating the test case

  • "Adapter" — Function handle of adapter function to convert test data

  • "SDIViewFile" — Path to a Simulation Data Inspector view file

  • "OverrideModelOutputSettings" — Override model output settings

  • "SaveOutput" — Save simulation output

  • "SaveState" — Save model states during simulation

  • "SaveFinalState" — Save final state of simulation

  • "SignalLogging" — Log signals

  • "DSMLogging" — Log data store

  • "ConfigsetOverrideSetting" — Value to determine override of configuration set

  • "ConfigsetName" — Configuration set override name

  • "ConfigsetFileLocation" — Path to a MAT-file that contains a configuration set object

  • "ConfigsetVarName" — Name of the variable in ConfigsetFileLocation that is a configuration set

  • "IterationScript" — Character vector evaluated for test case iteration script

  • "SimulationIndex" — Determines which simulation a property applies to, applicable to the equivalence test case type

  • "FastRestart" — Indicates if test iterations run using fast restart mode

  • "SaveBaselineRunInTestResult" — Enable saving the baseline run used in the test case, saved in the test result

  • "LoadAppFrom" — Location to load real-time application from

  • "TargetComputer" — Target computer name

  • "TargetApplication" — Target application name

  • "VariantConfiguration" — Name of the variant configuration applied to the model before simulation (since R2024a)

  • "RoadRunnerInstallationFolder" — Installation folder of the RoadRunner application

  • "RoadRunnerProjectFolder" — Project folder of the RoadRunner project

  • "RoadRunnerScenarioPath" — Path to RoadRunner scenario file

  • "RoadRunnerRunInConsoleMode" — Option to run RoadRunner in console mode or graphical mode

  • "RoadRunnerTurnOffPacing" — Option to run RoadRunner scenario with pacing on or off

  • "StopOnFailure" — Option to stop the execution of the RoadRunner test case when a test iteration fails

  • "OverrideRoadRunnerDefaultSettings" — Override the RoadRunner default file and path settings in the Test Manager

Simulation number that the property applies to, specified as an integer, 1 or 2. This setting applies to the simulation test case where there are two simulations. For baseline and simulation test cases, the simulation index is 1.

Output Arguments

expand all

The content of the test case property, returned as a character vector, logical, or scalar value.


expand all

% Open the model for this example

% Create the test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('API Test File');
ts = createTestSuite(tf,'API Test Suite');
tc = createTestCase(ts,'baseline','Baseline API Test Case');

% Assign the system under test to the test case

% Get and check the system under test model

Version History

Introduced in R2015b

expand all