| Contents | Index |
| On this page… |
|---|
You can use the test cases and signals you create in the Test Case Editor within your test by using some of the test elements within the SystemTest software.
You can select a Test Case Data test vector or individual signals from the test vector within the following elements:
Simulink element
MATLAB element
General Plot element
The following sections discuss using test cases and signals in these elements.
You can create signals in the Test Case Editor and use them to test a Simulink model. You do this by mapping the signals in the Simulink element using a Test Case Data test vector.
One possible high-level workflow of using test cases and signals in your test via the Simulink element is:
Create a Test Case Data test vector.
Open the Test Case Editor from the test vector.
Create a test case and signals in the Test Case Editor.
Return to the SystemTest desktop and create a Simulink element.
In the Simulink element, map Inport blocks in your model to the signals you created in the Test Case Editor by selecting the Test Case Data test vector or individual signals in the Simulink element.
Note For an example of using signals created in the Test Case Editor in a Simulink element, see Using Test Cases and Signals from the Test Case Editor in a Simulink Element. It includes the workflow outlined here and gives details on the steps in the Simulink element. |
You can access the data from a Test Case Data test vector by using a MATLAB element in a test that has a Test Case Data test vector. You could use the data for a variety of reasons, such as writing it to a CSV file, calling a custom function, or creating a plot.
To see example code you could use in a MATLAB element, see Using a MATLAB Element to Access Test Case Data Test Vector Information.
You can plot data from a Test Case Data test vector or any individual signals from a Test Case Data test vector in a General Plot element. Test Case Data test vectors and signals are supported in two plot types – plot and Simulink data. Any other plot type results in an error at run time.
Note You can only plot an individual signal in the General Plot element. If your test case contains a bus, you cannot select the bus in the plot. You can select an individual signal within the bus. |
The following sections describe the behavior of using a Test Case Data test vector or an individual signal for these two plot types.
plot Plot Type
Test Vector — If you use a Test Case Data test vector as the Y Data Source and X Data Source is left as <Auto>, then all signals within the test vector are plotted on the same axes versus their times. In the example shown here, the test vector TestVector1 is selected, so all four of its signals will be plotted.

If your test vector includes signals that are scaled very differently, see the note about scaling at the end of this section.
Individual Signal — If you specify an individual signal as the Y Data Source and X Data Source is left as <Auto>, then that signal is plotted versus its time. In the example shown here, the signal engine_speed is selected, so that signal will be plotted.

Simulink data Plot Type
Test Vector — If you select a Test Case Data test vector in the Simulink Data field, then all signals within the test vector are plotted on the same axes versus their times. In the example shown here, the test vector TestVector1 is selected, so all four of its signals will be plotted.

If your test vector includes signals that are scaled very differently, see the note about scaling at the end of this section.
Individual Signal — If you specify an individual signal in the Simulink Data field, then that signal is plotted versus its time. In the example shown here, the signal engine_speed is selected, so only that signal will be plotted.

Note If you plot a Test Case Data text vector, either using plot or Simulink data plot type, and the signals within the test vector are scaled very differently, you may prefer to plot the signals on different axes. If you want each signal to appear with its own scale, add an axes for each signal and then add the plot to each axes. For example, if you have TestVector1 and it has three signals, Signal1, Signal2, and Signal3, you could plot it as shown here. |

![]() | Linking to Requirements in Telelogic DOORS | Working with Test Cases and Signals Programmatically | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |