Testing Model Components

Testing reusable subsystems, ad-hoc testing for component development, testing user-defined blocks

System verification starts with unit-level simulation tests. Create test harnesses to isolate different parts of your model, and define test inputs, outputs, and acceptance criteria in the test harness or Test Manager. Test components as you implement and refine your control algorithm. When the algorithm is complete, export results for regression testing and create a suite of unit-level tests.


Test AssessmentAssess simulation testing scenarios, function calls, and assessments
Test SequenceCreate simulation testing scenarios, function calls, and assessments


Create Test Harnesses from Standalone Models

Import standalone models as test harnesses in Simulink® Test™.

Generate Test Cases from Model Components

Use the Test Manager to generate and synchronize test cases based on model components and test harnesses.

Test Library Blocks

Test reusable components using tests for libraries, library blocks, and linked blocks.

Link Tests to Requirements

Establish traceability between model requirements and test inputs, expected outputs, and assessments.

Reuse Test Assessments

Place test assessments in a library for use in multiple test harnesses.

Refine, Test, and Debug a Subsystem

Debug and refine a subsystem using a simple test harness.

Test Code in S-Functions

Test a model containing code wrapped in S-functions using a test harness.

Considerations and Limitations

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

Was this topic helpful?