This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

getProperty

Class: sltest.testmanager.TestCase
Package: sltest.testmanager

Get test case property

Syntax

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

Description

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 suite property names, specified as a character vector. The properties are set using thesltest.testmanager.TestCase.setProperty method. The available properties are:

  • 'Model' — name of the model to be tested

  • 'SimulationMode' — simulation mode of the model during the test

  • 'HarnessName' — harness name used for the test

  • 'HarnessOwner' — harness owner name

  • 'OverrideStartTime' — override start time

  • 'StartTime' — start time override value of simulation

  • 'OverrideStopTime' — override stop time

  • 'StopTime' — stop time override value of simulation

  • 'OverrideInitialState' — override initial state

  • 'InitialState' — character vector evaluated to specify the initial state of the system under test

  • 'PreloadCallback' — character vector evaluated before the model loads and before model callbacks

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

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

  • 'CleanupCallback' — character vector evaluated after simulation completes and model callbacks execute

  • 'UseSignalBuilderGroups' — use signal builder groups for test input

  • 'SignalBuilderGroup' — signal builder group name to use

  • '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

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.

Examples

expand all

% 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
setProperty(tc,'Model','sldemo_absbrake');

% Get and check the system under test model
getProperty(tc,'Model');

Introduced in R2015b