TPT User's Guide - PikeTec
TPT User's Guide - PikeTec
TPT User's Guide - PikeTec
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong><br />
Version 3.1<br />
13 February 2009
Contents<br />
Page 2 <strong>TPT</strong> User’s <strong>Guide</strong><br />
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> _________________________________________________________________ 1<br />
1 Introduction ________________________________________________________________ 5<br />
1.1 Starting <strong>TPT</strong> ________________________________________________________________ 5<br />
1.1.1 General options _____________________________________________________________ 5<br />
1.1.2 Specific options of the execution _______________________________________________ 6<br />
1.1.3 Specific options of the assessment engine _______________________________________ 6<br />
1.1.4 Specific options for the data converter __________________________________________ 6<br />
1.1.5 Specific options for the log server ______________________________________________ 6<br />
1.1.6 Specific options for the report editor ____________________________________________ 7<br />
1.1.7 Specific options for the report generator _________________________________________ 7<br />
1.1.8 Further options _____________________________________________________________ 7<br />
1.2 The main window ____________________________________________________________ 7<br />
1.2.1 The testlet browser __________________________________________________________ 8<br />
1.2.2 The scenario browser ________________________________________________________ 8<br />
1.2.3 The editor window __________________________________________________________ 8<br />
1.2.4 The documentation window __________________________________________________ 8<br />
1.2.5 Menu and tool bar ___________________________________________________________ 9<br />
1.3 Creating saving and loading test models __________________________________________ 9<br />
1.4 Exit <strong>TPT</strong> ____________________________________________________________________ 9<br />
1.5 View options ________________________________________________________________ 9<br />
2 Declaration of Channels, Parameters and Constants _____________________________ 10<br />
2.1 Introduction ________________________________________________________________ 10<br />
2.2 The declaration _____________________________________________________________ 10<br />
2.3 Creating a declaration ________________________________________________________ 11<br />
2.4 Changing a declaration _______________________________________________________ 12<br />
2.5 Deleting a declaration ________________________________________________________ 12<br />
2.6 Declaration of Parameters _____________________________________________________ 12<br />
3 Signature of a Testlet _______________________________________________________ 13<br />
3.1 Introduction ________________________________________________________________ 13<br />
3.2 Assigning observation channels ________________________________________________ 13<br />
3.3 Assigning stimulation channels ________________________________________________ 14<br />
3.4 Assigning local channels ______________________________________________________ 14<br />
4 Graphical Modelling of a Testlet ______________________________________________ 15<br />
4.1 Introduction ________________________________________________________________ 15<br />
4.2 Creating initial node elements _________________________________________________ 16<br />
4.3 Creating final node elements __________________________________________________ 17<br />
4.4 Creating state elements ______________________________________________________ 17<br />
4.5 Renaming states or testlets, respectively _________________________________________ 18<br />
4.6 Embedded testlets __________________________________________________________ 18<br />
4.7 Creating transitions __________________________________________________________ 19<br />
4.8 Establishing transition specifications ____________________________________________ 19<br />
4.9 Naming or renaming transitions ________________________________________________ 20<br />
4.10 Shaping transitions graphically ________________________________________________ 20<br />
4.11 Reconnecting transitions _____________________________________________________ 21<br />
4.12 Creating junctions ___________________________________________________________ 22<br />
4.13 Parallel automatons _________________________________________________________ 22<br />
4.14 Creating textual notes ________________________________________________________ 22<br />
4.15 Selecting, cutting, copying, inserting and copying as an image _______________________ 23<br />
4.16 Saving automaton fragments __________________________________________________ 24<br />
4.17 Importing <strong>TPT</strong> automaton fragments ____________________________________________ 24<br />
4.18 Exporting automatons or automaton fragments into an image file ____________________ 24<br />
4.19 Controlling quality and size of the automaton view ________________________________ 25<br />
4.20 Compiling on the fly _________________________________________________________ 25
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 3<br />
5 Modelling a Testlet by “Direct Definition” ______________________________________ 26<br />
5.1 Introduction ________________________________________________________________ 26<br />
5.2 Defining Equations __________________________________________________________ 27<br />
5.3 Changing the order of definition equations _______________________________________ 27<br />
5.4 Defining signals _____________________________________________________________ 28<br />
6 Definition of Scenarios ______________________________________________________ 29<br />
6.1 Introduction ________________________________________________________________ 29<br />
6.2 “Time Partition” scenarios _____________________________________________________ 29<br />
6.2.1 Selecting path variants ______________________________________________________ 30<br />
6.2.2 Selecting state variants ______________________________________________________ 30<br />
6.2.3 Selecting transition specifications _____________________________________________ 31<br />
6.2.4 Add Unambiguous Variants __________________________________________________ 32<br />
6.3 “Direct Definition” scenarios ___________________________________________________ 32<br />
6.4 Parameter definition _________________________________________________________ 32<br />
6.4.1 Exchange Parameter with MATLAB ____________________________________________ 33<br />
7 Organisation of testlets _____________________________________________________ 35<br />
7.1 Introduction and scenarios ____________________________________________________ 35<br />
7.2 Creation of testlets __________________________________________________________ 35<br />
7.3 Deletion of testlets __________________________________________________________ 35<br />
7.4 Deletion of the content of a testlet ______________________________________________ 35<br />
7.5 Renaming testlets ___________________________________________________________ 36<br />
7.6 Creation of scenarios / scenario groups __________________________________________ 36<br />
7.7 Deleting scenarios / scenario groups ____________________________________________ 37<br />
7.8 (Re)naming scenarios/scenario groups __________________________________________ 37<br />
7.9 Moving scenarios ___________________________________________________________ 37<br />
7.10 Commenting scenarios/scenario groups _________________________________________ 38<br />
8 Test set configurations ______________________________________________________ 39<br />
8.1 Introduction ________________________________________________________________ 39<br />
8.2 Selection of test-sets _________________________________________________________ 39<br />
9 Platform configuration ______________________________________________________ 41<br />
9.1 Introduction ________________________________________________________________ 41<br />
9.2 Selecting the platform________________________________________________________ 41<br />
9.3 MATLAB/Simulink environment ________________________________________________ 41<br />
9.4 The executable platform ______________________________________________________ 49<br />
9.4.1 <strong>TPT</strong>-VM-API for the execution platform _________________________________________ 50<br />
9.4.2 Executable platform configuration _____________________________________________ 51<br />
9.4.3 Test Source Code with the Exe-Platform ________________________________________ 51<br />
9.5 Standalone platform _________________________________________________________ 54<br />
10 Test Execution _____________________________________________________________ 55<br />
10.1 Introduction ________________________________________________________________ 55<br />
10.2 Test execution configuration __________________________________________________ 55<br />
10.3 Pauses or “Intermission points” ________________________________________________ 57<br />
11 Test Analysis _______________________________________________________________ 59<br />
11.1 Introduction ________________________________________________________________ 59<br />
11.2 The Test Data Viewer _________________________________________________________ 59<br />
11.2.1 Test data viewer operational modes and shortcuts ________________________________ 61<br />
11.3 The HTML Report ____________________________________________________________ 62<br />
11.3.1 Report overview ___________________________________________________________ 63<br />
12 The Report Template Editor __________________________________________________ 64<br />
12.1 Introduction ________________________________________________________________ 64<br />
12.2 Creating a template by means of the template editor _______________________________ 64<br />
12.3 Loading and saving a template ________________________________________________ 66<br />
12.4 Elements of a template _______________________________________________________ 66<br />
13 Function Wizard ____________________________________________________________ 69
Page 4 <strong>TPT</strong> User’s <strong>Guide</strong><br />
13.1 Motivation and targets _______________________________________________________ 69<br />
13.2 Access to the function wizard __________________________________________________ 69<br />
13.3 The individual functions ______________________________________________________ 70<br />
13.3.1 Constant function __________________________________________________________ 70<br />
13.3.2 Ramp function _____________________________________________________________ 70<br />
13.3.3 Asymptote function ________________________________________________________ 71<br />
13.3.4 Periodic function ___________________________________________________________ 71<br />
14 Debugging of Test Automatons_______________________________________________ 73<br />
14.1 Basic modules of debugging __________________________________________________ 73<br />
14.2 Debug plug-in features _______________________________________________________ 74<br />
14.2.1 Extensions to the user interface: definition of breakpoints __________________________ 74<br />
14.2.2 Finding breakpoints ________________________________________________________ 75<br />
14.3 Executing a test for debugging ________________________________________________ 76<br />
14.3.1 Configuring the execution of tests in debugging _________________________________ 76<br />
14.3.2 Sequence and operation of an execution during debugging ________________________ 77<br />
14.3.3 The “control debug session“ window ___________________________________________ 78<br />
14.3.4 The “channel watch” window _________________________________________________ 79<br />
14.3.5 The “breakpoints overview” window ___________________________________________ 79<br />
15 Further <strong>TPT</strong> functions and tools ______________________________________________ 80<br />
15.1 <strong>TPT</strong> help system _____________________________________________________________ 80<br />
15.2 The search an replace function _________________________________________________ 80<br />
15.3 The history function _________________________________________________________ 81<br />
15.4 Auto-completion ____________________________________________________________ 81<br />
15.5 Menu Options ______________________________________________________________ 82<br />
15.6 Interface import _____________________________________________________________ 82<br />
15.7 The logging server ___________________________________________________________ 83<br />
15.8 Statistics ___________________________________________________________________ 83<br />
15.8.1 First column – Object overview _______________________________________________ 84<br />
15.8.2 Second column - Amount ____________________________________________________ 84<br />
15.8.3 Third column – Spreading of variants ___________________________________________ 84<br />
15.8.4 Fourth column – Spreading of combinations ____________________________________ 84<br />
15.9 Restore from history _________________________________________________________ 84<br />
15.10 Environment variables _______________________________________________________ 85<br />
15.10.1 Definition of environment variables ____________________________________________ 85<br />
15.10.2 Execution Configuration variables _____________________________________________ 85<br />
15.10.3 General platform configuration variables _______________________________________ 86<br />
15.10.4 MATLAB platform configuration variables _______________________________________ 86<br />
15.10.5 Backbone platform configuration variables ______________________________________ 86<br />
15.10.6 Scenario specific variables ___________________________________________________ 86<br />
15.10.7 Overview _________________________________________________________________ 88<br />
16 Index _____________________________________________________________________ 89
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 5<br />
1 Introduction<br />
The <strong>TPT</strong> User <strong>Guide</strong> is an introduction to using <strong>TPT</strong>. Beginning with an explanation of the<br />
contents of the main window, this document will introduce features of <strong>TPT</strong> step by step, to<br />
enable a user to model, execute and document their own tests using <strong>TPT</strong>.<br />
Please note this document is not intended to be a tutorial. Basic understanding of the tool’s<br />
fundamental concepts and techniques is required.<br />
1.1 Starting <strong>TPT</strong><br />
<strong>TPT</strong> is started by executing its program file named tpt.exe, which can be found at its<br />
installation location. Either call tpt.exe directly from the Windows Explorer (or shortcut) or<br />
start it from the windows command line or DOS shell.<br />
When using the command line, parameters may be used with the following syntax:<br />
tpt.exe [general options ...] [specific options…]<br />
General options can always be used, whereas specific options are only permitted if <strong>TPT</strong> is<br />
started in a particular mode by using the option –run (see below).<br />
1.1.1 General options<br />
-c configfile, --config configfile<br />
<strong>TPT</strong> saves global settings in a configuration file. By default, this file is assumed to be located at<br />
/<strong>TPT</strong>/tpt.config, where represents the user’s local application<br />
data folder (e.g. C:\Documents and Settings\username\Local<br />
Settings\Application Data). This option allows you to specify an alternative<br />
configuration file, which may be useful if, for example, several users need to share common<br />
configurations.<br />
-h, --help<br />
Displays a help text on the console that explains all command line options.
Page 6 <strong>TPT</strong> User’s <strong>Guide</strong><br />
--nosplash<br />
Suppresses the splash screen that is displayed while <strong>TPT</strong> starts up.<br />
--plugins plugin1,plugin2,…, pluginN<br />
In order to be able to dynamically integrate with area or domain-specific tools and its features,<br />
<strong>TPT</strong> comes with a flexible plug-in architecture. All plug-ins are installed to a <strong>TPT</strong> subdirectory<br />
named \tptplugins. By default, all plug-ins are loaded automatically by <strong>TPT</strong>. Use this<br />
option, if you want to specify directly, which plug-ins are to be loaded on startup. Multiple<br />
plug-ins may be specified using a comma-separated list.<br />
filename<br />
If tpt.exe is started without using the option --run, a filename may optionally be stated<br />
as the command line’s last parameter. If the filename exists and is recognized as a valid <strong>TPT</strong><br />
model or data file, it will be loaded after start-up.<br />
1.1.2 Specific options of the execution<br />
--run build <strong>TPT</strong>-file-name execution-configuration<br />
Starts the build and execution process of the specified <strong>TPT</strong>-file-name and executes the<br />
execution-configuration specified. For the execution configuration please refer to<br />
section 10.2.<br />
1.1.3 Specific options of the assessment engine<br />
--run assessmentengine [(-v|--var) vardef] ... scriptfile1<br />
scriptfile2 ...<br />
Starts the assessment engine and executes the scripts scriptfile1, scriptfile2 etc. one<br />
after the other. If one or more variables have been defined with the option -v or –var, these<br />
definitions are also passed to the scripts.<br />
For example, if the argument --var foo=bar has been stated, the variable foo is<br />
automatically defined within the script and has the value bar.<br />
--run assessmentengine –-convert tptfile1 tptfile2 ...<br />
Translates all assessment scripts found within the given <strong>TPT</strong> model file from the old assessment<br />
language, used in early versions of <strong>TPT</strong>, into the new Python-based assessment language, that<br />
hasen introduced with version 2.0 of <strong>TPT</strong>.<br />
1.1.4 Specific options for the data converter<br />
--run dataconverter inputfile [(-I|--Inputtype) inputtype]<br />
outputfile [(-O|--Outputtype) outputtype]<br />
This option provides a command line interface that allows conversion of data files (test records,<br />
measurements…) from one supported file format to another. The input file’s and output file’s<br />
type may explicitly be determined with the two additional options Inputtype and Outputtype.<br />
Allowed types are: tptbin, mat or csv. If the files’ types are not explicitly given, <strong>TPT</strong> tries to<br />
interpret the type from the file’s extension (.tptbin, .mat or .csv).<br />
Please note that unequally sampled data cannot be saved as .tptbin format. This means that unequally<br />
read data read from e.g. .csv will result in empty data block in the .tptbin-format.<br />
1.1.5 Specific options for the log server<br />
--run logger<br />
This starts the log server instead of the <strong>TPT</strong> GUI. In order to aid debugging of software defects<br />
while working with <strong>TPT</strong>, the log server’s entries provide an insight into internal operations and<br />
their result.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 7<br />
1.1.6 Specific options for the report editor<br />
--run reporteditor<br />
Starts the report template editor from the command line. It allows creation and editing of<br />
report templates.<br />
1.1.7 Specific options for the report generator<br />
--run report inputfile templatefile outputdirectory referencefile<br />
Starts the <strong>TPT</strong> report generator from the command line. All signals of the given input will be<br />
read in be used for the report generation. The template file defines the report’s desired layout<br />
and content. Resulting documents and dependent files are written to the output directory once<br />
report generation is complete. If you provide a reference file, that contains a set of signals from<br />
a previous test execution or assessment, the generated report will automatically include a<br />
signal comparison for all signals.<br />
1.1.8 Further options<br />
The following options are general options that are not commonly used by <strong>TPT</strong> users.<br />
--startverbose<br />
Using this option causes <strong>TPT</strong> to output additional trace information while it starts up. These<br />
outputs include start parameters and paths. This option is especially helpful, when problems<br />
are encountered during <strong>TPT</strong>’s start-up procedure .<br />
-vm-xxxxx<br />
This option may be used for specifying additional parameters which are specific to the Java<br />
Virtual Machine. These parameters allow setting and fine-tuning a Java VM’s memory<br />
consumption and different modes of operation. They always start with the prefix -vm and will<br />
be propagated and applied to the underlying Java VM.<br />
Example: -vm-Xmx250m sets the maximum heap size of the Java VM to 250MB.<br />
--Xea <br />
Enables internal assertion checking in order to detect assertion violations during <strong>TPT</strong> runtime.<br />
This mode of operation is only required for the debugging of <strong>TPT</strong>.<br />
1.2 The main window<br />
After <strong>TPT</strong> has loaded, it displays a window containing a menu bar, a tool bar and an empty<br />
workspace. Opening a <strong>TPT</strong> model file will show its contents within a multiple-segmented frame<br />
of the workspace. The following section gives a brief introduction to these elements.
Page 8 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Testlet browser<br />
Scenario browser<br />
Documentation<br />
window<br />
1.2.1 The testlet browser<br />
Editor window<br />
Figure 1: <strong>TPT</strong>'s program window<br />
The area in the upper left corner of the main window (see Figure 1) is called the testlet browser.<br />
It depicts the test model’s testlet hierarchy as a tree structure and provides a set of operations<br />
on testlets, which are described in Organisation of testlets.<br />
1.2.2 The scenario browser<br />
The scenario browser displays the hierarchical representation of all scenarios a testlet owns,<br />
(see Figure 1) and the scenario tree of the currently selected testlet. Furthermore, the scenario<br />
browser provides several options for modifying the scenario hierarchy, such as creating new<br />
scenarios and deleting existing ones. The scenario browser allows a user to build a complex<br />
hierarchy of a large number of scenarios. Please see section 7 (Organisation of testlets) for a<br />
more detailed description of the scenario browser.<br />
1.2.3 The editor window<br />
While the browsers for testlets and scenarios provide access to the structure of testlets and<br />
scenarios, the editor area on the right (see Figure 1) is used to access and edit different aspects<br />
of smaller elements. It thus has several editor tabs like “content”, “signature“ and “assessment”.<br />
Details on how to define a test case’s signature and create test assessments can be found in<br />
sections 3, 4, 5 and Definition of Scenarios .<br />
1.2.4 The documentation window<br />
A simple text area below the scenario browser (see Figure 1) enables a user to create and edit a<br />
short description text, which is stored with the currently selected scenario. Read more on how<br />
to document scenarios and scenario groups in section 7.10 (Commenting scenarios/scenario<br />
groups).
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 9<br />
1.2.5 Menu and tool bar<br />
<strong>TPT</strong> comes with a menu and tool bar (see Figure 1), allowing a fast and intuitive access to<br />
frequently used options and features. The following section introduces some of these options.<br />
1.3 Creating saving and loading test models<br />
1.4 Exit <strong>TPT</strong><br />
To create a new test model, one may choose File | New from the menu bar or type<br />
Ctrl+N). After modelling some tests, one may want to save the work by choosing the menu<br />
item File | Save or by using the corresponding hotkey Ctrl+S. When a test model is<br />
saved for the first time or menu item File | Save as... is used, a location and a<br />
filename will be requested.<br />
Load a project by using the menu item File | Open or by typing this option’s associated<br />
shortcut key (Ctrl+O).As for other commonly used menu options, you can find corresponding<br />
items on the tool bar, that are additional controls for activating the same features<br />
Each <strong>TPT</strong> test model is saved to a single XML <strong>TPT</strong> model file, and usually suffixed with “.tpt”.<br />
One can exit <strong>TPT</strong> by clicking the x-shaped “Close” symbol of its application window, by<br />
selecting the menu item File | Exit, or by using the shortcut key Ctrl+Q. If the loaded<br />
test model has been changed since the last save operation, a confirmation dialogue will ask the<br />
user whether to save these changes or discard them.<br />
1.5 View options<br />
To zoom the <strong>TPT</strong>-model, browse forward and backwards, use a layout mesh grid or change the<br />
tool-bar icon size one may choose View | ... .
Page 10 <strong>TPT</strong> User’s <strong>Guide</strong><br />
2 Declaration of Channels, Parameters and<br />
Constants<br />
2.1 Introduction<br />
Each test model has an interface, which is defined by a set of observation and stimulation<br />
channels (in the case of single testlets, this is also referred to as the “signature” of the testlet).<br />
Besides interface channels, <strong>TPT</strong> provides for additional channel types, constants and<br />
parameters for supporting different test functions, like measuring signals and assessing test<br />
results.<br />
All channels, constants and parameters must be declared before they can be used in a test<br />
model. This is done in the declaration editor.<br />
2.2 The declaration<br />
The declaration editor (see Figure 2) can be opened via the menu bar by selecting View |<br />
Declarations or by the associated hotkey, which is Ctrl+D. A table is displayed which<br />
may contain different channel types, constants and parameters. Each column describes<br />
attributes associated with a declaration, like a name, a data type and a description.<br />
The entries can be sorted by any of the column categories. The default is the name column, but<br />
any other may be selected by clicking on the heading in the table header row.<br />
There is also a collapsible panel above the table which allows a user to filter declarations based<br />
their type (channel, constant …), name or description.<br />
Entries may be edited by clicking on them. New declarations are appended in the area below<br />
the table.<br />
The declaration editor can be closed using the “Close” button or by using the close icon at the<br />
top-right of the window.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 11<br />
2.3 Creating a declaration<br />
Figure 2: The declaration editor<br />
In order to create a new table entry one has to empty the editor’s input fields located right<br />
below the table by clicking the button labelled “Clear” and then fill these fields with the values,<br />
that describe the new entry:<br />
Type<br />
This drop-down list allows a user to choose which type of declaration is to be created.<br />
Name<br />
This text input field expects a unique string for the new declaration which must follow the<br />
restrictions imposed by <strong>TPT</strong>.<br />
Location<br />
This text field takes an optional URI that may contain additional information about a<br />
declaration’s external location (if it has one). The exact semantics of an “external location” are<br />
specific to different test execution environments.<br />
Group<br />
This text field takes an optional arbitrary group name, which may be used to easily categorize<br />
declarations according to the user’s requirements.<br />
Data Type<br />
This drop-down list requires a data type to be chosen for the new declaration.<br />
Value<br />
This text field expects a default value to be entered for the declaration. Naturally this value has<br />
to be compatible with the selected data type.<br />
Volatile<br />
This check box is only available for channels. When selected, the channel to be created will be<br />
“volatile”, which refers to the behaviour of the values of the channel over time. While a value<br />
that has been written to a non-volatile channel at a certain point in time persists to later times,<br />
a volatile channel discards its current value when time increments to the next ‘instant’.
Page 12 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Record<br />
This check box is applicable to channels, measurements and assessment variables. When<br />
selected, the values of the object declared will be recorded and stored during a test execution.<br />
Description<br />
This allows an arbitrary text description field to be applied to the object.<br />
Once all mandatory settings and attribute values have been entered correctly, the “Apply”<br />
button will be enabled which adds the newly created declaration to the table.<br />
2.4 Changing a declaration<br />
Any attribute of a declaration may be changed except its type. In other words, a channel cannot<br />
be converted to be a constant and vice versa. The editor panel below the table may be used to<br />
change the attribute values of the declaration selected in the table. The changes will be applied<br />
after being confirmed by the “Apply” button.<br />
2.5 Deleting a declaration<br />
Declarations may be deleted by selecting them in the overview table and then using the<br />
“Delete” button.<br />
2.6 Declaration of Parameters<br />
Parameters can be used within the tests. Parameters are similar to constants but can be<br />
modified for each test run. Parameters can be of different types. Local parameters are only<br />
visible within <strong>TPT</strong>. Read-only parameters are read from the simulation environment but cannot<br />
be changed. Exchange parameters are exchanged between <strong>TPT</strong> and the simulation<br />
environment. Please note that further settings at the execution platform may be necessary.<br />
Figure 3: Parameter declaration
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 13<br />
3 Signature of a Testlet<br />
3.1 Introduction<br />
Each testlet has a signature which consists of stimulation, observation and local channels.<br />
Channels may be assigned using the “signature” tab from the main window. The currently<br />
selected testlet is represented by a grey rectangle and channels are displayed as arrow-headed<br />
lines. Stimulation channels are shown on the right of the testlet and observation channels on<br />
the left, local channels are shown within the testlet rectangle (see Figure 4).<br />
The following sections describe how to create or alter the signature of a testlet.<br />
3.2 Assigning observation channels<br />
Figure 4: The testlet signature<br />
A new observation channel may be added to a testlet’s signature by moving the mouse over<br />
the area to the left of the testlet and clicking the left mouse button. A pop-up window appears<br />
which contains two list boxes, one on the left and one on the right side of the dialog box. The<br />
list on the left side shows all channels that are known to the system, but are not yet assigned to<br />
the current testlet’s signature (see Figure 5). If there are no channels that might be assigned to<br />
the testlet, this list will be empty.<br />
If channels are available they can be added to, or removed from the set of observation channels<br />
on the right hand side.
Page 14 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Channels will appear in the signature window when either the “Apply” or “OK” button is used.<br />
If an observation channel that is to be assigned has already been set as a stimulation channel or local<br />
channel, a pop-up window will open up, pointing out this conflict. The channel can be reassigned to its<br />
new role or left as it is.<br />
3.3 Assigning stimulation channels<br />
Figure 5: Assigning observation channels<br />
Assigning stimulation channels is done similarly to the assignment of observation channels<br />
(see section 13 Assigning observation channels), other than the pop-up menu opens when<br />
clicking on the right hand area of the signature box.<br />
3.4 Assigning local channels<br />
The assignment of local channel uses the same method. The pop-up window will be opened<br />
when clicking within the signature box.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 15<br />
4 Graphical Modelling of a Testlet<br />
4.1 Introduction<br />
The following sections describe the features used to build a test model, i.e. how to construct<br />
and edit a time partition automaton using the graphical elements. These elements are “initial<br />
nodes”, “final nodes”, “states”, “transitions”, “junctions” and ”parallelisation separators”.<br />
To start modelling a testlet, select it in the testlet browser. The “content” tab of the main<br />
window will then show three option buttons to select either the “time partitioning” ,<br />
“reference” or the “direct definition” method. Select “time partitioning” (see Figure 6). Now you<br />
can start to construct the process automaton that belongs to the testlet.<br />
Testlets in the testlet browser, that have not yet been modelled, are marked with a grey question mark<br />
which is placed next to the testlet name. Testlets which have been modelled using the “time partition”<br />
method are shown with a grey symbol that resembles an arrow, while three parallel horizontal lines<br />
indicate a testlet that has been used by the “direct definition” method.<br />
Note: Automatons may only be modelled or changed if no scenario is selected in the scenario browser, i.e.<br />
only if the current testlet located in the scenario browser root node is marked there! The reason for this is<br />
that one and the same <strong>TPT</strong> automaton is the basis for all assigned scenarios.
Page 16 <strong>TPT</strong> User’s <strong>Guide</strong><br />
4.2 Creating initial node elements<br />
Figure 6: Selecting the modelling variant<br />
To create an initial node select Insert | Junction in the menu, use the corresponding<br />
symbol in the toolbar or the appropriate hotkey F5. Left-click into the “content” tab work area<br />
where you want to create the new initial node. It will be represented by a filled black circle (see<br />
Figure 7).
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 17<br />
initial node<br />
junction<br />
Figure 7: Elements of the graphical testlet model<br />
final node<br />
<strong>TPT</strong> junctions and initial nodes differ in that initial nodes are not linked to incoming transitions. Thus,<br />
there is no specific symbol or menu entry for initial node elements.<br />
4.3 Creating final node elements<br />
To create a final node select Insert | Final from the menu or use the assigned hotkey<br />
F3. Place the final node in the “content” tab by left-clicking at the desired position. A final node<br />
is represented by the silhouette of a black circle (see Figure 7).<br />
4.4 Creating state elements<br />
To create a state select Insert | State or use the assigned hotkey F2. Left-click in the<br />
“content” tab work area where the state symbol is to be placed. A state is represented by a<br />
yellow or green filled rectangle, depending on whether it contains only simple definitions<br />
(yellow) or another automaton (green). The name of the testlet that is assigned to the state<br />
appears within the rectangle (see Figure 8).<br />
The creation of a state corresponds to the creation of a new testlet. Therefore every state also appears as a<br />
testlet in the testlet browser. This new testlet or state also has to be modelled, either as a sub-automaton<br />
with “time partitioning” or per “direct definition” by means of state equations.
Page 18 <strong>TPT</strong> User’s <strong>Guide</strong><br />
New state elements<br />
appear as testlet in testletbrowser<br />
State elements<br />
Figure 8: State elements<br />
4.5 Renaming states or testlets, respectively<br />
State elements<br />
A new state or testlet receives an automatically generated name during its creation (“testletxx”).<br />
Change the name by first selecting the testlet within the automaton or the testlet browser,<br />
then use F2 or left-click on the state symbol. After a slight delay a cursor appears within the<br />
symbol and the new name can by typed.<br />
To enter names that consist of multiple lines press ENTER to move the cursor to the next line,<br />
and SHIFT+ENTER to finish editing.<br />
4.6 Embedded testlets<br />
As mentioned previously a testlet is assigned to each state (which has been modelled with<br />
“time partition” or “direct definition”). The hierarchy of testlets is reflected in the testlet<br />
browser. To directly select a testlet shown within any of the tabbed work areas, click on the<br />
corresponding testlet’s entry in the testlet browser. You will immediately see the content of the<br />
selected testlet in the “content” tab of the main window, either in the form of an associated<br />
sub-automaton or as a set of equations.<br />
Alternatively, you may select the content of a testlet by double-clicking on the state assigned to<br />
it in the currently displayed automaton. If this testlet in turn is an automaton, this can be<br />
repeated until you encounter a testlet that has been modelled with definition equations. Such<br />
a testlet may not contain other testlets.<br />
The overall test model is finished only if all testlets are have been modelled completely and correctly. If<br />
the testlet browser still contains testlet nodes with grey question marks, the modelling of these testlets<br />
has not been completed.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 19<br />
4.7 Creating transitions<br />
To create a transition select the Insert | Transition or use the assigned hotkey F4.<br />
Then, in the “content” tab work area click once on the initial node, junction or state, from which<br />
the transition should start. Click again on the final node, junction or state at which the<br />
transition should end.<br />
Transitions themselves may neither be copied nor cut individually, since they are linked to source and<br />
target objects. See Selecting, cutting, copying, inserting and copying as an image for further editing<br />
options.<br />
If a transition is created, it is displayed as a straight arrow. However, it is also possible to give the transition<br />
the form of a Bezier curve (see Shaping transitions graphically).<br />
4.8 Establishing transition specifications<br />
Every transition has one or more “transition specifications” assigned to it. Each transition<br />
specification consists of a formal condition and action statements (see Figure 9). To define one<br />
or more transition specifications, double-click on a transition in the automaton. The transition<br />
editor opens, which shows the list of available transition specifications on the left side<br />
(“transition tree”) and formal conditions and actions on the right.<br />
To create a new transition specification, carry out the following steps, preferably in the given<br />
order:<br />
Creating a transition specification<br />
A new and empty transition specification is created by clicking the “Add New” button (see<br />
Figure 9).<br />
Entering a formal condition (optional)<br />
On the right-hand side of the transition editor, enter the desired transition condition into the<br />
text field (“formal condition”) (see Figure 9).<br />
Entering action statements (optional)<br />
On the right-hand side of the transition editor, enter the desired actions into the text field<br />
“actions” (see Figure 9).<br />
Transition specifications may be deleted by selecting the corresponding transition specifications in the<br />
transition editor and then using the “delete” button.
Page 20 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Four different transition<br />
specifications<br />
Named transition<br />
4.9 Naming or renaming transitions<br />
Transition editor<br />
Figure 9: Establishing a transition specification<br />
Transitions that have just been created will initially have no label. Once a transition has been<br />
given a label, it will also appear in the automaton. To set a new or change an existing label text,<br />
left-click on the desired transition and edit the text in turquoise label box.<br />
A transition’s label may be placed arbitrarily and independently of the transition’s position within the<br />
displayed automaton by using “drag & drop” (keep the left mouse button pressed on the transition label<br />
and move the mouse). In case, you are unclear about which transition owns which transition label, just<br />
select the symbol or the name in question. Both the transition symbol and its label will be highlighted.<br />
4.10 Shaping transitions graphically<br />
Transition symbols are not restricted to straight lines. Considering rather complex models it<br />
makes that transitions may also form curves to retain clarity in the graphical representation.<br />
Therefore <strong>TPT</strong> allows transition symbols to form Bezier curves.<br />
Adding a control point to a transition<br />
To add a new Bézier control point to a transition left-click and hold on the symbol. When the<br />
pointer is dragged away from the transition, a red Bézier control point appears beneath the<br />
pointer and follows it. The curve is updated as you change the control point’s position, until the<br />
mouse button is released.<br />
Further control points can be added, enabling a user to create almost any desired curve (see<br />
Figure 10).
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 21<br />
Figure 10: Forming transitions graphically<br />
Moving control points of a transition<br />
To change the path of a selected curved transition click and drag the control point to its new<br />
position.<br />
Removing control points from a transition<br />
To remove one of its control points, select the transition with the left mouse button, click on<br />
the control point that is to be removed and then delete using Edit | Delete or the DEL<br />
key.<br />
The two control points at the beginning and the end of the transition arrow may not be moved or<br />
deleted.<br />
4.11 Reconnecting transitions<br />
Transitions have to be connected to both a source and a target object to be valid. It is not<br />
possible to “disconnect” an individual transition and to reinsert it at another point.<br />
However, the source object and the target object that belongs to a transition may still be<br />
exchanged once a transition has been created.<br />
Changing the source object of a transition<br />
Select the transition that should be reconnected. The transition and all its control points will<br />
then be displayed in blue. Now select the control point (which thereby turns red), that is next to<br />
the object from where the transition starts (an initial node, junction or state). Drag the mouse<br />
pointer to the new source object. Release the mouse button to complete connection to the<br />
new source object.<br />
Changing the target object of a transition<br />
This is the same as for changing source object: click and drag the arrowhead to the new target<br />
object, then release.
Page 22 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Reconnecting the end points of a transition requires exact mouse positioning. If the original source or<br />
target object is suddenly selected or if a new Bezier control point is suddenly created, you most likely have<br />
missed the exact position of the transition’s start or end point.<br />
4.12 Creating junctions<br />
To create a junction use Insert | Junction or the assigned hotkey F5. Left-click at the<br />
desired position within the automaton in order to create it. A junction is represented by a solid<br />
black circle.<br />
All editing options described in Selecting, cutting, copying, inserting and copying as an image are<br />
applicable to junctions. Note, that deleting a junction will delete all its incoming and outgoing transitions.<br />
4.13 Parallel automatons<br />
A testlet may consist of any number of parallel automatons. In the automaton view these are<br />
displayed as work areas separated by horizontal lines.<br />
To create a dividing line use Insert | Junction or the assigned hotkey F1. Go to the<br />
“content” tab and left-click where the line is to be positioned (see Figure 11).<br />
Ensure that no automaton element crosses a horizontal separator line.<br />
You may later move the dividing line up or down by selecting and dragging it.<br />
4.14 Creating textual notes<br />
Figure 11: Parallel automatons<br />
Textual notes are used solely for documenting an automaton or its elements.<br />
Separation line<br />
Separation line
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 23<br />
To create a text node use Insert | Text or the hotkey F7. Then left-click at the position at<br />
which you want to create the new note. It is edited by clicking inside the text box or using F2.<br />
All editing features described in Selecting, cutting, copying, inserting and copying as an image are also<br />
applicable to text nodes.<br />
4.15 Selecting, cutting, copying, inserting and copying as an image<br />
Selecting individual automaton elements<br />
Individual elements of an automaton (initial and final nodes, junctions, states, text nodes and<br />
transitions) may be selected by clicking on the element using the left mouse button. Its colour<br />
will change to blue as the element is selected.<br />
Selecting multiple automaton elements<br />
Multiple elements can be selected by clicking and dragging diagonally in the work area to<br />
select elements within the rectangle.<br />
Alternatively holding the Ctrl key will allow cumulative selection of elements by left-clicking<br />
on them.<br />
A transition will automatically be included in a selection, if both of its connected elements have been<br />
selected.<br />
In order to select all elements of an automaton (in other words: the entire automaton), one may use<br />
Edit | Select All from the menu or by using the corresponding hotkey Ctrl+A.<br />
Clearing a selection<br />
In order to clear a selection simply left-click on an empty area of the automaton.<br />
Moving automaton elements<br />
The position of a selected automaton element may be changed by dragging it with the mouse.<br />
This also works on a compound selection of multiple automaton elements, in which case all<br />
selected elements will be moved together.<br />
A transition may not be moved independently as its position is linked to the positions of the elements, it<br />
connects.<br />
Deleting automaton elements<br />
Select a single or several automaton elements and use the corresponding menu item (Edit |<br />
Delete) or its assigned hotkey Del.<br />
When deleting automaton elements, all their incoming and outgoing transitions, will be deleted, too,<br />
since a transition must always be connected to both a source and a target element.<br />
When deleting a state or a testlet all its embedded elements will be deleted as well (see Embedded<br />
testlets).<br />
Cutting out selected automaton elements<br />
Select a single or multiple automaton elements and choose Edit | Delete or hotkey Ctrl+X. All selected<br />
elements will be copied to the system clipboard and deleted from the automaton. They may be pasted<br />
into other automatons of the same or even a different file.<br />
A transition may not be cut out independently of the elements it connects. Both the elements have to be<br />
cut out at the same time, in order to cut the transition out, too. Otherwise, the transition will not be<br />
transferred to the system clipboard, but deleted.
Page 24 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Copying automaton elements<br />
Select a single or multiple elements from an automaton and use the menu item Edit | Copy or its<br />
corresponding hotkey Ctrl+C. The selected elements are copied to the system clipboard and may<br />
subsequently be pasted into other automatons of the same file or a different file.<br />
Transitions may only be copied along with their source and target element.<br />
Inserting automaton elements from the clipboard<br />
Elements of an automaton, that have been transferred to the clipboard as a result of prior copy<br />
or cut operations, may be pasted as normal using Edit | Paste or hotkey Ctrl+V. All<br />
pasted elements will be selected after insertion, so that they may be moved to a desired<br />
position within the automaton.<br />
Automaton elements, that have been stored to the system clipboard, will reside there,<br />
unaffected of subsequent paste operations, until they are overwritten due to a copy or cut operation. As<br />
<strong>TPT</strong> makes use of the operating system’s clipboard, data copied or cut out in other applications may<br />
replace the contents transferred to it by <strong>TPT</strong> just as well.<br />
Copying automaton elements as an image to the clipboard<br />
Select the automaton elements which you want to copy as an image to the clipboard and<br />
choose Edit | Copy Image. The resulting image will be stored to the system clipboard<br />
and may be imported to any image processing application, using the common “insert from<br />
clipboard” feature (usually called “paste” and accessible using Ctrl+V).<br />
In case, the “copy image” feature is triggered on an empty selection, which means, that no automaton<br />
elements have been selected, <strong>TPT</strong> will create an image of the entire automaton that is currently displayed.<br />
<strong>TPT</strong> offers various options which influence the look of the image. Please refer to Exporting automatons or<br />
automaton fragments into an image file , in order to see which options are available and how they are<br />
used.<br />
4.16 Saving automaton fragments<br />
<strong>TPT</strong> provides the possibility of saving automaton fragments to a new <strong>TPT</strong> file, allowing them to<br />
be reused in any other test model.<br />
Select all the automaton elements which you want to be exported and use File | Save<br />
Selection As. You will be prompted to choose a location and a name for the new file.<br />
When saving automaton elements, all information directly linked to them, such as scenarios, signatures,<br />
channels and constants, sub-automatons and assessment statements will be saved as well.<br />
4.17 Importing <strong>TPT</strong> automaton fragments<br />
It has already been explained how automaton elements can be pasted from the clipboard.<br />
Importing elements or fragments of an automaton from a file is just as easy. Select the menu<br />
item Insert | File Content and chose the <strong>TPT</strong> file to be imported. The file’s contents<br />
will be imported to the currently selected automaton.<br />
4.18 Exporting automatons or automaton fragments into an image file<br />
If you want to generate an image of an automaton or automaton fragment, select the elements<br />
you wish to export as an image and choose File | Save Image As from the main menu.<br />
If the “content” tab contains no selected elements an image will be created showing the<br />
automaton as a whole.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 25<br />
You will be prompted to choose a location and a name for the image file to save. It will be<br />
encoded using the PNG image file format.<br />
You may determine the resolution of the created image using the menu item “Image<br />
Resolution” from the “Options” menu (Options | Image Resolution).<br />
4.19 Controlling quality and size of the automaton view<br />
The “content” tab either shows the automaton currently being edited or a scenario which has<br />
been selected in the scenario browser. Because both can be quite large, <strong>TPT</strong> provides a vertical<br />
and a horizontal scrollbar and allows changing the zoom factor of the display area, in order to<br />
increase or reduce the size needed by a single automaton element.<br />
Another feature, that allows controlling the visual appearance of automatons, is the “anti<br />
aliasing”. If this feature has been enabled using the menu item Options | Smooth Lines<br />
and Text, all elements of an automaton including labels will be “smoothed” for display.<br />
Furthermore, you may enable the “auto-scroll” feature (Options | Scroll<br />
Automatically), which will cause the display area to scroll automatically if you move<br />
automaton elements to the edge of the displayed area.<br />
4.20 Compiling on the fly<br />
During test modelling the model is compiled and shows errors if the model has compilation<br />
errors. The errors of model objects are marked in red as shown in<br />
Figure 12. The tooltip shows the respective error message when moving the mouse to the error<br />
marker.<br />
Figure 12: Compilation error<br />
The process of compilation usually updates automatically. Nevertheless the compilation can be<br />
initiated actively (cf. Figure 13)<br />
Figure 13: Refresh compilation
Page 26 <strong>TPT</strong> User’s <strong>Guide</strong><br />
5 Modelling a Testlet by “Direct Definition”<br />
5.1 Introduction<br />
While the previous section (see Graphical Modelling of a Testlet) dealt with modelling testlets<br />
by means of process automatons, the following sections will introduce the second method<br />
called “direct definition”.<br />
To start modelling a testlet, select it in the testlet browser. The “content” tab of the main<br />
window will then show three option buttons to select either the “time partition”, “reference” or<br />
the “direct definition” method. Select “direct definition”. The work area will be replaced by a<br />
new panel, which allows creation of a “direct definition testlet” (see Figure 14).<br />
Every testlet that is specified using the “direct definition” method consists of an ordered list of<br />
equations or a signal definition: one for every stimulation or local channel. These equations are<br />
listed in a table view, which shows the target channel of each equation in the left column and<br />
the associated expression in the right-hand column.<br />
When a testlet model is created for the first time using “direct definition”, the table view will be<br />
filled using the add button. Only the right-most column, containing each equation’s expression<br />
will be left empty and needs to be completed.<br />
A preview for the generated definition can be seen in the lower part of the window. More than<br />
one signal can be displayed at the time by selecting more than one channels.<br />
The definition of each equation’s expression has to be repeated for every scenario of the testlet.<br />
This procedure will be explained in detail in the next section.<br />
Testlets modelled by means of the “direct definition” method may not contain any further testlets and can<br />
therefore always be found at the terminal end of any branch contained in the testlet hierarchy.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 27<br />
5.2 Defining Equations<br />
add channel<br />
Definition equation<br />
Signal editor window<br />
Figure 14: Modelling by means of "direct definitions"<br />
Before the equations of a testlet of type “direct definition” can be entered, at least one scenario<br />
must be associated with the testlet. If no scenario is defined for the testlet, please create one<br />
(see Definition of Scenarios). Additionally, the signature of the testlet should contain at least<br />
one stimulation channel or local channel (see section 133: Signature of a Testlet).<br />
To enter the equations of a scenario, select the scenario in the scenario browser. The “content”<br />
tab will then display the table of equations for that scenario (see section 5: Modelling a Testlet<br />
by “Direct Definition”).<br />
Signals, which you want to assign to a channel, can also be modelled with the signal editor (see Defining<br />
signals).<br />
A function wizard exists to aid the channel definitions (cf. section 13).<br />
When entering an expression, Ctrl+Space opens a popup that lists all channels that are available to<br />
the expression. Using the Enter key on a channel will import it into the expression at the current cursor<br />
position.<br />
5.3 Changing the order of definition equations<br />
The equations are evaluated in from top to bottom, thus the order is relevant. They may be<br />
moved by drag and drop the channel to the new position. (see Figure 14).<br />
In former versions of <strong>TPT</strong> it was possible to change the order of definition equations within the testlet for<br />
every scenario individually. This is not possible anymore in the release 3.1 and may change the semantics<br />
of former versions of <strong>TPT</strong>-files. These direct definitions must be checked manually in order to avoid<br />
unexpected behavior when executing earlier versions of <strong>TPT</strong>-files with <strong>TPT</strong> 3.1 and higher.
Page 28 <strong>TPT</strong> User’s <strong>Guide</strong><br />
5.4 Defining signals<br />
Signals can be defined graphically by using the signal editor (see Figure 15). Signal sample<br />
points are created by double clicking in the signal editor window after selection of “Create<br />
Signal”. The Points may be modified graphically by drag and drop or by using the sample point<br />
table that can be found in the editor tool-bar.<br />
Signal specifications may also be imported from external data. The import file format must<br />
have a certain format. This is .tptbin, MATLAB .mat, csv, mdf (dat), as well as the <strong>TPT</strong>-formats<br />
trec and tptbin. The Provetec TA file-formats (.hdr, .bin) is supported as well.<br />
Please note that unequally sampled data cannot be saved as .tptbin format. This means that unequally<br />
read data read from e.g. .csv will result in empty data block when saved as the .tptbin-format.<br />
MATLAB .mat-file<br />
The .mat file must contain the signal-vector(s) as well as a scalar variable named “StepSize”,<br />
which represents the sample time [s]. Please note that the signal must be uniformly sampled<br />
and the option “-v6” in MATLAB may be used.<br />
CSV<br />
The CSV file must contain a time column and at least one signal column. The first row of the file<br />
denotes the files’ header, containing a “time” label in the first column and the name of each<br />
signal in the subsequent columns. Each column must be separated by a semicolon, a comma or<br />
whitespaces (including tab stop; see example).<br />
time light_intentsity oscillation<br />
0.002000 0.0 0.0<br />
0.003000 0.2 0.0<br />
Figure 15: Signal editor
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 29<br />
6 Definition of Scenarios<br />
6.1 Introduction<br />
Each testlet consists of a number of scenarios. For “direct definition” testlets each scenario is<br />
just defined by an instance of the definition equations (definition variant). The next 3 sections<br />
will describe how a valid scenario should be defined for “time partition” testlets. The following<br />
assumes that you have already used the testlet browser to select the “time partition” type of<br />
the testlet for which you want to model different scenarios.<br />
6.2 “Time Partition” scenarios<br />
Since an automaton represents each testlet of the “time partition” type, a scenario within a<br />
testlet is only valid if an instance of the automaton is allocated to each scenario (see Figure 16).<br />
This means one model variant of the automaton has been selected. The model of the<br />
automaton is realised if the following conditions have been fulfilled:<br />
• If there are multiple possible paths in the automatons, one specific path must be<br />
selected<br />
• A specific state must be selected for all possible states in the automaton. Since all<br />
states are in turn testlets, this is equivalent to the selection of a specific scenario which<br />
is allocated to the testlet (state variation).<br />
• A transition specification from the set of transition specifications (which have been<br />
defined in the transition editor) must be selected for all transitions in the automatons.
Page 30 <strong>TPT</strong> User’s <strong>Guide</strong><br />
6.2.1 Selecting path variants<br />
Figure 16: Scenarios of a testlet<br />
Use the scenario browser to select the scenario you want to model. If no scenario exists, create<br />
one and select it. If there is a path variation in your automaton the whole automaton will be<br />
greyed-out until a specific path has been selected. Left-click on the transitions on the path you<br />
want for the current scenario. All automaton elements on this path will now be displayed in<br />
their original colours again (see Figure 17).<br />
You will find that it is not possible to select two alternating paths in the same scenario. If you<br />
choose one alternative, the other will automatically be greyed-out.<br />
Once a path for the current scenario has been defined in the automaton, the next step is to<br />
select the state variants as described in the following section.<br />
If there are no path variations in the automaton, the only possible path will already be selected<br />
automatically.<br />
You can use another left-click to remove a transition from the path at any time.<br />
6.2.2 Selecting state variants<br />
Figure 17: Selection of a path variant<br />
Once a specific path variant has been selected red question marks will appear under each state<br />
name. This means that no state variants have yet been allocated to these states. Right-click on
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 31<br />
each state and choose a specific state variant. The red question marks will now be replaced by<br />
the names of the chosen variants (see Figure 18).<br />
The pop-up menu always contains the menu item “undefine”. Selecting this item cancels an already<br />
existing state variant allocation.<br />
A state variant corresponds exactly to a scenario from the number of scenarios allocated to the testlet<br />
“behind” the state.<br />
6.2.3 Selecting transition specifications<br />
Figure 18: Selection of a state variant<br />
The selection of transition specifications is done at the same time as the selection of the state<br />
variants. Once a selection has been made two red question marks will appear under each<br />
transition name (if transitions are unnamed the question marks are located near the transition).<br />
Right-click on each transition arrow or transition name and choose a transition specification in<br />
the pop-up menu. The red question marks will now be replaced by the names of the chosen<br />
specification (see Figure 19).<br />
The pop-up menu always contains the menu item “undefine”. Selecting this item cancels an already<br />
existing allocation of a transition specification.<br />
Figure 19: Selection of a transition specification
Page 32 <strong>TPT</strong> User’s <strong>Guide</strong><br />
6.2.4 Add Unambiguous Variants<br />
If there is just one path variant in an automaton, it can be selected on the scenario level or<br />
scenario group level with the variant assignment being carried out on all subordinate scenarios<br />
in the latter case. Select scenario or scenario group and use Insert | Add Unambiguous<br />
Variants.<br />
The function can be used even if a path variation occurs in the automaton. If a path has already been<br />
selected in the respective scenario, the function will work as described above. If no path has been<br />
selected, the function will stop the allocation of default values at the first path variation.<br />
6.3 “Direct Definition” scenarios<br />
As previously described in Modelling a Testlet by “Direct Definition”, definition equations are<br />
determined at the scenario level, i.e. valid scenarios are already created with definition<br />
equations during the modelling phase. Since the modelling of “direct definition” testlets<br />
involves the definition of scenarios both have already been dealt with in section 5: Modelling a<br />
Testlet by “Direct Definition”.<br />
6.4 Parameter definition<br />
There are three types of parameter available. Local parameters are only visible in <strong>TPT</strong>. Readonly<br />
parameters are read from the test platform and cannot be changed in <strong>TPT</strong>. Exchange<br />
parameters are either read from the test platform or modified within <strong>TPT</strong> and written to the<br />
test platform before the test execution. Parameters can be altered for each scenario.<br />
Figure 20: Parameter definition tab<br />
Figure 21: Parameter read from the test platform<br />
When parameters are used in the scenario hierarchy the value might be overwritten by a<br />
scenario lower in the hierarchy. This enables the use of different parameter values for different<br />
scenarios.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 33<br />
The rules for defining parameters are as follows:<br />
Local<br />
parameter<br />
defined in<br />
<strong>TPT</strong><br />
scenarios<br />
defined by<br />
platform<br />
meaning<br />
yes (ignored) Local parameters are allowed if the parameter is defined<br />
for each scenario. A potential definition in the platform is<br />
not treated by <strong>TPT</strong>.<br />
no (ignored) Local parameters are allowed even if the parameter is not<br />
defined! In this case the default value (defined in<br />
declaration editor) is used. A potential definition in the<br />
platform is not treated by <strong>TPT</strong>.<br />
Read-Only (ignored) yes Read-only parameter will be read from platform. The<br />
default value is never used in this case.<br />
(ignored) no Error. The parameter must be defined in the platform to<br />
ensure consistency.<br />
Exchange yes yes The definition provided by <strong>TPT</strong> is used, i.e. the platform<br />
definition will be overwritten.<br />
yes no The definition provided by <strong>TPT</strong> is used and transmitted to<br />
the platform.<br />
no yes The definition provided by the platform is used and<br />
transmitted to <strong>TPT</strong>.<br />
no no The default value (defined in declaration editor) is used<br />
and transmitted to the platform.<br />
As a rule, the priority of parameter values is <strong>TPT</strong> > Platform > Default Values (from declaration<br />
editor). The objective is in general to have the same values for parameters for platform and test<br />
case. If this is not possible, an error is raised.<br />
Parameter can be defined as scalar parameter or as array parameter. Array parametersare<br />
defined as follows:<br />
Assume a parameter x having the values [1 3 5 7 9] this parameter is to be declared in the<br />
declaration editor similarly and can be accessed in direct definitions and transition definitions<br />
via x[index]. E.g. the value of x[1] is equal 3.<br />
6.4.1 Exchange Parameter with MATLAB<br />
The parameter exchange with the MATLAB platform is as follows. Generally the parameters are<br />
read from the MATLAB-Platform when a MATLAB-variable having the same name exists. To<br />
write parameters to MATLAB, the variable “tpt.matlab.paramstoworkspace” (see<br />
section 15.10.4: MATLAB platform configuration variables) is used and must be added to the<br />
test-run-script in the platform configuration (see Figure 22).
Page 34 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Figure 22: MATLAB - <strong>TPT</strong> parameter exchange
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 35<br />
7 Organisation of testlets<br />
7.1 Introduction and scenarios<br />
The natural organization of testlets and scenarios is hierarchical, depicted as a tree in the testlet<br />
or scenario browser. The possible organisational structures offered by the testlet and scenario<br />
browsers are discussed in the following chapter.<br />
7.2 Creation of testlets<br />
New testlets cannot be created in the testlet browser. Since a testlet represents a state in the<br />
automaton, new testlets appear in the testlet browser when a new state is created (see section<br />
4.4: Creating state elements).<br />
7.3 Deletion of testlets<br />
Testlets can be deleted directly from the testlet browser. Right- click on the name of the testlet<br />
and choose “Delete testlet” in the pop-up menu.<br />
Deleting a testlet in the testlet browser is the same as deleting the state element represented by this<br />
testlet. If a testlet is deleted in the testlet browser, the associated state element is also removed from the<br />
corresponding automaton and vice versa.<br />
Deleting a testlet (or state) implies the deletion of all embedded testlets (see section 4.6: Embedded<br />
testlets).<br />
7.4 Deletion of the content of a testlet<br />
It is also possible to delete just the content of a testlet, instead of deleting the testlet<br />
completely. Right-click on the name of the testlet and choose “Delete content” in the pop-up<br />
menu.
Page 36 <strong>TPT</strong> User’s <strong>Guide</strong><br />
All embedded testlets in the testlet (see section 4.6: Embedded testlets) are deleted, but the<br />
signature and assessment statements are retained.<br />
Deleting the content of a testlet (or state) implies the deletion of all embedded testlets.<br />
7.5 Renaming testlets<br />
In addition to being able to rename testlets or states from the automaton view (see section 4.5:<br />
Renaming states or testlets, respectively), they may also be renamed from the testlet browser<br />
by selecting then left-clicking again, after a slight pause, to enter the edit mode.<br />
7.6 Creation of scenarios / scenario groups<br />
A complex hierarchy of scenarios or scenario groups may be assigned to each testlet in the<br />
scenario browser. Similar to folders in a file system, scenario groups serve the purpose of<br />
grouping scenarios.<br />
To create a scenario hierarchy select a testlet in the testlet browser. The name of the selected<br />
testlet should appear in the scenario browser and the default scenario group with the name “all<br />
scenarios” should appear underneath. You can now use this group (which is always present and<br />
contains all existing scenarios and scenario groups) to define other scenarios and groups to any<br />
nesting depth (see Figure 23). The following methods to create scenarios and groups are<br />
available in a pop-up menu:<br />
Right-click on a scenario group<br />
Pop-up menu entry Function<br />
“Add scenario into this group” A new scenario is created in the selected group<br />
“Add scenario group into this group“ A new group is created in the selected group<br />
“Insert scenario above this item“ A new scenario is inserted above the selected group (not<br />
“Insert scenario group above this<br />
item“<br />
selectable for the scenario group at the top level)<br />
A new group is inserted above the selected group (not<br />
selectable for the scenario group at the top level)<br />
Right-click on a scenario<br />
Pop-up menu entry Function<br />
“Insert scenario above this item“ A new scenario is inserted above the selected scenario<br />
“Insert scenario group above this A new scenario group is inserted above the selected scenario<br />
item“
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 37<br />
_<br />
Figure 23: The scenario hierarchy<br />
New scenarios are given the default name “scenario“; scenario groups are given the default name “group”<br />
Scenarios or scenario groups can be deleted (see Deleting scenarios / scenario groups), moved (see<br />
section 7.8: (Re)naming scenarios/scenario groups) or renamed (see section 7.8) whenever required<br />
Each scenario that is created must of course also be “defined“. This process is described in detail in<br />
Definition of Scenarios “Definition of Scenarios”.<br />
7.7 Deleting scenarios / scenario groups<br />
Scenarios or scenario groups can be deleted by right-clicking on the relevant name in the<br />
scenario browser and then choosing “delete” in the pop-up menu (see Figure 23). If you delete<br />
a scenario group, all the subordinate groups and scenarios are also deleted.<br />
7.8 (Re)naming scenarios/scenario groups<br />
There are two methods to rename an existing scenario or scenario group. Either right-click on<br />
the relevant element in the scenario browser select “rename” in the pop-up menu (see Figure<br />
23) or left-click, pause, left-click on the name of the element to be renamed.<br />
7.9 Moving scenarios<br />
You can change the order of scenarios and scenario groups within one scenario group by<br />
moving them individually. Right-click on the desired element and select “Move scenario<br />
(group) up” or “Move scenario (group) down”. The selected scenario or scenario group should<br />
then be moved upwards or downwards by one position. The scenario element(s) may also be<br />
moved using drag-and-drop.
Page 38 <strong>TPT</strong> User’s <strong>Guide</strong><br />
7.10 Commenting scenarios/scenario groups<br />
Individual scenarios or scenario groups can be commented, just like testlets. To do this, select<br />
the testlet that belongs to the scenarios to be commented in the scenario browser to choose.<br />
Then enter comments in the documentation window (see section 1.2.4: The documentation<br />
window).<br />
Scenario groups can be commented in exactly the same way.<br />
Right-clicking into the description window will open a popup menu which contains the option<br />
“show inherited descriptions”. This will display the inherited description of the selected test<br />
case. This inheritance is simply achieved by successively concatenating the descriptions of the<br />
parent groups into a single description.<br />
The comment itself is accessible (e.g. from the assessment or the report template editor) via<br />
${scenario.comment}. The whole information of the inherited description can be<br />
accessed via ${scenario.inheritedcomment}.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 39<br />
8 Test set configurations<br />
8.1 Introduction<br />
Within different test-runs or different environments a subset of tests specified in <strong>TPT</strong> may be<br />
executed. The test-set selection and configuration is done in the test set editor.<br />
8.2 Selection of test-sets<br />
The test set selection is accessed via menu item Execution / Configure test sets. Here test sets<br />
can be assembled and named (see Figure 24).
Page 40 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Figure 24: Test set editor
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 41<br />
9 Platform configuration<br />
9.1 Introduction<br />
<strong>TPT</strong> test cases are modelled independent of the execution platform. This means <strong>TPT</strong> test cases<br />
can be executed in different execution environments. Each platform needs different<br />
configurations in order to execute simulations.<br />
In order to execute the tests the test platform has to be configured. The test platform is the<br />
execution or simulation environment (e.g. Model in the loop (MATLAB/Simulink), standalone,<br />
executable file or HiL). The specifics of the environment need to be specified in the platform<br />
configuration.<br />
E.g. the MATLAB platform requires information which Simulink-model file is used while HiLconfigurations<br />
need information how signals at the HiL are mapped. For that reason for each<br />
platform there exists a platform configuration.<br />
Sometimes it makes sense to have different configurations for one physical platform. By doing<br />
this a system under test can be tested in different environments like Model in the loop (MiL) or<br />
Software in the loop (SiL).<br />
9.2 Selecting the platform<br />
Open a platform configuration window using execution | platform | add and select<br />
the platform from the given list.<br />
9.3 MATLAB/Simulink environment<br />
One possible test execution configuration is implemented in MATLAB/Simulink. The test<br />
execution engine (<strong>TPT</strong> Virtual Machine (VM) is implemented as an S-function in Simulink<br />
(see Simulink S-function documentation). The S-function passes the values calculated by the<br />
system under test (SUT) to the <strong>TPT</strong> execution engine. For each time step all outputs of the SUT<br />
are inputs to the <strong>TPT</strong> VM. Thus all values that are needed for the test execution need to be<br />
declared as inputs in <strong>TPT</strong> and all <strong>TPT</strong>-outputs are inputs into the SUT. The interface of the <strong>TPT</strong>-Sfunction<br />
is defined by the channel declaration of the <strong>TPT</strong> testlet.
Page 42 <strong>TPT</strong> User’s <strong>Guide</strong><br />
When the MATLAB/Simulink environment is configured a MATLAB-version as has to be selected<br />
and registered as a COM server (see Figure 25). Alternatively the so called RMI protocol can be<br />
used for the communication with MATLAB. The RMI communication is the default<br />
configuration.<br />
The installed MATLAB-versions will be searched automatically by analysis of the Windowsregistry.<br />
If this fails for some reasons the configuration can be done manually.<br />
The MATLAB installation configuration can be either accessed via Platform configuration or via<br />
menu “MATLAB/MATLAB installations ...”.<br />
Please note that only one MATLAB-Version/Installation can be used at a time. In the case of COMcommunication<br />
this version needs to be registered as COM-server.<br />
In case of RMI communication MATLAB is accessed by default via TCP-IP-Ports 20556, 20557 or<br />
3319. If for some reason these ports or not accessible alternative open ports can be used<br />
instead. This can be configured using the checkbox in the “Setup MATLAB Versions” window.<br />
(cf Figure 25). In case MATLAB is already open and runs a server on one of the given ports this<br />
MATLAB is used by <strong>TPT</strong> an no new MATLAB is opened.<br />
The MATLAB startup may consume more than 40s. In this case the “Startup timeout” can be<br />
increased (cf Figure 25).<br />
Figure 25: MATLAB version selection and registration<br />
A Log-file and a startup directory may be specified (see Figure 26).<br />
In the Log-file all communication with MATLAB is logged. The contents of the specified log-file<br />
are the same that can be seen in the “Console”-view (cf. Figure 26).<br />
The “Startup dir” is the directory MATLAB starts. In case MATLAB is already open and used <strong>TPT</strong><br />
doesn’t change the current MATLAB directory.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 43<br />
Figure 26: MATLAB platform configuration<br />
Test execution configuration<br />
In the test execution configuration for a Simulink model file has to be specified. This consists of<br />
the system model and the <strong>TPT</strong> virtual machine. Please note that this model file doesn’t have to<br />
be generated manually. The test-frame may be generated automatically (see section 0: Original<br />
model settings).<br />
A <strong>TPT</strong> I/O-file needs to be generated. This M-file consists of the port definition and other<br />
variables of the Simulink environment needed for <strong>TPT</strong>. This m-file is generated automatically<br />
from the channel declaration (cf. Section 2).<br />
The step-size (1/sampling rate) of the <strong>TPT</strong>-block needs to be specified (see Figure 27).<br />
The step size is only valid for the <strong>TPT</strong>-S-function in Simulink and has no influence on the Simulink solver.<br />
The timeout specifies the maximum simulation time. The simulation terminates after the<br />
timeout value if it has not already terminated.<br />
The history size field defines the number of samples that are held in memory and can be<br />
accessed during test execution.<br />
The content of the “Model load script” is generated automatically but can also edit by the user.<br />
This script is run in MATLAB when the model is opened. The user can add proprietary scripts<br />
and MATLAB function calls if needed.<br />
In the MATLAB communication settings the user can specify how often MATLAB is restarted<br />
during test-execution. This might be useful to avoid memory errors. Also it can be specified if<br />
MATLAB should be kept open after the last test has been executed.
Page 44 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Figure 27: Test execution configuration<br />
Test run script<br />
The test run script field describes the MATLAB-commands for the test execution of a single test<br />
scenario. This script is generated automatically but can be changed by the user.<br />
Environment variables<br />
Environment variables are used to configure elements which apply to the MATLAB platform<br />
configurations. Variables that apply to all platforms should be specified using<br />
Tools|Preferences.<br />
For example the variable “lightctrl.para” has the value “para_set1” in configuration<br />
one and “para_set2” in the second (derived) configuration. Thus there are two simulation<br />
environments with two different configurations for the same simulation platform. The<br />
environment variables are accessed using: ${lightctrl.para}.<br />
Console<br />
The console shows all the communication between MATLAB and <strong>TPT</strong>.<br />
Original model settings<br />
The original model settings are only needed when the test frame is generated automatically.<br />
They are not necessary for the test execution.<br />
Here the model file of the system under test as well as the path to the block to be tested has to<br />
be specified (see Figure 28). The model load script can be modified. The model interface (the<br />
signal-names of the inputs and outputs of the system) can be imported from MATLAB. The testframe<br />
can also be generated automatically.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 45<br />
Figure 28: Original Simulink model settings<br />
Import interface<br />
The inputs and outputs of Simulink system can be imported (optional).<br />
Figure 29: Import interface selection window
Page 46 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Generate test frame<br />
When the original model file is selected, the test frame for the test execution in MATLAB/<br />
Simulink can be generated automatically (see Figure 30). Please note that the test frame<br />
generation may fail due to user-specific configurations.<br />
Figure 30: MATLAB/Simulink test-frame generation<br />
This is done by creating a new model file connecting the <strong>TPT</strong> virtual machine execution block<br />
and the original system model test block (see Figure 31).<br />
Figure 31: MATLAB/Simulink test frame
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 47<br />
9.3.1.1 Execution details of the MATLAB-plattform<br />
For the execution of test-models the execution procedure is as described in Figure 32:<br />
close MATLAB<br />
yes<br />
connect to<br />
MATLAB<br />
exists MATLAB<br />
connection?<br />
restart MATLAB?<br />
Figure 32: MATLAB test execution procedure<br />
no<br />
no<br />
no<br />
yes<br />
no<br />
Start test<br />
execution<br />
exists MATLAB<br />
connection?<br />
open test-model<br />
all test executed?<br />
End<br />
yes<br />
execute test<br />
Connect to MATLAB<br />
If no connection to MATLAB exists it has to be started. The start procedure is described in<br />
Figure 33:<br />
yes
Page 48 <strong>TPT</strong> User’s <strong>Guide</strong><br />
no<br />
register COM server<br />
starts MATLAB<br />
exists Startup<br />
dir?<br />
run MATLAB script:<br />
cd startupdir;<br />
matlabrc;<br />
run MATLAB script:<br />
cd matlab_tpt_env;<br />
init_tpt_env;<br />
MATLAB already<br />
connected?<br />
yes<br />
Figure 33: MATLAB start procedure<br />
Start connect<br />
MATLAB<br />
COM<br />
COM<br />
vs<br />
RMI<br />
RMI<br />
End<br />
run Startup script<br />
End<br />
cd startupdir;<br />
MATLAB aready<br />
connected?<br />
yes<br />
no<br />
no<br />
exists Startup<br />
dir?<br />
cd MATLAB\work<br />
run MATLAB.exe \r<br />
run MATLAB script:<br />
old = pwd;<br />
init_tpt_env;<br />
cd old;<br />
Open Model<br />
When initially the model is closed the model will be testframe model file will be opened and<br />
the Model load script is executed.<br />
Close model and MATLAB<br />
The model and MATLAB close procedure is executed as follows:<br />
bdclose all;<br />
quit force;<br />
By doing this the model is closed without saving potential changes of the model. Please note<br />
that in the case of manual model changes the model needs to be saved manually.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 49<br />
9.4 The executable platform<br />
A very basic but flexible platform configuration is the Executable platform configuration. This<br />
platform is any executable program that is specified.<br />
In order to execute test cases the system under test (SUT) need to be stimulated by the<br />
execution environment of <strong>TPT</strong>. The API of the <strong>TPT</strong> execution environment and how the SUT will<br />
be connected to the <strong>TPT</strong> execution environment (<strong>TPT</strong>-VM) will be described in the following<br />
section.<br />
In Figure 34 the flow diagram of the executable environment is shown. The execution of the<br />
test platform starts with an initialisation phase where the input file and the output file are<br />
opened and the data for the stimulation are assigned to the <strong>TPT</strong>-outputs and the outputs of the<br />
SUT are assigned to the <strong>TPT</strong>-inputs. The major loop consists of the actual periodical call of the<br />
SUT and the <strong>TPT</strong> virtual machine for each time step. The test-procedure finishes with a closing<br />
of the data files and a memory release. The return value of the executable must be set to zero<br />
when the execution was successful.<br />
Please refer to the lights control example and the “tpt_vm_api.h” where the full <strong>TPT</strong>-VM-<br />
API description can be found. Please make sure having “tptvmapi.dll” in the same folder<br />
as the executable.
Page 50 <strong>TPT</strong> User’s <strong>Guide</strong><br />
testcase.tvm<br />
Start<br />
tpt_vmapi_createExecution<br />
tpt_vmapi_bindTestOutputToAddress<br />
tpt_vmapi_bindTestOutputToAddress<br />
tpt_vmapi_bindTestOutputToAddress<br />
tpt_vmapi_bindTestInputToAddress<br />
tpt_vmapi_bindTestOutputToAddress<br />
tpt_vmapi_bindTestOutputToAddress<br />
tpt_inputs = SUT(tpt_outputs,...)<br />
tpt_vmapi_runCycle<br />
test<br />
end?<br />
tpt_vmapi_closeExecution<br />
9.4.1 <strong>TPT</strong>-VM-API for the execution platform<br />
End<br />
Figure 34: Flow diagram of the execution platform<br />
testcase.tptbin<br />
The functions of the <strong>TPT</strong>-VM-API are described in detail in the header file tpt_vm_api.h but<br />
will be described here shortly.<br />
tpt_vmapi_createExecution<br />
This function initializes the execution of a <strong>TPT</strong> test-case given as a so called TVM-file. The results<br />
of the <strong>TPT</strong>-execution are saved as <strong>TPT</strong>BIN-format.<br />
tpt_vmapi_bindTestInputToAddress<br />
This function assigns the output values of the system under test to the respective inputs to <strong>TPT</strong>.<br />
tpt_vmapi_bindTestOutputToAddress<br />
This function assigns the input values of the system under test to the respective outputs to <strong>TPT</strong>.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 51<br />
tpt_vmapi_runCycle<br />
This function runs a single time-step of the <strong>TPT</strong> virtual machine with given inputs and outputs.<br />
This function need to be called in a loop together with the system under test function call.<br />
tpt_vmapi_closeExecution<br />
This function terminates the <strong>TPT</strong> runtime environment execution. It closes all open files and<br />
releases allocated memory.<br />
9.4.2 Executable platform configuration<br />
Assume for example the lights control example is implemented as C-function that returns the<br />
“headlight” as function of “light_switch” and “light_intensity”. In order to create<br />
a test-frame for this a test-frame needs to be programmed and compiled that calls periodically<br />
the <strong>TPT</strong> virtual machine and the function “getHeadlightValue”.<br />
Templates for the executable platform generation are available and can be found in the lights<br />
control example.<br />
Figure 35: Executable platform configuration<br />
For the Executable platform configuration please specify the working directory<br />
(tpt.exeplatform.workdir) from where the command/function is executed. The<br />
command itself consists of the executable function test-frame and parameters for the input-<br />
<strong>TPT</strong>-file (tpt.scenario.tvmfile) and the output file (tpt.scenario.tptbinfile). In<br />
the example the executable function is lights_control_testframe.exe in the working directory.<br />
The parameter tpt.scenario.tvmfile, tpt.scenario.tptbinfile and<br />
tpt.exeplatform.workdir are pre-defined variables used in <strong>TPT</strong> (see section 15.10:<br />
Environment variables). Also the sampling time, the maximum timeout-time and the history<br />
must be specified.<br />
9.4.3 Test Source Code with the Exe-Platform<br />
Before we begin to prepare, compile and test a given system’s source code using <strong>TPT</strong> and the<br />
Exe-Platform, we have to ensure, that some prerequisites are met.
Page 52 <strong>TPT</strong> User’s <strong>Guide</strong><br />
• <strong>TPT</strong> has been installed with the “exeplatform” plug-in<br />
• A Compiler/Linker for C-Code must be available<br />
If both apply, we are well prepared for the following steps.<br />
9.4.3.1 Build an Executable Test-frame<br />
Each piece of software that is to be tested with the Exe-Platform must first be integrated with<br />
the <strong>TPT</strong>-VM, which runs the test cases. This integration is called a test-frame and must be<br />
provided as an executable file, so the Exe-Platform may access it.<br />
<strong>TPT</strong> provides a wizard that generates the integration’s source code on the basis of some details<br />
that have to be delivered by the user. It will work for all systems or system parts that conform to<br />
a certain interface style that is often used with continuous system that has been implemented<br />
using the C programming language.<br />
In other words, the source code of the system to test must comply with the following rules:<br />
• It has one interface function, implementing the continuous functionality to test<br />
• The interface function must have an empty parameter list<br />
• The interface function may not have a return value<br />
• All variables, exchanged between the interface function and its adjacent system parts,<br />
must be declared public within the global scope, so they are accessible for testing<br />
Of course, the last point will implicitly apply in most of the cases, where the first three rules are<br />
fulfilled, too. The following lines of code show a very simple example of such a function:<br />
int value;<br />
int factor;<br />
int product;<br />
void multiply()<br />
{<br />
product = factor * value;<br />
}<br />
If a function’s source code does not conform to this structure, it can most probably be adapted<br />
to it by writing an adapter code.<br />
When your source code matches the required structure, you may start to create the source<br />
code of the executable that will run the tests on that function. If an installation of MS Excel is<br />
available on your system, you may generate the needed source code with <strong>TPT</strong>.<br />
If you do not have MS Excel installed, then you will have to write down the source code of test<br />
executable manually. See SUT_main.c in the folder examples.<br />
The “exeplatform” plug-in of <strong>TPT</strong> provides a mechanism that is able to generate the source<br />
code of the test executable on the basis of a number of information that are read from an excel<br />
file. In order to use this mechanism, create a platform configuration of type EXE-Platform and<br />
click the button Generate excel interface file (cf. Figure 35).<br />
After it has been created, the excel file will be opened, in order to let you specify the interface<br />
of the function for which we want to create a test executable. We will now explain, how an<br />
interface can be fully specified using the worksheets contained in the Excel file.<br />
The Excel file created by the wizard contains three worksheets. One worksheet is used for the<br />
general description of the function to call with its dependencies and two worksheets for the<br />
specification of its input and output variables.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 53<br />
For now, let’s concentrate on the first worksheet, which is named “General”. It contains four<br />
fields that may be filled with information. The following table shortly describes each of them.<br />
Label Semantics<br />
Module name Optional. Takes a name for the generated module.<br />
Custom imports Optional. If include statements are necessary to access the function to<br />
adapt, they must be specified here.<br />
Custom init Optional. If additional statements are necessary to initialize the<br />
function before a test run starts, it can be specified here.<br />
Function call Takes the source code that calls the function under test. The code,<br />
filled in here, will later on be called cyclically during a test run.<br />
The following screenshot shows an example of the worksheet filled out:<br />
Figure 36: Function Specification with the Excel Sheet “General”<br />
The next two worksheets, “Inputs” and “Outputs” both have the same structure, that allows a<br />
user to specify a functions interface variables – or in words of <strong>TPT</strong>: its interface channels.<br />
Figure 37: Interface Specification with the Excel Sheets “Inputs” and “Outputs”
Page 54 <strong>TPT</strong> User’s <strong>Guide</strong><br />
The first column takes the names of an input or output channel respectively. Note, that<br />
channels may only contain alphanumerical characters and the underline. Due to this restriction,<br />
channel names must sometimes differ from the source code’s original variable, e.g. if the code<br />
variable is contained in a structure. In those cases, the variables original C-Code variable may be<br />
stated in the second column. Furthermore you may specify the type of the C code variable.<br />
The C-Code Type must be one of the following <strong>TPT</strong> C-code types which are equivalent to the<br />
ANSI C-types which can be found in the table below:<br />
<strong>TPT</strong> C-code type ANSI C-type<br />
uint8 unsigned char<br />
int8 signed char<br />
uint16 unsigned short<br />
int16 signed short<br />
uint32 unsigned int<br />
int32 signed int<br />
int64 long long<br />
float float<br />
double double<br />
bool unsigned char<br />
The last two columns take optional scaling information for a given channel. It is assumed, that<br />
scaling is applied using the polynomial form:<br />
physical = fixed * slope + bias<br />
When both, a slope and a bias are given for a channel, reading and writing that channel will<br />
also include scaling values from its physical representation to its fixed-point representation and<br />
vice versa.<br />
Parameters that are to be accessed within the executable are configured in just the same way.<br />
Have a look at the “Parameters” sheet, if you want to exchange and use system parameters.<br />
As soon as you have filled the MS Excel Sheet with all information needed, you can return to the<br />
Exe-Platform configuration dialog and use the button “Generate test driver C code”, in order to<br />
finally generate a test-frame to the specified function. <strong>TPT</strong> will read in the Excel file and create a<br />
C source file based on the information found.<br />
You should now be able to build an executable file from the generated source code using an<br />
arbitrary compiler and linker. If this fails, please also check, that all information you gave within<br />
the Excel file are correct.<br />
The resulting executable file is ready to be run with the Exe-Platform. Just configure the<br />
platform with the correct command line and run your tests against the C-code.<br />
9.5 Standalone platform<br />
The standalone platform is not really a test execution platform because the system under test<br />
will not be stimulated and no outputs from the system are inputs to <strong>TPT</strong>. The standaloneplatform<br />
is more the execution of the test cases in <strong>TPT</strong> for debugging of the tests without<br />
having the connection to the system under test. The inputs in <strong>TPT</strong> will be set to constant<br />
default values. Thus this is more a simulation than a real test.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 55<br />
10 Test Execution<br />
10.1 Introduction<br />
Tests can be executed after setting up test, test-configurations and platform configuration.<br />
The test execution runs a test set on the different platforms.<br />
10.2 Test execution configuration<br />
Figure 38 shows the test execution configuration.
Page 56 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Figure 38: Test execution configuration<br />
Each configuration can be named and assigned to a test-set specified in the test-set<br />
configuration. User defined attributes may be assigned to the configuration using the<br />
“Attributes” tab. Use the “Run” button to start a test execution. By using the “Refresh” button<br />
you can recompile your <strong>TPT</strong> model.<br />
Data directory<br />
A data directory where all relevant test data is stored needs to be specified. The data structure<br />
also needs to be specified. Options given are to use a flat or tree structure based on an index or<br />
scenario ID.<br />
Reference directory<br />
The test results may be compared with reference data from earlier test runs. The path to the<br />
reference data needs to be specified. Within the report the appearance of the data needs to be<br />
specified. The data can also be used within the assessment.<br />
When the data dictionary is ${tpt.tptfile.dir}\<strong>TPT</strong>data\ the reference directory could be<br />
${tpt.tptfile.dir}\Ref<strong>TPT</strong>data\Stand_alone_test_engine when the former<br />
execution was done using the stand alone test engine.<br />
Reference root<br />
Choose if the reference directory is the main execution directory or a platform directory.<br />
Report directory<br />
If you choose to create a report after the execution, you have to specify a report directory first.<br />
All report data will be written into this directory.<br />
Report format<br />
There are currently 2 possible report formats available: HTML and PDF. If you request to<br />
generate a HTML report, you can view it with a custom web browser; PDF reports can be<br />
viewed with a PDF viewer.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 57<br />
Platforms<br />
The platforms upon which the test shall be executed need to be selected from the platform<br />
configurations specified before.<br />
Which steps are executed have to be selected. Use check boxes for execution, debugging,<br />
assessment and report generation.<br />
The build process is started by using the “compile & run” button. Once the execution begins a<br />
window opens which gives an overview over the progress of the process. Please note that only<br />
the test cases or scenarios selected in the testlet or scenario browser will be executed.<br />
10.3 Pauses or “Intermission points”<br />
Figure 39: Build progress window<br />
Breakpoints will pause the test execution for a certain period of time. To insert a pause rightclick<br />
on the test cases (or the scenarios) before which you want to halt the execution. Select the<br />
“intermission point…” item from the pop-up menu and then insert the message which should<br />
appear if the pause is reached. You may also state how much time should pass until the<br />
execution resumes (in the “intermission point timer value” field, see Figure 40). Finally, the<br />
“enable intermission point” check box needs to be activated so that the “intermission point” is<br />
activated.<br />
Active intermission points are identified by a red dot above the respective scenario symbol in the scenario<br />
browser.<br />
Intermission points are only active in test cases or scenarios which are passed to execution.
Page 58 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Interminssion point marking<br />
Figure 40: Intermission points<br />
Intermission point configuration
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 59<br />
11 Test Analysis<br />
11.1 Introduction<br />
Once executed, test results in <strong>TPT</strong> can be analyzed by either using the built-in Test Data Viewer<br />
or by generating a comprehensive HTML report. The following section will give you a brief<br />
overview of both options.<br />
For qualitative and quantitative test result evaluation please see <strong>TPT</strong> assessment manual.<br />
11.2 The Test Data Viewer<br />
By using the Test Data Viewer, the tester can analyze each channel of the whole test run. The<br />
input of the Test Data Viewer is a file in <strong>TPT</strong>BIN format, created after a test has been executed.<br />
You can also use the Test Data Viewer to display the results of the test assessment or<br />
measurements of different formats like .mat, .mdf, .csv.<br />
To open the Test Data Viewer you can either choose it from the main menu Tools > Test<br />
Data Viewer or you use the context menu of the Build Progress Window (Figure 40).
Page 60 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Figure 41: Opening the Test Data Viewer from the Build Progress Window<br />
The Test Data Viewer features a table containing all signals of the current test execution on the<br />
left and an arbitrary number of customizable view panels used to depict the values of a signal<br />
over time on the right. You can display a signal by simply dragging it from the signal table to<br />
the desired panel or by selecting the signals checkbox.<br />
Two axes with different scale maybe displayed in the same panel. A signal can be displayed in<br />
the right axis by dragging the signal to the right axis. The scales can be zoomed and scrolled at<br />
the respective axis scale.<br />
Multiple axes can be generated either by choosing it from the main menu View > Add<br />
view above/below or by the use the context menu of the axis.<br />
Figure 42: The Test Data Viewer
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 61<br />
A toolbar and a context menu with some useful functions for test analysis are provided. It can<br />
be selected between different view modes such as select mode, zoom mode, move mode but<br />
also a sample point table can be displayed:<br />
Selection Mode<br />
By using the Selection Mode, you can click on a desired point within the timeline and the exact<br />
value of each signal at that point will be displayed in the Value column of the signal table. The<br />
value can be displayed in binary, decimal and hexadecimal format. The format can be changed<br />
by right-clicking on the value.<br />
Sample point display<br />
Sample points are the moments in time, for that a signal has a concrete value. The space in<br />
between 2 sample points is interpolated. If you are interested in looking at the sample points of<br />
a signal, do so by simply enabling Show Samples in the menu.<br />
Note that you will most probably have to zoom in to see the single sample points of a signal<br />
Switching Interpolation Modes<br />
The Test Data Viewer provides different algorithms for displaying the space between two<br />
sample points of a signal. You can choose linear or last value interpolation. If you just want to<br />
see the raw sample points, you can also disable interpolation.<br />
Change time synchronisation model<br />
The Test Data Viewer provides different time-modes for displaying the signals. The view can be<br />
switched between <strong>TPT</strong>-synchronous mode and SUT-synchronous mode. <strong>TPT</strong> measures it’s in-<br />
and outputs. In the case one looks form <strong>TPT</strong> it is called <strong>TPT</strong>-synchronous mode and when the<br />
inputs are one time step delayed, compared to the output the view is synchronous for the SUT.<br />
11.2.1 Test data viewer operational modes and shortcuts<br />
Some short-cuts are available within the different modes. Some are valid in all modes but some<br />
shortcuts are available only in special modes:<br />
Generell Features (in all modes)<br />
CTRL + LEFT/RIGHT/UP/DOWN: scroll<br />
CTRL + Drag Mouse-Left: scroll<br />
Click Mouse-Right: Context menu<br />
Mouse-Wheel on Diagram: Zoom in/out<br />
Mouse-Wheel on X Axis: Zoom in/out X-axis<br />
Mouse-Wheel on Y Axis LEFT/RIGHT: Zoom in/out Y-axis LEFT/RIGHT<br />
Select/Edit mode<br />
LEFT/RIGHT: move the time cursor<br />
Click Mouse-Left: Select signal/sample(s)<br />
Drag Mouse-Left: Select sample(s)<br />
Zoom mode<br />
Click Mouse-Left: Zoom In<br />
Shift + Click Mouse-Left: Zoom Out<br />
Drag Mouse-Left: Zoom to Region<br />
LEFT/RIGHT: n/a<br />
CTRL + LEFT/RIGHT/UP/DOWN: scroll<br />
Move mode<br />
LEFT/RIGHT: n/a<br />
CTRL + LEFT/RIGHT/UP/DOWN: scroll
Page 62 <strong>TPT</strong> User’s <strong>Guide</strong><br />
11.3 The HTML Report<br />
While the Test Data Viewer allows you to dig into the details of one single test execution, the<br />
<strong>TPT</strong> report provides the big picture of the whole test run. This report serves as a comprehensive<br />
and highly configurable HTML summary with interactive diagrams similar to the Test Data<br />
Viewer.<br />
A <strong>TPT</strong> report is created using a customizable Report Template (for more details on report<br />
templates refer to chapter ‘The Report Template Editor’).<br />
To create a report for a test execution, choose the desired template and enable the Report<br />
option in the execution configuration dialog (Figure 43: Report option in the Execution<br />
Configuration Dialog).<br />
Figure 43: Report option in the Execution Configuration Dialog<br />
After all tests have been executed, you can display the test report by clicking the Open Report<br />
button in the Build Progress window. The report will be opened with your default browser.<br />
Figure 44: Report overview in Mozilla Firefox depicts the report overview, from which you can<br />
start browsing into the details of any executed scenario.<br />
Figure 44: Report overview in Mozilla Firefox
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 63<br />
11.3.1 Report overview<br />
The report overview contains useful information about the whole test execution. This overview<br />
starts with general information which includes an execution summary and a small meta<br />
information table.<br />
The execution summary shows the total number of executed tests and gives a detailed<br />
overview of the results that were observed (total number of succeeded, failed, indifferent and<br />
execution errors).<br />
The meta information just contains the filename of the corresponding <strong>TPT</strong> file, the name of the<br />
execution configuration and the total number of executed scenarios.<br />
This information is enriched with a per-platform overview which includes another summary<br />
table, an overview of the executed scenarios and an overview of the assessment variables with<br />
their respective name and result information.<br />
Clicking on a scenario in the “platform overview” will open the scenario-specific report (this is<br />
equal to clicking the scenario on the platform overview which is visible on the navigation bar<br />
on the left hand side of the report).<br />
Clicking on an assessment variable in the “variable overview” will open an overview report for<br />
the selected variable. This is useful in order to investigate the status of a specific assessment<br />
variable across all executed test cases.
Page 64 <strong>TPT</strong> User’s <strong>Guide</strong><br />
12 The Report Template Editor<br />
12.1 Introduction<br />
Templates control the content and the layout of reports created by the report generator. In the<br />
current <strong>TPT</strong> version, the report generator has the ability to create such reports in HTML format.<br />
As well as a template file the report generator needs a set of test run results in the form of<br />
signal waveforms and variable allocations. The following chapters deal with the creation of a<br />
template using the template editor.<br />
Templates, in their internal representation, are XML files. In order to be able to generate a template you<br />
can either use the template editor or you can write the template “manually” if you are familiar with the<br />
XML structure.<br />
12.2 Creating a template by means of the template editor<br />
The template editor is a tool which you can use to build your own control templates<br />
interactively. Open the editor by selecting “template editor” in the “tools” menu or by the<br />
Ctrl+T hotkey. The template editor window is divided into two halves (see Figure 45). On the<br />
left-hand side the template structure is depicted as a tree, while the right-hand side of the<br />
window shows the properties of a template statement selected in the tree.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 65<br />
Figure 45: The template editor<br />
When the editor is started, the template window contains one root statement, which is named<br />
“test report” by default. Right-clicking brings up the context menu containing all template<br />
statements which can be added to the template. For example, if you select “create section”, a<br />
section statement will be created within “test report”. The entire tree structure of the template<br />
is built up in this way.<br />
It is also possible to insert statements by using the toolbar of the template editor.<br />
It is possible to delete any statement (bar the root statement) in the tree by right-clicking on a statement<br />
and selecting “delete element”. Please note that all statements nested within the deleted statement will<br />
also be deleted.<br />
Properties may be assigned to every statement in the template tree. For any selected<br />
statement, the corresponding entry fields appear in the right-hand side of the window. Due to<br />
the multitude of properties, we will only mention the most important ones here:<br />
Statement Properties which should be assigned<br />
Section The title of the section should be entered in the “Title” field. The “Identifier” is an<br />
optional parameter which can be referred to from the assessment script.<br />
Paragraph The paragraph-test of the section should be entered in the “Text” field. Please note<br />
that variable-names can be used e.g. “${scenario.inheritedcomment}”. The<br />
“Identifier” is an optional parameter which can be referred to from the assessment<br />
script.<br />
Select On the “details” index card in the “filter” field a regular term/expression for the<br />
channels has to be entered, which “matches” the elements in the scope to be<br />
Conditional<br />
Execution<br />
selected. Also a subset of channels can be excluded using check-boxes.<br />
On the “details” index card a variable name of type Boolean has to be entered into<br />
the “Expression” field, whose value in the selection should be checked for. The<br />
successor statements will be executed if the “true” value has been selected in the<br />
“value” drop-down menu and the given Boolean variable exists in the selection. If<br />
“false” has been set, the reversion applies.<br />
For Each Over all elements will be iterated which have been selected before using “Select”.<br />
The order of the execution can be chosen by selecting a sorting criterion.<br />
Channel table On the “details” index card a table header should be entered into the<br />
“header”“subtitle” field.<br />
Parameter table On the “details” index card a table header should be entered into the<br />
“header”“subtitle” field.<br />
Signal graphic The graphic should be named in the “subtitle” field. Also axes-properties can be set.
Page 66 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Important properties of template statements<br />
The layout of all reports may be defined globally by selecting “Tools” see “Default editor”. The<br />
window now displays the layout properties of the global report.<br />
Most of the properties, which are determinable at statement level or which concern the global layout,<br />
have not been described in detail. All properties provide information about their usage via the “tooltip”<br />
feature which appears when the cursor hovers over the property.<br />
12.3 Loading and saving a template<br />
Loading and saving templates is done normally in the “file” menu of the template editor.<br />
12.4 Elements of a template<br />
The Report Template statement<br />
The Report template defines the Title and style of the report. An XHTML-style-sheet can be<br />
selected and modified.<br />
The Meta information statement<br />
The Meta information statement inserts the meta-information of the test execution like filename,<br />
number of scenarios etc.<br />
The Meta information statement is optional and can only appear before all other statements.<br />
The Table of Contents statement<br />
The Table of Contents statement inserts a table of contents.<br />
The TOC statement is optional and can only appear before all other statements.<br />
The Table of Figures statement<br />
The Table of figures statement creates a table and graph directory (table of figures).<br />
The TOF statement is optional and can only appear after the TOC statement or before all other<br />
statements.<br />
The Section statement<br />
The Section statement creates a named section or subsection.<br />
The Select statement<br />
The Select statement selects a subset from the set of all variables. The reason for selecting a<br />
subset of all variables is to reduce the report to information of interest only.<br />
Selects may be nested in any desired way. If a subset of variable is selected only those are<br />
accessible within this Select-statement. Using regular expressions the content of the select<br />
filter can be chosen. Also check-boxes for the exclusion of information are available.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 67<br />
Figure 46: Template Editor Select statement<br />
For example the term “[^_][^r][^e][^f]$” in the name filter filters all names with “_ref” at the<br />
end.<br />
The For Each loop statement<br />
The For Each statement implements a loop which encompasses each element of the set of<br />
variables. For example a run over selected channels executes the statements within the loop<br />
which perhaps is already restricted by previous Selects. A For Each executes one implicit Select<br />
of exactly one element in each iteration of the loop.<br />
The order of the execution of the loop can be controlled by using “Sorting”. Items can be sorted<br />
by name, type etc.<br />
Figure 47: For each loop template editor
Page 68 <strong>TPT</strong> User’s <strong>Guide</strong><br />
The For Each statement can be positioned anywhere, but has to have an (arbitrary) successor (exception:<br />
TOC and TOF).<br />
The Conditional statement<br />
The Conditional statement has the effect that all successor statements are executed only after<br />
they have fulfilled a certain condition (Expression).<br />
The Conditional statement can be positioned anywhere, but has to have an (arbitrary) successor<br />
(exception: TOC and TOF).<br />
The Channel table statement<br />
The Channel table statement draws a table. All variables which are selected in the currently<br />
select-statement are entered into the table. The order of the entries can be sorted e.g. by name<br />
or type.<br />
The Channel Table statement can be positioned anywhere, but must not have any successors.<br />
The Signal graphic statement<br />
The Signal Graphic statement graphs a signal form. In the graph all variables are entered which<br />
can be found in the currently selected set of test runs, scenarios and variables.<br />
Abbildung 48: Signal graphic report template<br />
The Signal Graphic statement can be positioned anywhere, but must not have any successors.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 69<br />
13 Function Wizard<br />
13.1 Motivation and targets<br />
Through direct definition testlets <strong>TPT</strong> offers the possibility of describing a complex waveform in<br />
the form of a function expression. <strong>TPT</strong> provides a wizard for selection of simpler functions.<br />
13.2 Access to the function wizard<br />
The function wizard can be opened if <strong>TPT</strong> displays a direct definition testlet and exactly one<br />
entry is highlighted.<br />
Figure 49: Opening the function wizard
Page 70 <strong>TPT</strong> User’s <strong>Guide</strong><br />
13.3 The individual functions<br />
The function wizard assists in the generation of the following functions: constant value, ramp<br />
functions, asymptotic functions and periodic functions. The function is valid while the state is<br />
active.<br />
13.3.1 Constant function<br />
The constant function assigns a specified value while the state is active. This value is defined by<br />
either the last value of the prior state or can be set explicitly.<br />
13.3.2 Ramp function<br />
Figure 50: Constant function<br />
The ramp function rises or falls linearly to a target value over a specified time or with a specified<br />
gradient. The start value can either be stated explicitly or taken from the prior state.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 71<br />
13.3.3 Asymptote function<br />
Figure 51: Ramp function<br />
The asymptote function converges to the “Target Value” and approaches the target value in<br />
approximately “duration” time. The beginning of the time dependent function is either<br />
continuous, continuous differentiable or as specified with start value and gradient. If<br />
continuously differentiability is chosen the differentiability is taken from the last two values of<br />
the prior state.<br />
13.3.4 Periodic function<br />
The periodic function oscillates between two values (floor & ceil). The oscillation can be<br />
specified by either period (t) or frequency (1/t). The saw-tooth wave does not need any further<br />
parameters, the rectangular wave and the triangle wave can be weighted via the “proportion”<br />
(mark space ratio) within an oscillation.
Page 72 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Figure 52: Periodic function
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 73<br />
14 Debugging of Test Automatons<br />
Test-case models built with <strong>TPT</strong> can form very complex and comprehensive automatons. If the<br />
behaviour of an automaton differs from the expected behaviour or if a runtime error occurs,<br />
retrieving the cause of the observed behaviour may be quite difficult. The interaction of a large<br />
number of external elements and values provided by the system under test, and it’s the<br />
complex environment can make it virtually impossible to trace and analyze an automaton’s<br />
behaviour without the appropriate tool support.<br />
With this in mind <strong>TPT</strong> comes with a plug-in, that serves the sole purpose of tracing and<br />
analyzing an automaton’s runtime behaviour and hence provides support for systematic<br />
debugging.<br />
This plug-in enables a user to precisely trace a test case’s execution. In doing so just looking<br />
closely at the test results will usually– and especially for complex test automatons – help very<br />
little. Instead more detailed information about the internal state of the automaton at a certain<br />
point of its execution is often needed, for example, to analyze state transitions and their<br />
“timing”. This could be achieved by step-wise execution of the automaton. However, since<br />
running a test case automaton may require several thousand execution steps, the debugging<br />
provides several features to analyze one or more states of a paused automaton, to examine and<br />
analyze its internal state.<br />
14.1 Basic modules of debugging<br />
It is a fundamental characteristic of <strong>TPT</strong> that test cases are described independently of a specific<br />
test environment to run on. This does not only apply to modelling a test case but is used for<br />
execution as well. To achieve this the <strong>TPT</strong> execution machine (<strong>TPT</strong>-VM) may easily be integrated<br />
with various proprietary simulation tools and environments. However, proprietary platforms<br />
often impose restrictions that limit the control over a test case’s runtime. A typical restriction is<br />
that the execution of a test case may not be paused.<br />
Therefore the process of debugging a test case is carried out in two separate steps: First, the<br />
test case to be debugged is executed on its target environment as usual. Then the recorded<br />
data will be used to execute the same test once again. This time however, “offline” using the<br />
stand-alone execution environment which comes with the <strong>TPT</strong>-VM. The system under test as<br />
well as the test case’s execution environment will be simulated using the recorded data.
Page 74 <strong>TPT</strong> User’s <strong>Guide</strong><br />
This method is called capture & replay and, besides providing independence of the target<br />
environment, provides an additional advantage: a test run may be “debugged” repeatedly on<br />
the basis of a single test execution. This can save a lot of time.<br />
As in conventional programming languages it is possible to use a breakpoint in <strong>TPT</strong> to<br />
interrupt a test driver in its execution after reaching an internal state of the automaton specified<br />
by the user. Breakpoints may be added or deleted during the runtime of a debug session.<br />
As soon as the breakpoint has been reached all currently active states of the automaton are<br />
displayed. This also applies to all automatons that are used within the currently debugged test<br />
scenario. Thus, following conventional programming environments, all elements starting from<br />
an active state and describing a path through the automaton hierarchy up to its root can be<br />
understood as a stack-trace.<br />
To continue stepping through the interrupted test execution the user may<br />
• Resume the execution for one discrete step in time (step cycle).<br />
• Resume the execution until the next state transition (step over).<br />
• Unconditionally resume the test execution (resume).<br />
The execution of a <strong>TPT</strong> automaton may be stopped by the user at any time.<br />
14.2 Debug plug-in features<br />
The debug plug-in complements the application by supplying additional functionality needed<br />
for debugging. These extensions can roughly be divided into two sections: extensions to the<br />
user interface for modelling automatons or test cases and extensions to the test execution<br />
process to facilitate debugging of the execution.<br />
14.2.1 Extensions to the user interface: definition of breakpoints<br />
The set-up and the semantics of breakpoints are defined as follows:<br />
• A breakpoint must be defined within the context of an automaton. This may be the<br />
root testlet.<br />
• A breakpoint must be defined within the context of a scenario or a scenario group. If<br />
no scenario has been selected the default group of “all scenarios” will be used.<br />
• A breakpoint which is defined at the scenario group level applies to all scenarios and<br />
scenario groups contained therein. This mechanism is called inheritance or<br />
propagation of the breakpoint.<br />
• A trigger is the event which activates a breakpoint. There are trigger variants “on<br />
entry” and “on event”. The trigger variant “on entry” lets the breakpoint become active<br />
every time the execution of the test reaches the set state. In the trigger variant “on<br />
event” a condition also has to be logical “true”. The condition has to be stated in the<br />
“event” column and follow the syntax of <strong>TPT</strong>.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 75<br />
Figure 53: Table view for the creation of breakpoints<br />
The definition of the breakpoints takes place in the “debug” tab. It is possible to define<br />
breakpoints just for the selected combination of testlet and scenario. If the selected testlet is an<br />
automaton it is also possible to define additional breakpoints for the states/testlets that it<br />
contains.<br />
Thus, for most testlets of an automaton there are two locations at which a breakpoint may be<br />
defined: at the respective testlet itself or within the context of the super-ordinated automaton.<br />
Here the difference cannot be found in the definition of the breakpoint condition, but by<br />
considering which scenario this breakpoint has been defined for. If a breakpoint for a testlet…<br />
… is created directly in one of the testlet’s scenarios, it is then defined for all super-ordinated<br />
application sites. This location should be selected if a breakpoint defined for the testlet<br />
should be effective in each scenario of the super-ordinated automaton or each use of a<br />
certain scenario of this testlet.<br />
… is created indirectly in the context of the super-ordinated automaton, the definition of the<br />
breakpoint may be restricted to scenarios of the super-ordinated testlet. A breakpoint<br />
should be defined here if it is only of interest to a certain scenario of the super-ordinate<br />
testlet.<br />
If a breakpoint is not defined within the current scenario but has been propagated down to the<br />
current scenario, its definition location is linked in the “inherited from” field.<br />
14.2.2 Finding breakpoints<br />
Scenarios and testlets with breakpoints display a red triangle in the upper left-hand corner. The<br />
semantics of a solid or outlined triangle differ in the testlet browser, the scenario browser and<br />
the modelling window.
Page 76 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Figure 54: Depiction of breakpoints within the tree and automaton view<br />
In the testlet browser a solid triangle means that all scenarios of this testlet have a breakpoint.<br />
This may be because either all scenarios have their own breakpoint or a breakpoint has been<br />
defined at the group level for all scenarios. An outlined triangle in the testlet browser means<br />
that at least one of the scenarios (but not all) contains a breakpoint.<br />
In the scenario browser a solid triangle in a scenario or a scenario group indicates that a<br />
breakpoint has been defined in this scenario or scenario group. Outlined triangles mean that<br />
this scenario “inherited” a breakpoint from the hierarchy of the scenario groups. Each<br />
breakpoint created at a scenario group is valid for all scenarios beneath its level in the tree<br />
hierarchy.<br />
In the modelling window a solid triangle means the displayed combination of testlet and<br />
scenario possesses its own breakpoint, in the case of an outlined triangle the breakpoint is<br />
inherited. Furthermore, testlets which have sub-testlets with a defined breakpoint are provided<br />
with an additional outlined triangle.<br />
14.3 Executing a test for debugging<br />
Each completed test execution can be “debugged” immediately, independent of whether or<br />
not the corresponding automaton possesses a breakpoint.<br />
14.3.1 Configuring the execution of tests in debugging<br />
In order to start a test execution in the debug mode starts by opening the dialog for the<br />
configuration of a “build” as usual and check the ‘debug’ box (see Figure 55).
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 77<br />
Figure 55: The "build" dialog<br />
Similarly to the “assessment” and “generate test report” steps it is possible to start debugging<br />
without executing the test. In this case the system searches for and uses a previous test report.<br />
Therefore once a test case has been executed it can be repeatedly “debugged” with a minimum<br />
of time and effort.<br />
Attention! Caution is recommended when using this mechanism because: An automaton should be<br />
debugged solely on the basis of its own execution results. If the test data used in the debugging has been<br />
recorded from an earlier version of the same automaton or even from a completely different test<br />
automaton it will lead to unpredictable behaviour of the application.<br />
To highlight this risk a warning will be displayed if a debug session is started without a report<br />
from a previous execution.<br />
After the build process has been configured and its execution has been started progress is<br />
displayed as normal: compilation, test execution, test evaluation, and report.<br />
14.3.2 Sequence and operation of an execution during debugging<br />
The progress dialog disappears once the debugging of a test execution begins, while the main<br />
window comes to the foreground. The scenario forming the basis of the test execution is<br />
displayed and all other scenarios which are not used within the test-run, are greyed-out in the<br />
tree views. Additionally, a group of three “floating” debug windows become visible.
Page 78 <strong>TPT</strong> User’s <strong>Guide</strong><br />
Figure 56: The user interface of the debugging runtime<br />
These windows always stay on top of all other windows. All interactions with the other<br />
windows remain available.<br />
Consequently all functions available in <strong>TPT</strong> remain accessible during debugging. Deletion or<br />
addition of breakpoints can take place during the debug runtime of a test as during modelling<br />
time through the table view within the debug tab (see Figure 56). Navigation through the<br />
overall automaton using the testlet and scenario trees on the left hand and the automaton<br />
view on the right-hand remain available.<br />
14.3.3 The “control debug session“ window<br />
The dialog with the title “control debug session” provides execution control of the test. The<br />
options are “pausing”, “resumption” or “terminating the execution”, as well as the “stepping”<br />
functions “step cycle” and “step over”. Two more buttons control the fading in/out of the two<br />
additional “channel watch” and “breakpoints overview” windows. The speed of the test<br />
execution can be controlled by using the scroll-bar displayed at the bottom of the window.<br />
The following overview provides a brief overview over the buttons available and their meaning:<br />
Prompts the resumption of a paused test execution (“resume”).<br />
Stops an ongoing test execution (“pause”).<br />
Terminates the test execution and thus the debugging (“terminate”).<br />
Continues a paused test for exactly one execution step (“step cycle”).<br />
Continues a stopped test until the active state changes (“step over”).<br />
Activates/Deactivates displaying the “channel watch” window.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 79<br />
Activates/Deactivates displaying the “breakpoints overview” window.<br />
As soon as the test execution has been stopped, either by reaching a breakpoint or by using the<br />
“pause” function, the debugger highlights all active states of the selected automaton in red. If<br />
one changes the selected state or automaton the highlighting is refreshed according to the<br />
new context. This makes it possible to inspect the executed states of all sub- automatons.<br />
Knowing about these highlight markings it is now possible to explain the “step over” function<br />
in more detail. As can be read in the table presented above, it “continues a stopped test until<br />
the active state changes”. It remains open which active state of the overall automaton is meant.<br />
After all, in most large automatons at almost every point of their runtime many states are<br />
executed and are thus active. Knowing about the highlight markings described above it is now<br />
possible to give a simple and retraceable answer:<br />
The step over function refers to the active states of the automaton which at the moment of triggering<br />
this function is selected and displayed. Using it, the paused execution will be continued until a state<br />
transition takes place.<br />
The slide control controls the execution speed from left (slow) to right (fast).<br />
If the execution speed is set to the maximum, updating the displayed runtime data (channels and<br />
variables) is reduced. Consequently signal values being viewed at execution time are no longer updated<br />
despite the debugging.<br />
Setting the slide control to the maximum speed thus only makes sense if the aim is to reach an<br />
advanced point of the test execution in the shortest amount of time possible, avoiding parts of<br />
the test which are not interesting for debugging purposes.<br />
14.3.4 The “channel watch” window<br />
Information about the internal states of the corresponding automaton are collected during the<br />
entire execution and displayed in this window. Among them are the time that has passed in the<br />
executing automaton (global time) as well as the current values of each channel and variable of<br />
the automaton. Moreover, these values are displayed in diagrams at the right-hand side of the<br />
table. To display a signal in the viewer, select it from the table and drag it onto one of the<br />
displayed viewers or use “add signal” in the context menu.<br />
14.3.5 The “breakpoints overview” window<br />
The “breakpoints overview” window contains a table view which lists all breakpoints of the<br />
recently executed automaton. During a test execution all breakpoints are depicted in grey.<br />
Only when the ongoing execution is stopped by one or more breakpoints, the breakpoints that<br />
caused the test execution to stop are depicted in black and are moved to the top of the table.<br />
A breakpoint definition location can be displayed by double-clicking on its row in the table.
Page 80 <strong>TPT</strong> User’s <strong>Guide</strong><br />
15 Further <strong>TPT</strong> functions and tools<br />
15.1 <strong>TPT</strong> help system<br />
Access the context-sensitive help system by pressing Ctrl+F1 or selecting Help | Help<br />
from the main menu. The <strong>TPT</strong> help system will detect your current working environment and<br />
display the corresponding help topic.<br />
<strong>TPT</strong> organizes the help contents in a library which consists of help books. The individual books<br />
can be viewed by selecting the desired book in the Help | Help Books menu.<br />
When writing assessment scripts the context-sensitive help system will detect the identifiers at<br />
the current cursor position (or the selected function in the auto completion) and display<br />
valuable information about it.<br />
15.2 The search an replace function<br />
The search function locates all occurrences of a certain character string (word or phrase) within<br />
all expressions or channel names of the currently shown test model. It can be reached via<br />
Tools | Search or its hotkey Ctrl+F,<br />
Once this function has been selected, a search string dialog opens. Additionally the two check<br />
boxes below the text search field may be used to determine whether the input is a regular<br />
expression and whether it is to be treated as case sensitive or not (see Figure 57).<br />
The search results are grouped by their location and displayed below the input area of the<br />
dialog.<br />
The results will include all occurrences of a given character string within the filtered contents of<br />
the <strong>TPT</strong>-file (see Figure 57). Double-clicking on a single search result within the tree view will<br />
cause <strong>TPT</strong> to show this context and select it.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 81<br />
Figure 57: The search window<br />
15.3 The history function<br />
All navigation is stored by the history function. This allows a user to navigate backwards and<br />
forwards; re-selecting the previous testlet or scenario. In other words, it works just like a typical<br />
web browser’s ”back” and “forward” buttons.<br />
Both functions can be found in the toolbar which are shown with an arrow pointing to the left<br />
(“navigate backward”) and another pointing to the right (“navigate forward”).<br />
15.4 Auto-completion<br />
When working with declared parameters, constants or channels at a textual level within <strong>TPT</strong>,<br />
the auto-completion provides easy access to all declared names available for the given context<br />
(see Declaration of Channels, Parameters and Constants ).<br />
The auto-completion feature is triggered using the hotkey Ctrl+Space from within either<br />
the assessment editor or the input fields used for defining the equations of a “direct definition”<br />
testlet. A pop-up window opens up at the cursor’s current position. This contains a list of the<br />
available declared names. An entry from the list is selected using the mouse or cursor keys and<br />
hitting ENTER .<br />
If you know the first few letters of the declared name, enter them into the input field or the<br />
editor then trigger the auto-completion. The auto-completion tries to match the text to a<br />
declared name. Matching text can still be edited when the pop-up is present. You can always<br />
cancel auto-completion and close the pop-up window using the ESC button.
Page 82 <strong>TPT</strong> User’s <strong>Guide</strong><br />
The auto-completion feature will always try to complete a word beginning to the left of the cursor<br />
position. Such a partial word is detected when alpha-numerical characters are found directly between the<br />
cursor position and the first space character left of the cursor position (or the left boundary). Therefore,<br />
the pop-up window of the auto-completion will only show all declared names, if the cursor is at the line<br />
start or follows a space character.<br />
15.5 Menu Options<br />
Some options for the graphical editor can be reached via the menu Options.<br />
Smooth Lines and Text<br />
This option is used for smoothing the graphical representation of the automatons in the main<br />
window.<br />
Scroll Automatically<br />
This option can be used to move objects over the border of the visible area in the main<br />
window. Assume one would move a state using drag and drop. When Scroll Automatically is<br />
activated the visible area in the main window moves with the moving object.<br />
Show Overlay Info<br />
This option shows the information that is associated with transitions in the main window.<br />
Show Tooltips<br />
When the Show Tooltips option is active and the mouse dwell at a transition or state additional<br />
information is shown.<br />
Image Resolution<br />
The option image resolution configures the resolution of the image that can be exported via<br />
menu Edit/Save Image...<br />
15.6 Interface import<br />
This function offers the ability to import all types of declarations from either a <strong>TPT</strong> file or several<br />
other file formats and, optionally, applying them to the signature of the currently selected<br />
testlet. It is initiated by using Tools | Import Interface Signals from the menu. A<br />
dialog containing a wizard will open which guides you through the subsequent steps (see<br />
Figure 58).<br />
Figure 58: Interface import
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 83<br />
15.7 The logging server<br />
15.8 Statistics<br />
The logging server, which can be started via Help | Start Logging Server (or its<br />
hotkey Ctrl+L), only provides access to <strong>TPT</strong>’s internal messages and is mostly irrelevant to<br />
users. But in case you experience problems with <strong>TPT</strong>, your <strong>TPT</strong> support contact may ask you to<br />
start the logging server to examine the messages.<br />
The statistics plug-in has been developed to provide the tester with an overview of the<br />
spreading of test cases. It shows how often states of a testlet, specs of a transition and<br />
transitions of a path have been used and how often it was combined with each other. A path is<br />
an intersection of transitions going out a testlet (see Figure 59), so there are different<br />
possibilities for the automaton. The different transitions of such a path can be seen like states in<br />
a testlet.<br />
Figure 59: Example for a path<br />
It might be important that all defined scenarios are used in order to reach certain test coverage<br />
as broad as possible. For this, the statistics plug-in (which can be found in the menu item<br />
“Tools”) creates an overview for the currently selected testlet in the form of a table (see Figure<br />
60).<br />
The following subsections will illustrate the four columns in detail on the example of a testlet.<br />
The meanings for transitions and path are analogue.<br />
Figure 60: Statistics for "Test of lights control"
Page 84 <strong>TPT</strong> User’s <strong>Guide</strong><br />
15.8.1 First column – Object overview<br />
The first column contains a tree, which shows the hierarchy of all the testlets, transitions and<br />
paths in this order. Each object has the two nodes “variants”, which lists all the variants of an<br />
object, and “pairs”, which contains a list of all other testlets, transitions and paths.<br />
A completely opened testlet-node can be seen in Figure 60, number 1.<br />
15.8.2 Second column - Amount<br />
The second column simply displays the amount how often a testlet and its states were used in<br />
all scenarios. The percentage can be read of the size of the bar, which relates to the total<br />
number of scenarios (see Figure 60, number 2).<br />
15.8.3 Third column – Spreading of variants<br />
To see whether tests are distributed well <strong>TPT</strong> analyses the coverage of all states in a single<br />
testlet. Therefore <strong>TPT</strong> calculates the “distance” between the current spreading and the optimal<br />
possible arrangement with the amount of the testlet.<br />
The example (see Figure 60 number 2/3) shows that the testlet ”changing light intensity” is<br />
used six times. In detail: one state is used four times; the second two times and the three<br />
remaining are never used. The optimal arrangement with five states and six available would be<br />
one state two times and every other state once.<br />
Similar to the process of standard deviation <strong>TPT</strong> calculates in this case a value of 2.8. The<br />
appropriated green bar relates to the worst calculated value of all objects.<br />
15.8.4 Fourth column – Spreading of combinations<br />
To evaluate the coverage it is also important to consider the combinations of two objects. To<br />
realize the importance an example: two testlets can be good in the sense of the second column<br />
but state 1 of testlet A is only used with state 2 of testlet B. To cover such problems <strong>TPT</strong> also<br />
calculate a value for the combinations of objects.<br />
The relation between two objects and its variants can be described by a matrix which contains<br />
the amounts of a state in combination with every other variant. Similar to the spreading of<br />
variants <strong>TPT</strong> calculates the “distance” between this matrix and the best possible distributed<br />
matrix with the same total amount. This value is now called the distance between two objects<br />
(see Figure 60, number 5).<br />
Out of all the distances the average distance of a testlet is made and shown in the fourth<br />
column (see Figure 60, number 4). The bar again is related to the biggest distance between two<br />
objects. In addition the blue line over the bar shows the minimum and maximum distance from<br />
this testlet.<br />
15.9 Restore from history<br />
<strong>TPT</strong> automatically saves a copy of the currently open file at regular intervals if it has been<br />
changed. A backup is created every five minutes by default or when the user saves the file<br />
manually. By default a total of twenty backups are kept and may be restored.<br />
To restore a backup, use the menu item File | Restore From History. There, you will<br />
find an overview, listing all saved backup files along with their backup time and information<br />
about whether the save operation has been performed manually or automatically. To restore a<br />
backup file, select the desired backup time in the list and use the “Restore” button.
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 85<br />
15.10 Environment variables<br />
Environment variables can be used to customize settings for storage, execution, and meta-data<br />
in <strong>TPT</strong>. To name some examples: global settings of particular directories, installation paths,<br />
project names etc. can be stored as environment variables. There are predefined environment<br />
variables and user defined environment variables. Environment variables are handled by <strong>TPT</strong> by<br />
means of simple text substitution. There is no semantic analysis of environment variables done<br />
by <strong>TPT</strong>. Environment variables can be seen as “configuration place holders” that help to<br />
separate invariant settings from variant parts.<br />
Environment variables can be used in file paths, names, scripts etc. using the<br />
${variablename} convention. For example “${tpt.tptfile.dir}/myfile.txt”<br />
addresses a file myfile.txt in the same folder as the current tpt file (see section 15.10.2 for a<br />
description of environment variable tpt.tptfile.dir).<br />
In some cases environment variables do not exist. You can use a default substitute if you want<br />
to handle these situations manually: “${tpt.tptfile.dir?TEMP}/myfile.txt” will<br />
deliver “TEMP/myfile.txt” if the variable “tpt.tptfile.dir” does not exist, since<br />
“TEMP” is the default substitute.<br />
15.10.1 Definition of environment variables<br />
Environment variables can be defined at three different levels:<br />
Global environment variables are defined independent of the <strong>TPT</strong> model files globally in the<br />
context of the <strong>TPT</strong> installation. More precisely, global variables are stored in the global<br />
tpt.config file which is stored in the folder /Local/<strong>TPT</strong>. The purpose of<br />
global variables is to specify machine specific settings that are not dependent on the <strong>TPT</strong><br />
model but on the machine properties such as installation paths, project paths etc.<br />
Model specific environment variables are defined specific for a <strong>TPT</strong> model file. The purpose of<br />
model specific environment variables is to define common attributes that can be shared at<br />
different places within the <strong>TPT</strong> model such as the name of a project, version numbers etc.<br />
Platform configuration specific variables are defined in the context of a concrete platform<br />
configuration. Platform specific variables can be used to fine tune the platform configuration or<br />
in conjunction with derived configurations.<br />
Environment variables can be overwritten with the precedence global < model < configuration.<br />
In other words, model specific variables can overwrite global variable settings and platform<br />
configuration variable settings can overwrite model and global settings.<br />
The following environment variables are predefined automatically by <strong>TPT</strong>.<br />
15.10.2 Execution Configuration variables<br />
Name Format Description<br />
tpt.testdatadir dir Directory where to store the data collected at compilation, runtime,<br />
assessment, and reporting tests<br />
tpt.tptfile file The filename (complete path) of the current tpt file.<br />
tpt.tptfile.dir dir The directory containing the current tpt file.<br />
tpt.date text current date in format YYMMDD<br />
tpt.time text current time in format HHMMSS<br />
tpt.rootdir dir Installation path of <strong>TPT</strong>
Page 86 <strong>TPT</strong> User’s <strong>Guide</strong><br />
15.10.3 General platform configuration variables<br />
In addition to the environment variables stated above, the following environment variables can<br />
be used in the context of platform configurations:<br />
Name Format Description<br />
tpt.stepsize double step size of the test execution as specified in the platform<br />
configuration<br />
tpt.timeout double time out of the test execution as specified in the platform<br />
configuration<br />
15.10.4 MATLAB platform configuration variables<br />
Name Format Description<br />
tpt.matlab.modelname text Name of the test frame model to be executed<br />
tpt.matlab.modelfile file File name of the test frame model file that is responsible<br />
for execution<br />
tpt.matlab.modelfile.dir dir Directory where the model file (test frame model file) is<br />
stored<br />
tpt.matlab.version text Logical name of the MATLAB version<br />
tpt.matlab.rootdir file Directory where MATLAB is installed<br />
tpt.matlab.restartnow int This preference is 1 if MATLAB will be restarted<br />
immediately. Otherwise the value is 0. MATLAB will be<br />
restarted (value is 1) if and only if the parameter “Restart<br />
MATLAB every X tests” is set and if the given number X of<br />
tests has been reached.<br />
tpt.matlab.paramstoworkspace text This variable will be substituted by a sequence of mstatements<br />
that set all the test parameters of type<br />
EXCHANGE defined in the <strong>TPT</strong> test case as MATLAB<br />
workspace variables. In order to use this feature, just add<br />
${tpt.matlab.paramstoworkspace} as a<br />
statement into your run test script.<br />
15.10.5 Backbone platform configuration variables<br />
Note, that the following variables are only available together with the backbone integration<br />
extension of <strong>TPT</strong>, which is not part of the regular <strong>TPT</strong> installation. The backbone platform allows<br />
interaction with the Backbone simulation environment for SIL simulations. This platform has<br />
been developed by DaimlerChrysler. For more information send an email to<br />
tpt@piketec.com.<br />
Name Format Description<br />
tpt.backbone.rootdir dir root directory of the backbone installation (dir that contains<br />
“dllkopp/bin/backbone.exe”)<br />
tpt.backbone.config file the “bbc-file” which is the file that describes the modules to<br />
be loaded by the backbone. See backbone documentation<br />
about details. This file is configured in the backbone config<br />
panel<br />
tpt.backbone.workdir dir directory where the backbone will be started<br />
15.10.6 Scenario specific variables<br />
Name Format Description<br />
tpt.scenario.name text Name of the currently executed scenario<br />
tpt.scenario.groupname text Name of the group of the currently executed scenario<br />
tpt.scenario.id int Unique ID of the currently executed scenario<br />
tpt.scenario.dir dir Directory where data for the currently executed scenario is<br />
been stored<br />
tpt.scenario.islast int This preference is 1 if the current scenario is the last one that<br />
is being executed using the current settings. The preference
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 87<br />
is 0 if another scenario will be executed immediately with<br />
the same configuration settings.<br />
tpt.scenario.tvmfile file The filename (complete absolute path) of the JVM file<br />
corresponding to the currently running scenario<br />
tpt.scenario.tptbinfile file The filename (complete absolute path) of the <strong>TPT</strong>BIN file<br />
containing the results of the currently running scenario<br />
tpt.scenario.measurementfile file The filename (complete absolute path) of a measurement<br />
file (file containing the measurement values), if any. This<br />
variable does not exist, if there is no measurement in this<br />
context.<br />
tpt.scenario.parafile file The filename (complete absolute path) of the parameter file
15.10.7 Overview<br />
Data dir<br />
Execution configuration MATLAB configuration Backbone configuration<br />
Reference dir<br />
Report templatre<br />
Attribute values<br />
Logfile<br />
Startup dir<br />
tpt.rootdir • • • • • • • • • • • • • • • • • •<br />
tpt.tptfile • • • • • • • • • • • • • • • • • •<br />
tpt.tptfile.dir • • • • • • • • • • • • • • • • • •<br />
global variable settings • • • • • • • • • • • • • • • • • •<br />
tpt-file specific variable settings • • • • • • • • • • • • • • • • • •<br />
tpt.testdatadir • • • • • • • • • •<br />
tpt.date • • • • • • • • • • •<br />
tpt.time • • • • • • • • • • •<br />
tpt.stepsize • • • • • • • • • • • • • •<br />
tpt.timeout • • • • • • • • • • • • • •<br />
platform specific user variables • • • • • • • • • • • • • •<br />
tpt.matlab.rootdir • • • • • • • • • •<br />
tpt.matlab.version • • • • • • • • • •<br />
tpt.matlab.modelfile • • • • • • • • • •<br />
tpt.matlab.modelfile.dir • • • • • • • • • •<br />
tpt.matlab.modelname • • • • • • • • • •<br />
tpt.matlab.restartnow •<br />
tpt.backbone.rootdir • • •<br />
tpt.backbone.config • • •<br />
tpt.backbone.workdir • • •<br />
tpt.scenario.name • •<br />
tpt.scenario.groupname • •<br />
tpt.scenario.id • •<br />
tpt.scenario.dir • •<br />
tpt.scenario.islast • •<br />
tpt.scenario.tvmfile • •<br />
tpt.scenario.tptbinfile • •<br />
tpt.scenario.parafile • •<br />
Startup script<br />
Original model<br />
file<br />
Original model<br />
load script<br />
Original model<br />
path<br />
Generate test<br />
frame model file<br />
Exec config test<br />
frame model file<br />
Exec config<br />
model load<br />
Exec config run<br />
test script<br />
Backbone dir<br />
Backbone config<br />
file<br />
Backbone<br />
working dir<br />
Backbone<br />
command
16 Index<br />
add unambiguous variants ............................................ 32<br />
additional parameters, specifying ................................... 7<br />
assessment<br />
engine ......................................................................... 6<br />
Auto-completion ........................................................... 81<br />
automaton fragments<br />
export into an image file ........................................... 24<br />
save ........................................................................... 24<br />
<strong>TPT</strong> import ................................................................ 24<br />
automatons<br />
copy .......................................................................... 24<br />
cut out selected automaton...................................... 23<br />
debug ........................................................................ 73<br />
delete ........................................................................ 23<br />
export into an image file ........................................... 24<br />
move ......................................................................... 23<br />
parallel automatons .................................................. 22<br />
view ........................................................................... 25<br />
automatons, select<br />
select individual ........................................................ 23<br />
select multiple .......................................................... 23<br />
breakpoint<br />
find ............................................................................ 75<br />
browser<br />
scenario....................................................................... 8<br />
teslet ........................................................................... 8<br />
C-code testing ............................................................... 51<br />
channel,assigning<br />
local ........................................................................... 14<br />
observation ............................................................... 13<br />
stimulation ................................................................ 14<br />
channel,declaration ....................................................... 10<br />
change....................................................................... 12<br />
create ........................................................................ 11<br />
delete ........................................................................ 12<br />
editor ........................................................................ 10<br />
clipboard<br />
copy automaton elements as an image .................... 24<br />
insert automaton elements ...................................... 24<br />
column<br />
first ........................................................................... 84<br />
fourth ........................................................................ 84<br />
second ...................................................................... 84<br />
third .......................................................................... 84<br />
constant,declaration ..................................................... 10<br />
change ...................................................................... 12<br />
create........................................................................ 11<br />
delete........................................................................ 12<br />
editor ........................................................................ 10<br />
converter data ................................................................ 6<br />
create elements<br />
final node elements .................................................. 17<br />
initial node elemnts .................................................. 16<br />
state elements .......................................................... 17<br />
data converter ................................................................ 6<br />
debug<br />
basic modules ........................................................... 73<br />
execute a test ........................................................... 76<br />
plug-in-features ........................................................ 74<br />
definition<br />
parameter ................................................................. 32<br />
scenarios ................................................................... 32<br />
direct-definition,testlet ................................................. 26<br />
signals ....................................................................... 28<br />
editor<br />
template ............................................................. 62, 64<br />
environment<br />
MATLAB/Simulink ..................................................... 41<br />
variables ............................................................. 51, 85<br />
variables ................................................................... 44<br />
equation, testlet<br />
change order ............................................................ 27<br />
define........................................................................ 27<br />
Error message<br />
Compilation on the fly .............................................. 25<br />
EXE Platform ................................................................. 49
Page 90 <strong>TPT</strong> User’s <strong>Guide</strong><br />
executing <strong>TPT</strong><br />
assessment.................................................................. 6<br />
command line ............................................................. 6<br />
executing <strong>TPT</strong> .................................................................. 5<br />
execution<br />
configuration variables ............................................. 85<br />
EXE-Platform<br />
platform configuration .............................................. 51<br />
test C Source-code .................................................... 51<br />
<strong>TPT</strong>-VM-API ............................................................... 50<br />
Exit <strong>TPT</strong> ............................................................................ 9<br />
export<br />
automatons and automaton fragments .................... 24<br />
function<br />
history ....................................................................... 81<br />
replace ...................................................................... 80<br />
search........................................................................ 80<br />
function wizard<br />
access ........................................................................ 69<br />
asymptote function ................................................... 71<br />
constant .................................................................... 70<br />
individual functions ................................................... 70<br />
motivation................................................................. 69<br />
periodic function ....................................................... 71<br />
ramp function ........................................................... 70<br />
target ........................................................................ 69<br />
import<br />
automaton fragments ............................................... 24<br />
interface .............................................................. 45, 82<br />
interface<br />
import ....................................................................... 45<br />
intermission points ........................................................ 57<br />
junction, create ............................................................. 22<br />
log server ......................................................................... 6<br />
MATLAB<br />
close model and MATLAB ......................................... 48<br />
Console ............................................................... 42, 44<br />
environment ............................................................. 41<br />
exchange parameter ................................................. 33<br />
Log-file ...................................................................... 42<br />
mat file ...................................................................... 28<br />
Model load script ...................................................... 43<br />
open Simulink testframe model ................................ 48<br />
platform .................................................................... 41<br />
platform configuration variables .............................. 86<br />
Ports .......................................................................... 42<br />
RMI communication .................................................. 42<br />
start procedure ......................................................... 47<br />
Startup-dir ................................................................. 42<br />
test execution procedure .......................................... 47<br />
Test run script ........................................................... 44<br />
Object overview ............................................................ 84<br />
options<br />
generator .................................................................... 7<br />
log server .................................................................... 6<br />
parameter<br />
array .......................................................................... 33<br />
definition................................................................... 32<br />
exchange with MATLAB ............................................ 33<br />
scalar ......................................................................... 33<br />
parameter,declaration .................................................. 10<br />
change....................................................................... 12<br />
create ........................................................................ 11<br />
delete ........................................................................ 12<br />
editor ........................................................................ 10<br />
path variants<br />
select ........................................................................ 30<br />
pauses ........................................................................... 57<br />
platform ........................................................................ 41<br />
EXE ............................................................................ 49<br />
EXE-executable ......................................................... 49<br />
select ........................................................................ 41<br />
standalone ................................................................ 54<br />
plug-in features<br />
debug ........................................................................ 74<br />
plug-ins ........................................................................... 6<br />
replace .......................................................................... 80<br />
report<br />
editor .......................................................................... 7<br />
generator .................................................................... 7<br />
report template editor .................................................. 64<br />
Restore .......................................................................... 84<br />
scenario<br />
browser ...................................................................... 8<br />
variables ................................................................... 86<br />
scenario groups<br />
comment .................................................................. 38<br />
create........................................................................ 36<br />
delete........................................................................ 37<br />
nameing .................................................................... 37<br />
rename ..................................................................... 37<br />
scenarios ....................................................................... 29<br />
comment .............................................................. 8, 38<br />
creat scenarions and groups ..................................... 36<br />
delete scenarios and scenario groups ...................... 37<br />
direct definition ........................................................ 32<br />
naming ...................................................................... 37<br />
organisation .............................................................. 35<br />
rename ..................................................................... 37<br />
time partition............................................................ 29<br />
search ............................................................................ 80<br />
select automatons<br />
select individual ........................................................ 23<br />
select multiple .......................................................... 23<br />
selection<br />
clear .......................................................................... 23<br />
server<br />
loging ........................................................................ 83<br />
Simulink<br />
environment ............................................................. 41<br />
platform .................................................................... 41<br />
Spreading of combinations ........................................... 84<br />
Spreading of variants .................................................... 84<br />
starting <strong>TPT</strong> ..................................................................... 5<br />
start-up procedure, problem .......................................... 7<br />
state variants<br />
select ........................................................................ 30<br />
states, rename .............................................................. 18<br />
Statistics ........................................................................ 83<br />
template<br />
create........................................................................ 64<br />
editor .................................................................. 62, 64<br />
elements ................................................................... 66<br />
load ........................................................................... 66<br />
save ........................................................................... 66<br />
test<br />
execution .................................................................. 55<br />
test analysis................................................................... 59<br />
test data viewer ............................................................ 59<br />
modes ....................................................................... 61
<strong>TPT</strong> <strong>User's</strong> <strong>Guide</strong> Page 91<br />
shortcuts ................................................................... 61<br />
test frame<br />
generate .................................................................... 46<br />
test models,create, save and load ................................... 9<br />
test sets<br />
selection .................................................................... 39<br />
testlet<br />
browser ....................................................................... 8<br />
content delete .......................................................... 35<br />
create ........................................................................ 35<br />
deletion ..................................................................... 35<br />
embedded ................................................................. 18<br />
graphical modelling ................................................... 15<br />
organisation .............................................................. 35<br />
rename ...................................................................... 18<br />
rename ...................................................................... 36<br />
testlet, signature ........................................................... 13<br />
textual notes<br />
create ........................................................................ 22<br />
transition specifications<br />
select ........................................................................ 31<br />
transitions<br />
add , move and remove contorl of points .......... 19, 20<br />
create........................................................................ 19<br />
establish.................................................................... 19<br />
name ......................................................................... 20<br />
reconnect.................................................................. 21<br />
rename ..................................................................... 20<br />
user guide ....................................................................... 5<br />
variables<br />
scenario .................................................................... 86<br />
window<br />
breakpoints-overwiew .............................................. 79<br />
channel watch .......................................................... 79<br />
control-debug-session .............................................. 78<br />
documentation ........................................................... 8<br />
editor .......................................................................... 8<br />
main ............................................................................ 7<br />
menu,tool bar ............................................................. 9