Products & Services Solutions Academia Support User Community Company

Learn more about SystemTest   

Creating Signal Builder Block Test Vectors

If you have created a Simulink model test harness using a Signal Builder block, you can automate the running of all your test cases by integrating them into a SystemTest test. This also offers the ability to collect cumulative model coverage metrics for all your Signal Builder test cases.

The most common workflow for this feature is to create a Simulink element and then create the test vector from within the element, as follows:

  1. In the SystemTest desktop, create a Simulink element by clicking the Main Test node in the Test Browser, and clicking the New button. Select Test Element > Simulink.

  2. Type the name of the model, or use the Browse button to locate it. This should be the model that includes the Signal Builder block whose test cases you are interested in.

    When you click OK, the model opens.

    This example uses the model systemtestsfcar.

  3. In the Simulink element, click the up arrows in the banner of the Override Inport Block Signals with SystemTest Data section to close it.

  4. Click the down arrows in the banner of the Run Signal Builder test cases from SystemTest section to expand it.

  5. Enable the Signal Builder test cases by selecting the Use test vector check box.

  6. Click the down arrow and select <New Signal Builder Block test vector...>.

  7. The Insert Test Vector dialog box opens and Signal Builder Block is the selected test vector type.

    Keep the default test vector name or type a new one.

  8. On the General tab, type the name of the model you used in the Simulink element, or click the Browse button to locate it.

      Note   You cannot use a Signal Builder Block test vector with a Simulink element that uses a different model. You must refer to the same model in both the test vector and the Simulink element.

  9. When the model is found, the Signal Builder test cases appear in the Test Cases section.

    If there are any test cases you do not want to test, you can disable them using the check boxes. Test cases that are checked will be tested.

  10. You can click the Test Signals tab to view the test signals associated with your Signal Builder block.

  11. Click OK to finish creating the test vector.

  12. To view or edit the test vector after it is created, click the Test Vectors tab in the SystemTest desktop.

  13. Optionally create other elements, test vectors, variables, or saved results, and run your test.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS