Design Verifier Pane: Test Generation
Test Generation Pane Overview
Specify options that control how Simulink® Design Verifier™ generates tests for the models it analyzes.
See Also
Test generation target
Specify the target for test generation.
Default:
Model
generates test cases for the model.Code Generated as Top Model
generates the code for the target as top model followed by test cases generation using the generated code.Code Generated as Model Reference
generates the code for target as model reference followed by test cases generation using the generated code.
Command-Line Information
Parameter:
DVTestgenTarget |
Type: character array |
Value:
'Model' |
'GenCodeTopModel' |
'GenCodeModelRef' |
|
See Also
Model coverage objectives
Specify the type of model coverage that Simulink Design Verifier attempts to achieve.
Settings
Default: Condition
Decision
None
Generates test cases that achieve only the custom objectives that you specified in your model using, for example, Test Objective blocks.
Decision
Generates test cases that achieve decision coverage. For more information, see Decision.
Condition Decision
Generates test cases that achieve condition and decision coverage. For more information, see Condition.
MCDC
Generates test cases that achieve MCDC coverage. Additionally, the generated test cases avoid masking effects from downstream blocks so that the test block has an effect on the output. When you select
MCDC
, Simulink Design Verifier automatically enables every coverage objective for decision and condition coverage. For more information, see MCDC.Enhanced MCDC
Enhanced MCDC test cases achieve MCDC coverage and have additional characteristics. Enhanced MCDC requires additional test cases to cover complex logical constructs and interactions between conditions more thoroughly. When you select
Enhanced MCDC
, Simulink Design Verifier automatically enables MCDC coverage. For more information, see Enhanced MCDC.
Command-Line Information
Parameter: DVModelCoverageObjectives |
Type: character array |
Value:
'None'
| 'Decision' |
'ConditionDecision' |
'MCDC' |
'EnhancedMCDC' |
Default: 'ConditionDecision' |
See Also
Test conditions
Specify whether Test Condition blocks in your model are enabled or disabled.
Settings
Default: Use local
settings
Use local settings
Enables or disables Test Condition blocks based on the value of the Enable parameter of each block. If a block's Enable parameter is selected, the block is enabled; otherwise, the block is disabled.
Enable all
Enables all Test Condition blocks in the model regardless of the settings of their Enable parameters.
Disable all
Disables all Test Condition blocks in the model regardless of the settings of their Enable parameters.
Command-Line Information
Parameter: DVTestConditions |
Type: character array |
Value: 'UseLocalSettings' | 'EnableAll' | 'DisableAll' |
Default: 'UseLocalSettings' |
See Also
Test objectives
Specify whether Test Objective blocks in your model are enabled or disabled.
Settings
Default: Use local
settings
Use local settings
Enables or disables Test Objective blocks based on the value of the Enable parameter of each block. If a block's Enable parameter is selected, the block is enabled; otherwise, the block is disabled.
Enable all
Enables all Test Objective blocks in the model regardless of the settings of their Enable parameters.
Disable all
Disables all Test Objective blocks in the model regardless of the settings of their Enable parameters.
Command-Line Information
Parameter: DVTestObjectives |
Type: character array |
Value: 'UseLocalSettings' | 'EnableAll' | 'DisableAll' |
Default: 'UseLocalSettings' |
See Also
Maximum test case steps
Specify the maximum number of simulation steps Simulink Design Verifier takes when attempting to satisfy a test objective.
The analysis uses the Maximum test case steps parameter during certain parts of the test-generation analysis to bound the number of steps that test generation uses. When you set a small value for this parameter, the parts of the analysis that are bounded complete in less time. When you set a larger value, the bounded parts of the analysis take longer, but it is possible for these parts of the analysis to generate longer test cases.
To achieve the best performance, set the Maximum test case steps parameter to a value just large enough to bound the longest required test case, even if the test cases that are ultimately generated are longer than this value.
When you also specify LongTestcases
for
the Test suite optimization parameter, the analysis
uses successive passes of test generation to extend a potential test
case so that it satisfies more objectives. When this happens, the
analysis applies the Maximum test case steps parameter
to each individual iteration of test generation.
Settings
Default: 10000
You can specify a value that represents the maximum number of simulation steps Simulink Design Verifier takes when attempting to satisfy a test objective.
Command-Line Information
Parameter: DVMaxTestCaseSteps |
Type: int32 |
Value: any valid value |
Default: 10000 |
See Also
Test suite optimization
Specify the optimization strategy to use when generating test cases.
Settings
Default:
Auto
Auto
Analyzes the model by using a strategy that automatically adapts to the model for better analysis performance and precision.
IndividualObjectives
Maximizes the number of test cases in a suite by generating cases that each address only one test objective. Each test case tends to be short, that is, it includes only a few time steps.
LongTestcases
Combines test cases to create a smaller number of test cases. This strategy generates fewer, but longer, test cases that each satisfy multiple test objectives.
Legacy LargeModel (Nonlinear Extended)
Analyzes the model by using a static strategy that does not adapt to the model. When you analyze a model by using
Legacy LargeModel (Nonlinear Extended)
, Simulink Design Verifier displays a warning message that this option is deprecated and suggests that you useAuto
.Auto
is most likely to produce better analysis results thanLegacy LargeModel (Nonlinear Extended)
.
Command-Line Information
Parameter: DVTestSuiteOptimization |
Type: character array |
Value:
'Auto' |
'IndividualObjectives' |
'LongTestcases' |
Legacy LargeModel (Nonlinear
Extended) |
Default:
'Auto' |
See Also
Include relational boundary objectives
Specify generation of test cases that satisfy relational boundary objectives. The objective applies to blocks such as Relational Operator that have an explicit or implicit relational operation. The tests check the relational operations in these blocks with:
Equal operand values for integer and fixed-point operands.
Operand values within a certain tolerance for all operands. For integer and fixed-point operands, the tolerance is fixed. For floating-point operands, the tolerance is computed using the inputs and a tolerance value that you specify. If you do not specify a tolerance value, the default values are used.
Settings
Default: Off
- On
For supported blocks, generates the test cases to satisfy relational boundary objectives.
- Off
Ignores the relational boundary objectives for generating the test cases.
Dependencies
If you select this option, you can use default values or specify values for:
Command-Line Information
Parameter:
DVIncludeRelationalBoundary |
Type: character array |
Value:
'on' |'off' |
Default:
'off' |
See Also
Floating point absolute tolerance
Specify a value for absolute tolerance used in relational boundary tests. The relational boundary objectives apply to blocks such as Relational Operator that have an explicit or implicit relational operation. The tolerance value applies only if the relational operations in those blocks use floating point operands.
For integer operands, the tolerance value is fixed at 1.
For fixed-point operands, the tolerance value is the least significant bit.
Settings
Default: 1.0000e-05
For supported blocks, the relational boundary tests check the relational operations in the block with operand values that differ by a certain tolerance. The software calculates the tolerance value using the following formula
max(absTol, relTol* max(|lhs|,|rhs|))
,
where:
absTol
is the absolute tolerance value that you specify.relTol
is a relative tolerance value that you can specify.lhs
is the left operand andrhs
the right operand.max(x,y)
returnsx
ory
, whichever is greater.
Dependencies
To enter a value for this option, select Include relational boundary objectives.
Command-Line Information
Parameter:
DVAbsoluteTolerance |
Type:
double |
Value: Any valid value |
Default: 1.0000e-05 |
See Also
Model Objects That Receive Coverage (Simulink Coverage)
Floating point relative tolerance
Specify a value for relative tolerance used in relational boundary tests. The relational boundary objectives apply to blocks such as Relational Operator that have an explicit or implicit relational operation. The tolerance value applies only if the relational operations in those blocks use floating point operands.
For integer operands, the tolerance value is fixed at 1.
For fixed-point operands, the tolerance value is the least significant bit.
Settings
Default: 0.01
For supported blocks, the relational boundary tests check the relational operations in the block with operand values that differ by a certain tolerance. The software calculates the tolerance value using the following formula
max(absTol, relTol* max(|lhs|,|rhs|))
,
where:
absTol
is an absolute tolerance value that you can specify.relTol
is the relative tolerance value that you specify.lhs
is the left operand andrhs
the right operand.max(x,y)
returnsx
ory
, whichever is greater.
Dependencies
To enter a value for this option, select Include relational boundary objectives.
Command-Line Information
Parameter:
DVRelativeTolerance |
Type:
double |
Value: Any valid value |
Default: 0.01 |
See Also
Model Objects That Receive Coverage (Simulink Coverage)
Use strict propagation conditions
Specify whether to use strict propagation conditions for enhanced MCDC analysis.
Settings
Default: Off
- On
Use strict propagation condition for enhanced MCDC analysis.
- Off
Does not use strict propagation conditions for enhanced MCDC analysis.
Dependency
This parameter is enabled when you select
Enhanced MCDC
as
Model coverage
objectives.
Command-Line Information
Parameter:
DVStrictEnhancedMCDC |
Type: character array |
Value:
'on' |
'off' |
Default:
'off' |
See Also
Extend using existing coverage data
Specify whether to use your existing coverage data for test generation. Simulink Design Verifier generates test cases for the objectives not covered in your existing coverage data.
Settings
Default: Off
- On
Extend the coverage in Coverage data by generating additional test cases.
- Off
Analysis ignores existing Coverage data.
Command-Line Information
Parameter:
DVIgnoreCovSatisfied |
Type: character array |
Value:
'on' |
'off' |
Default:
'off' |
Coverage data
Specify the folder and file name for a file that contains data about satisfied coverage objectives.
Settings
Default:
''
Specify the folder and file name for a file that contains the satisfied coverage objectives data.
Click Browse to navigate to and select an existing file.
Command-Line Information
Parameter:
DVCoverageDataFile |
Type: character array |
Value: any valid path and file name |
Default:
'' |
Browse
Browse to the coverage file that contains the data about satisfied coverage objectives.
Dependencies
To enable this parameter, select Extend using existing coverage data.
See Also
Extend using existing test data
Specify whether to extend the set of generated test cases in Simulink Design Verifier by importing previously generated test cases, test cases logged from a harness model, or a closed-loop simulation model.
Settings
Default: Off
- On
Use test cases specified in Test data to extend the set of generated test cases.
- Off
Analysis ignores the existing Test data.
Command-Line Information
Parameter:
DVExtendExistingTests |
Type: character array |
Value:
'on' |
'off' |
Default:
'off' |
Test data
Specify a folder and file name for the MAT-file that contains the generated or logged test case data.
Settings
Default:
''
Specify a folder and file name for the MAT-file that contains the logged test case data in an
sldvData
object.Click Browse to navigate to and select an existing file.
Command-Line Information
Parameter:
DVExistingTestFile |
Type: character array |
Value: any valid path and file name |
Default:
'' |
Browse
Browse to the MAT-file that contains the generated or logged test case data and data about satisfied coverage objectives.
Dependencies
To enable this parameter, select Extend using existing test data.
See Also
Separate objectives satisfied with the existing tests/coverage data in the report
Specify whether to separate the test objective statuses that are satisfied by the existing tests or coverage data from the extended coverage and test data in the analysis report.
Settings
Default: On
- On
Generates an analysis report where the existing tests and coverage data are separate from the extended test and coverage data.
- Off
Generates a report that combines existing and extended coverage and test data.
Command-Line Information
Parameter:
DVIgnoreExistTestSatisfied |
Type: character array |
Value:
'on' |
'off' |
Default:
'on' |