SystemTest 2.4
Using Excel® Test Data with Simulink® Inport Blocks
This demo illustrates how SystemTest™ can be used to read Excel test data into the SystemTest environment, and assign individual test signals to Simulink Inport blocks.
Note the test data in the Excel spreadsheet was generated by Simulink® Design Verifier™.
For the purposes of this demo, model coverage will be enabled to assess the amount of coverage provided by the test data.
This demo requires the following products to run:
- Simulink
- Stateflow®
Open the demo in the SystemTest desktop.
Contents
Simulink Model Overview
The Simulink model used in this demo is a fuel rate controller with 4 Inport blocks, representing:
- Throttle angle
- Speed
- Exhaust gas (EGO)
- Manifold absolute pressure (MAP)
demosystest_fuelctrl_slinports_model
Part 1: Read Excel Test Data Into SystemTest
The first step involves reading Excel data into a SystemTest test vector. The following video will highlight how to:
- Create a Spreadsheet Data test vector
- Configure the Spreadsheet Data test vector to read test data from the Excel file st_fuelctrl_slinports_data.xls
Watch the video (1 min, 59 sec)
Part 2: Map Test Signals to Simulink Inport Blocks
The second step involves assigning test signals read from Excel to individual Simulink Inport blocks. The following video will highlight how to:
- Create a Simulink element
- Configure the Simulink element with the model demosystest_fuelctrl_slinports_model
- Map the test signals individually to the root-level Inport blocks
- Enable model coverage
- Run the test
Store