Generate Simulink Coverage harness model
generates a test harness from harnessFilePath
= slvnvmakeharness(model
)model
, which is a handle to a
Simulink® model or a character vector or string with the model name.
slvnvmakeharness
returns the path and file name of the
generated harness model in harnessFilePath
.
slvnvmakeharness
creates a harness model containing the
Model block, a Signal Builder block, and a
size-type conversion block, by default. The test harness includes one default test
case that specifies the default values for all
input signals.
generates
a test harness from the data file harnessFilePath
= slvnvmakeharness(model
, dataFile
)dataFile
.
generates
a test harness from harnessFilePath
= slvnvmakeharness(model
, dataFile
, harnessOpts
)model
by using the dataFile
and harnessOpts
,
which specifies the harness creation options. Requires ''
for dataFile
if dataFile
is
not available. The default dataFile
argument
creates a test harness with a single test case with default values
for the inputs.
Create a test harness for the sldemo_mdlref_house
model
using the default options:
open_system('sldemo_mdlref_house'); harnessOpts = slvnvharnessopts; [harnessfile] = slvnvmakeharness('sldemo_mdlref_house', '', harnessOpts);