Test Condition
R2026bConstrain signal values in test cases
Libraries:
Simulink Design Verifier /
Objectives and Constraints
Description
The Test Condition block defines test conditions for signals in models that are operating in test generation mode. (See Workflow for Test Generation). Use the Values parameter to specify constraints on signal values. The block applies the specified Values parameter to its input signal and attempts to produce test cases.
You can use the block to:
Enable or disable the condition.
Specify whether the block should display its Values parameter in the Simulink® Editor.
Specify whether the block should display its output port.
When you generate code using Simulink and Simulink Coder™, the Test Condition block is ignored. The Test Condition block does not modify the signal during model simulation, and only uses the signal to generate test conditions.
Examples
Limitations
Test Condition block with a nonvirtual bus as an input is incompatible with Simulink Design Verifier™ analysis.
Ports
Input
Output
Dependencies
To enable this port, select Pass through style (show Outport).
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"sldvlib/Objectives and Constraints/Test Condition"
Example: add_block("sldvlib/Objectives and Constraints/Test Condition","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2007a


