setTestParam
Class: sltest.testmanager.TestIteration
Namespace: sltest.testmanager
Set test case iteration parameter
Syntax
setTestParam(obj,parameter,parameterValue)
setTestParam(obj,parameter,parameterValue,'SimulationIndex',indexValue)
Description
setTestParam(
sets the specified test iteration parameter.obj
,parameter,parameterValue)
setTestParam(
sets the specified test iteration parameter and the obj
,parameter,parameterValue,'SimulationIndex',indexValue)SimulationIndex
name-value pair. The simulation index is the index of an equivalence test case,
specified as an integer.
Input Arguments
obj
— Test iteration object
object
Test iteration object that you want to apply the test parameter to,
specified as a sltest.testmanager.TestIteration
object.
ParameterSet
— Parameter set
current test case setting (default) | character vector
Parameter set name, specified as the comma-separated pair consisting of
'ParameterSet'
and a character vector. Parameter set
overrides are set up in the Parameter Overrides section
of the test case.
Example: 'ParameterSet','Param Set 1'
Baseline
— Baseline criteria dataset
current test case setting (default) | character vector
Baseline criteria dataset name, specified as the comma-separated pair
consisting of 'Baseline'
and a character vector. Baseline
criteria datasets are set up in the Baseline Criteria
section of the test case. It is available only for baseline test
cases.
Example: 'Baseline','BaselineSet_High'
LoggedSignalSet
— Logged signal set
current test case setting (default) | character vector
Logged signal set name, specified as the comma-separated pair consisting
of 'LoggedSignalSet'
and a character vector. Logged
signal sets are set up in the Simulation Outputs
section of the test case.
Example: 'LoggedSignalSet','Logged signal set
1'
ExternalInput
— External input
current test case setting (default) | character vector
External input name, specified as the comma-separated pair consisting of
'ExternalInput'
and a character vector. External
input overrides are set up in the Inputs section of the
test case. You can specify a simulation index as the
ExternalInput
, for example,
ti.setTestParam('ExternalInput','input','SimulationIndex',2)
.
Example: 'ExternalInput','Run1'
ConfigSet
— Configuration setting
current test case setting (default) | character vector
Configuration setting name, specified as the comma-separated pair
consisting of 'ConfigSet'
and a character vector.
Configuration setting overrides are set up in the Configuration
Settings Overrides section of the test case.
Example: 'ConfigSet','Solver 3'
TestSequenceScenario
— Test Sequence scenario name
character vector
Test Sequence scenario name, specified as a character vector. The
specified scenario, which is defined in a Test Sequence block, is used in
the iteration. You specify the Test Sequence block by using setProperty
. The test
sequence scenario for an iteration is set up in the test case
Inputs section of the Test Manager.
SignalEditorScenario
— Signal Editor scenario
current test case setting (default) | character vector
Signal Editor scenario input name, specified as the comma-separated pair
consisting of 'SignalEditorScenario'
and a character
vector. Signal Editor scenario overrides are set up in the test case
Inputs section.
Example: 'SignalEditorScenario','Acceleration'
PreLoadFcn
— Pre-load callback script
current test case setting (default) | character vector
Pre-load callback script, specified as the comma-separated pair consisting
of 'PreLoadFcn'
and a character vector. The default value
uses the existing pre-load callback script in the Test Manager
Callbacks section of the iteration.
PostLoadFcn
— Post-load callback script
current test case setting (default) | character vector
Post-load callback script, specified as the comma-separated pair
consisting of 'PostLoadFcn'
and a character vector. The
default value uses the existing post-load callback script in the Test
Manager Callbacks section of the iteration.
PreStartRealTimeApplicationFcn
— Pre-start real-time application callback script
current test case setting (default) | character vector
Pre-start real-time application callback script, specified as the
comma-separated pair consisting of
'PreStartRealTimeApplicationFcn'
and a character
vector. The default value uses the existing pre-start real-time application
callback script in the Test Manager Callbacks section
of the iteration.
CleanupFcn
— Cleanup callback script
current test case setting (default) | character vector
Cleanup callback script, specified as the comma-separated pair consisting
of 'CleanupFcn'
and a character vector. The default value
uses the existing cleanup callback script in the Test Manager
Callbacks section of the iteration.
Description
— Description
current test case setting (default) | character vector
Test description text, specified as the comma-separated pair consisting of
'Description'
and a character vector. The Description
is set up in the Description section of the test
case.
Example: 'Description','Test the autopilot controller for wind
gusts'
VariantConfiguration
— Name of variant configuration
string | character vector
Since R2024a
Name of variant configuration to apply to the model before running the test iteration, specified as a string or character vector.
This test parameter applies to models that use variant elements such as
variant blocks and variant parameters, and also have variant configurations
created for the model using Variant Manager for Simulink®. For such a model, you can run the same test case for
different variant configurations by creating test case iterations and
setting the required configuration in the
VariantConfiguration
test parameter. This helps to
activate a specific variant path across the model hierarchy before the
iteration runs. Default value for this parameter is the variant
configuration set at the test case level.
For an example, see Run Executable for Different Variant Parameter Values Without Recompiling Code.
Example: "LinInterExpNoNoise"
Data Types: char
| string
Examples
Set Test Parameter
setTestParam(obj,'Description',... 'Test the autopilot controller for wind gusts');
Version History
Introduced in R2016aR2024a: New property for variant configuration
For variant models, use the VariantConfiguration
test
parameter to specify the variant configuration to apply to the model before running
the test iteration.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)