test harnesses -凯发k8网页登录
create a test-specific simulation environment for your model by using a test harness. you can isolate individual blocks for unit testing and add inputs, verification logic, and dashboard blocks. perform closed-loop testing by adding physical plant models to the test harness. test potential design changes in the test harness before you change the production model.
compared to using separate models for unit testing, test harnesses offer management and synchronization capabilities in the model canvas. if your model is under change management, you can save test harnesses in external files, without changing the main model.
you can test generated code by simulating test harnesses in sil or pil mode. you can also test external handwritten code by creating test harnesses for c caller or s-function blocks.
tools
model and code testing in different execution environments, manage test suites, and analyze and report results |
topics
test a simulink® model in an isolated environment, using a separate workspace and configuration set accessed via the model canvas.
use a test harness to isolate the component under test.
create, import, and customize test harness configurations for your model and subsystem.
manage test harnesses, including opening, converting, closing, deleting, and exporting.
transfer configuration sets and workspace variables, update the component design, and rebuild the harness to reflect the latest design.
describes how test harnesses are constructed for certain simulink semantics and component types.
test reusable components using tests for libraries, library blocks, and linked blocks.
create reusable functions and callbacks that customize test harnesses.
import standalone models as test harnesses in simulink test™.
use stateflow chart to define test harness inputs and test sequence.