MATLAB Answers

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

1 view (last 30 days)
How to create a test harness without doing a model compilation in R2020a?

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'.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.