getProperty
Class: sltest.testmanager.TestCase
Package: sltest.testmanager
Get test case property
Syntax
val = getProperty(tc,propertyName)
val = getProperty(___,simulationIndex)
Description
gets
a test case property.val
= getProperty(tc
,propertyName
)
gets
a test case property. If the test case is an equivalence test case,
then specify the simulation index.val
= getProperty(___,simulationIndex
)
Input Arguments
tc
— Test case
sltest.testmanager.TestCase
object
Test case to get test setting property from, specified as an sltest.testmanager.TestCase
object.
propertyName
— Test case property
"Model"
| "SimulationMode"
| ...
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"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 andPostLoadFcn
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 inConfigsetFileLocation
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
simulationIndex
— Test case simulation number
1 | 2
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
val
— Property content
character vector | logical | scalar
The content of the test case property, returned as a character vector, logical, or scalar value.
Examples
Get Test Case Property
% Open the model for this example openExample('sldemo_absbrake'); % 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");
Version History
Introduced in R2015bR2023a: New property for Model block name
Use the ComponentUnderTestName
property to specify the Model
block to test. The Model block can be at any level
of the model or test harness hierarchy.
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)