| Contents | Index |
| On this page… |
|---|
Each section of the test serves a different purpose and has different properties that can be set in the Properties pane. Click a part of the test or an element in the Test Browser to see the properties for that section or element.
The descriptions of the elements in this chapter include a list of which sections of the test you can use each element in. The following sections describe the sections of a test. They are followed by a description of how to use the basic elements.
The Pre Test runs once prior to any number of iterations through Main Test. Pre Test can be used to perform general test setup such as:
Opening a model.
Initializing variables.
Accessing system resources, such as opening a file.
Initializing external test equipment.
In Pre Test, only test variables defined as a Pre Test variable may be modified or assigned to. Pre Test variables are initialized during Pre Test and persist throughout the Main Test and Post Test.
In Pre Test you can add the following element types: Simulink, MATLAB, Subsection, Stop, IF, Video Input, the three Instrument Control Toolbox elements, and the four Data Acquisition Toolbox elements.
With Pre Test you can initialize Pre Test variables and run elements that you only want to run once before any Main Test iterations. For example, you can:
Add a Simulink element to run a model and assign baseline data to a Pre Test variable.
Add a MATLAB element to load a MAT-file or perform some other test setup.
Create conditions with the IF element and follow up with a Subsection element to define what to do when those conditions are met.
The Main Test is run one or more times based on the number of iterations. It is used to:
Execute elements multiple times in order to perform batch testing or sweep through a parameter space.
Perform batch testing or parameter sweeps that require multiple independent iterations using different test conditions for each iteration.
The number of iterations is defined by the number and length of test vectors you specify. The SystemTest software executes Main Test once for each permutation of values in the test vectors specified.
In Main Test you can add all of the element types.
The Post test runs once after all Main Test iterations have executed or when a run-time error occurs in Pre Test or Main Test. Post Test can be used to perform test cleanup, such as:
Closing a model.
Cleaning up your workspace.
Releasing system resources, such as closing a file.
Returning external test equipment to a safe state.
In Post Test you can add the following element types: MATLAB, Subsection, IF, Video Input, the three Instrument Control Toolbox elements, and the four Data Acquisition Toolbox elements.
![]() | Working with the Basic Elements | Basic Elements | ![]() |

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 |