This chapter describes the ITEX Simulator in the UNIX version of ITEX. It gives an introduction to the concept of the ITEX Simulator, as well as a guide to its functionality and an introduction to using the ITEX Simulator for controlling real Executable Test Suites.
Note: UNIX version This is the UNIX version of the chapter. The Windows version is The ITEX Simulator (in Windows). |
The ITEX Simulator allows you to:
The possibilities to pinpoint the cause of the test result beyond the test verdict fail are vast, and will undoubtedly help in improving the time needed for testing in the development phase.
The steps necessary to simulate parts of a test suite are:
|
|
A complete test of a system design can be performed prior to building a prototype by designing the system in SDT using SDL, and using ITEX to write test specifications in TTCN, or using a tool to automatically or semi-automatically generate test suites from a system description in any language. The actual testing is then a matter of connecting the two simulators.
To achieve the connection, follow these steps:
start-itex
in the SDT Simulator, followed by any of the start commands (Forever
, Go
...).The loaded SDL system is now being simulated on the SDT side, and conformance tested from the ITEX side with the ITEX Simulator.
Figure 224 : The ITEX Simulator Test Setup window
|
The Test Setup window is the main window of the ITEX Simulator. It manages an Executable Test Suite and a number of associated documents. The main part of the window is used for test selection. The left list depicts the currently available tests, and the right list depicts a selection of test cases and/or test groups.
The menu choices in the File menu are used for creating and saving documents. For information on the operations not mentioned here, see the general description of a Telelogic Tau File menu in File Menu.
Creates a new Setup document. The new setup inherits the Executable Test Suite from the current Setup.
Opens a previously saved Setup file in a new window.
|
Saves the current Setup file. If the Setup was not previously saved, a name will be prompted for. A saved Setup consists of the file names of the associated documents, as well as the ETS name. |
Saves the Setup file with another file name. A running ETS might need to be restarted in order for changes to become effective.
Restarts the Executable Test Suite / Simulator. This may compromise the consistency of running test cases, but might be necessary in order to make changes to the Setup effective.
Closes the current view of the Setup document. If there are no more views of the Setup, the ETS will be terminated along with any test cases. If the Setup has been changed, a dialog will prompt for a file name for saving the Setup before it is closed. If the Setup is the only one currently open, the program will quit.
This section lists the Simulator commands available in the Edit menu.
Enables you to select another ETS for the test Setup. This might be useful for selecting a new ETS, using the same Setup as the old one.
Enables you to add a document type to this Setup. A standard set of document types are provided by default at program start-up.
Sends a command to the ETS such that it lists all Test Cases in the Available list.
Sends a command to the ETS such that it lists the Test Groups.
Adds all tests from the set of available tests to the set of selected tests.
|
Adds the tests currently selected in the Available list, to those present in the Selected list. Both test cases and test groups may be present in the Selected list at the same time. |
|
Removes the selected tests from the Selected list. |
Removes all tests from the Selected list.
This section lists the Simulator commands available in the Execute menu.
|
Cancels a test in progress. All information will be lost and the ETS returns to its initial state. This might compromise the consistency of a test since it might leave the IUT in any state. |
|
Temporarily pauses the test execution. This might be used to examine the state of the IUT or of the ETS. |
|
Steps one line of TTCN code. In a simulated environment this is a well-defined operation, as opposed to a real test system. In the latter case, timing might be compromised. |
|
Runs/Continues a test at full speed until it is finished or until a breakpoint is reached. |
|
Shows the breakpoint editor, as described in The Simulator Editor. Notice: If the quick button is disabled, this is because no breakpoint document is currently associated with the Setup. Use this menu item to add such a breakpoint document to the Setup. |
Enables all breakpoints (default).
Temporarily disables all breakpoints.
Monitors all PCO Queues in a separate monitor window.
Monitors all Timers in a separate monitor window.
Monitors all CPs in a separate monitor window.
Monitors all CPs in a separate monitor window.
Highlights the next statement line to be executed in the Table Editor. This is on condition that you are running an ITEX Simulator session and that the Simulator was started from within ITEX.
This section lists the Simulator commands available in the Window menu.
Enables you to display a new view of the same Setup, with a possibly different test selection. No new Setup is created with this command.
|
Shows a new view of the Test Execution trace. If the item is not accessible, select Document and then Add Trace Document in the Edit menu to add a document of this type to the current Setup. |
|
Shows a new view of the Test Conformance Log. If the item is not accessible, select Document and then Add Log Document in the Edit menu to add a document of this type to the current Setup. |
|
Shows a new editor for the Test Configuration, see The Simulator Editor. If the item is not accessible, select Document and then Add Configuration Document in the Edit menu to add a document of this type to the current Setup. The Test configuration is system dependent and not used for simulation. |
|
Shows a new editor for the Test Suite Parameters, see The Simulator Editor. If the item is not accessible, select Document and then Add Parameter Document in the Edit menu to add a document of this type to the current Setup. |
A generic editor is present for editing some of the documents, as for instance the Breakpoints, Parameter and the Configuration. It is of limited interest to those who are only interested in simulation, but it might be of more interest if you consider using the GUI for running real executable test suites.
Figure 225 : The Simulator editor for breakpoints
|
The editor is row oriented and the format of each row is determined by the current ETS. It is up to the ETS to warn the user for syntactic and/or semantic errors in the edited document. Please refer to the documentation of the ETS for more throughout definitions of the expected contents of each row.
The menu choices in the File menu are used for creating and saving documents. For more information, see the general description of a Telelogic Tau File menu in File Menu.
The following section lists the Simulator Editor commands available in the Edit menu.
|
Undoes the last change of the document. This functionality is disabled when the document is saved or if a new document is opened. There are more than 200 undo steps. |
|
Redoes the next undone change to the document. Applying a new operation removes any non-redone steps. |
|
Cuts the currently selected row from the document. The row is placed in an internal clipboard. |
|
Copies the currently selected row from the document to the internal clipboard. |
|
Pastes the contents of the internal clipboard before the currently selected row. |
|
Inserts an empty row before the currently selected row. |
A total of 7 file types are handled by the Simulator User interface. Fortunately, most sessions involve only a subset of those file types. The file types and a short description are listed below:
.tts
).log
).ttt
).ttp
).ttc
).ttb
)The simulator can present messages to the user in three forms:
Informative messages are normally presented at the status bar. These might be for instance progress reports or other simple messages, which are only of a temporary interest (such as the tool tips).
Warnings, also known as "non-critical errors", are events that indicate a problem during the preparation for a simulation, or during the actual simulation run. These are always presented in standard Motif warning dialogs. Warnings normally does not cause a simulation to halt.
Critical errors will halt the simulation. They are presented by an error dialog that appears in front of the application. The error dialog can often appear large and intimidating, but it simply gives a more verbose reason to why the error occurred, and what steps should be taken to avoid it.
The user interface uses a publicly available format for communication with the ETS. Implementation of a management interface for an ETS is simple since the ETS only uses the standard I/O channels for communication with the GUI. Please request a protocol definition from Telelogic if you consider adapting your own test suite using this GUI. It is currently unlicensed and might be started using this command:
$telelogic/itex/bin/${hosttype}bin/isimui -help
This section specifies the data type mapping used by the co-simulation of the SDT and ITEX simulators. Specifically it identifies the transfer syntax used in the communication between the SDT and the ITEX simulators for each supported data type.
This subsection describes the mapping from TTCN types to SDL types. For each TTCN type the corresponding SDL type and some examples of the transfer syntax is given.
TTCN Type | SDL Type | Transfer Syntax Example |
---|---|---|
SimpleType |
syntype |
same as referenced type |
Struct |
struct |
(. 1, true .) |
PDU |
struct |
(. 1, true .) |
ASP |
- (ASPs maps to signals) |
|
This subsection describes the mapping from ASN.1 types to SDL types. For each ASN.1 type the corresponding SDL type and some examples of the transfer syntax is given.
This subsection defines the mapping from SDL to TTCN and to ASN.1. For each SDL type first the TTCN type is given, then the ASN.1 type and finally an example of transfer syntax.
SDL Type | TTCN Type | ASN.1 Type | Transfer Syntax Example |
---|---|---|---|
Array |
- |
SEQUENCE OF |
(: 1, 4, 7 :) |
String |
- |
SEQUENCE OF |
(: 1, 4, 7 :) |
Powerset |
- |
SET OF |
[ 1, 6, 8 ] |
Bag |
- |
SET OF |
[ 1, 6, 6 ] |