How to create a test harness without doing a model compilation in R2020a?

6 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Mar 2020
Edited: MathWorks Support Team on 25 Mar 2020
You can do this easily with the toolbox Simulink Test.
There you can create a test harness while not compiling the model, as you can see below:
More information can be found here:
"Create without compiling the model
Creating a test harness without compiling the model can be useful if you are prototyping a design that cannot yet compile. When you create a test harness without compiling the main model:
  • Parameters are not copied to the test harness workspace.
  • The main model configuration is not copied to the test harness.
  • The test harness does not contain conversion subsystems.
You may need to add blocks such as signal conversion blocks to the test harness. You can rebuild the harness when you are ready to compile the main model. For more information, see Synchronize Changes Between Test Harness and Model.
Test harnesses for Subsystem models are created without compiling the model."
If you want to do this programmatically, you can use the command:
>> sltest.harness.create
which is documented here:
Using this command, you can set the following option:
'CreateWithoutCompile'
to 'true' or 'false'.

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!