Main Content

Create Back-to-Back Tests Using Enhanced MCDC

Back-to-back tests, or equivalence tests, compare the results of normal simulations with the generated code results from software-in-the-loop (SIL), processor-in-the-loop (PIL), or hardware-in-the-loop (HIL) simulations. You can generate back-to-back tests in Simulink® Test™ that use Enhanced MCDC.

Back-to-back testing workflow in Simulink. Step 1: Generate Code for Model. Step 2: Component under Test Wizard (bullet 1: Select Back-to-back Testing, bullet 2: Select Enhanced MCDC). Step 3: Generate Simulink Design Verifier Test Cases. Step 4: Simulink Test Manager. Step 5: Simulate Test Cases.

Set Up Test Inputs and Verification Strategy

If you want to test a component under test or subsystems in Simulink Test, you can use the Create Test for Component wizard by selecting New > Create Test for Model Component Simulink Test Test Manager, Use Design Verifier to generate test input scenarios. For detailed information, see Generate Tests and Test Harnesses for a Model or Components (Simulink Test).

To compare the results of running the component in two different simulation modes, select Perform back-to-back testing on the Verification Strategy tab of the wizard. For SIL testing an atomic subsystem or a reusable library subsystem, the subsystem or library that contains the subsystem must already have generated code. See Enhanced MCDC Coverage in Simulink Design Verifier for more information.

Create Test for Model Component window with "Perform back-to-back testing" selected.

If, under Perform back-to-back testing you select Software-in-the-Loop or Processor-in-the-Loop for Simulation2, the Set Model Coverage Objective as Enhanced MCDC option appears. Enhanced MCDC extends decision coverage by generating test cases that avoid masking effects from downstream blocks.

Related Topics