When to Extend Existing Test Cases
The Simulink® Design Verifier™ software can analyze your model using previously generated test cases that you specify. You can use this feature in the following situations:
You encounter delays trying to analyze your model, or you see incomplete results. This can happen if your model has any of the following characteristics:
Model objects that are difficult to test due to complex or nonlinear logic
Analyzing the model and considering the existing test cases allows you to focus the analysis on those parts of the model that are difficult to analyze. You can combine the generated test cases to create a complete test suite for the full model.
For an example of extending existing test cases for a model that uses temporal logic, see Extend Test Cases for Model with Temporal Logic.
You have a closed-loop simulation model that uses a Model block to include the controller. First, log the data from the Model block and then analyze the model referenced by the Model block. Using this technique, the test cases for the controller can realistically reflect the continuous time behavior expected in the closed-loop system.
For an example of extending existing test cases for a closed-loop system, see Extend Test Cases for Closed-Loop System.
You change an existing model for which you have already generated test cases. In this situation, you can reanalyze the model, omitting the analysis results from the original version of the model. The combined test cases give you a complete test suite for the new model.
For an example of extending existing test cases for modified models, see Extend Test Cases for Modified Model.
You apply parameter configurations or update the parameter constraint values of an existing model for which you have generated test cases. In this situation, you can reanalyze the model by reusing the previously generated test cases and extend them to achieve full model coverage. For an example of extending existing test cases when you modify parameter configurations, see Extend Existing Test Cases After Applying Parameter Configurations.
Common Workflow for Extending Existing Test Cases
Use the following workflow for extending existing test cases during a test-generation analysis:
Create the starting test cases.
Log the starting test cases.
Extend the existing test cases during test-generation analysis.
Verify that you have created a complete test suite.
The examples in this category use some or all of these tasks when extending existing test cases during analysis.
Considerations for Starting Test Cases
If the existing test cases are inconsistent with the model, Simulink Design Verifier ignores the test cases during test case extension. For example, if you update the constraint values of parameters and the existing test case violates the specified constraint values, the test case will be ignored.