Documentation

Working With Test Harnesses

Test harness properties, synchronization, management, and programmatic interface

Test harneses provide a separate simulation environment for testing a model or component. Configure test harnesses with sources, sinks, and sychronization properties to match your verification activities. For models used for production code generation, you can isolate your test inputs, verification logic, and signal logging to preserve code generation semantics. For models under change management, you can preserve the model version by using externally saved test harnesses.

Functions

sltest.harness.checkCompare component under test between harness model and main model
sltest.harness.cloneCopy test harness
sltest.harness.closeClose test harness
sltest.harness.convertConvert test harnesses between internal and external storage
sltest.harness.createCreate test harness
sltest.harness.deleteDelete test harness
sltest.harness.exportExport test harness to Simulink model
sltest.harness.importImport Simulink model to test harness
sltest.harness.findFind test harnesses in model
sltest.harness.loadLoad test harness
sltest.harness.moveMove test harness from linked instance to library block or to a different harness owner
sltest.harness.openOpen test harness
sltest.harness.pushPush test harness workspace entries and configuration set to model
sltest.harness.rebuildRebuild test harness and update workspace entries and configuration parameter set based on main model
sltest.harness.setChange test harness property

Topics

Select Test Harness Properties

Create and customize test harness configurations for your model and subsystem.

Test Harness Construction for Specific Model Elements

Describes how test harnesses are constructed for certain Simulink® semantics and component types.

Create Test Harnesses from Standalone Models

Import standalone models as test harnesses in Simulink Test™.

Manage Test Harnesses

Manage test harnesses, including opening, converting, closing, deleting, and exporting.

Customize Test Harnesses

Create reusable functions that customize test harnesses for your particular application, such as adding mixed source and sink block types and adding plant subsystems.

Test Harness and Model Relationship

Test a Simulink model in an isolated environment, using a separate workspace and configuration set accessed via the model canvas.

Test Harness Parameters and Signals

Resolve parameters and signals between test harness and model.

Synchronize Changes Between Test Harness and Model

Transfer configuration sets and workspace variables, update the component design, and rebuild the harness to reflect the latest design.

Considerations and Limitations

Review support for particular model elements and semantics, and automatic syntax suggestions in the Test Sequence Editor.

Was this topic helpful?