In ITEX, TTCN test components can be edited on table level as well as restructured on a hierarchical level. This chapter describes the editors and information managers in ITEX in Windows and how to use them.
For an overview of ITEX, see Introduction to ITEX in Windows.
Note: Windows version This chapter is Windows only. The corresponding UNIX chapters are The ITEX Browser (on UNIX) and The ITEX Table Editor (on UNIX). |
ITEX can be used for development, specification and compilation of test system components in the TTCN language. The functionality included will be described below.
ITEX supports all of the standardized, non-compact tables that are defined in ISO/IEC 9646-3. The compact test case dynamic behaviour table (ISO/IEC 9646-3, clause C.3) and concurrent TTCN tables are also supported. The compact tables for constraints (also in Annex C of ISO/IEC 9646-3) are not supported.
The general user interface concepts and common menu choices in Telelogic Tau are described in User Interface and Basic Operations.
The contents of a TTCN test suite can be viewed in the Browser, the Finder and the Table Editor:
The Log Manager gives another view of the test suite. It presents log outputs from the currently loaded test system components. Information from various operations, such as analysis and simulation, will appear in the test component log in the Log Manager. See Viewing Log Information.
You can start ITEX from the Organizer in the following ways:
Figure 226 : ITEX is started and the Browser displays a modular test suite
|
When you open a TTCN document it will be displayed in the Browser. As the structure of TTCN is tree oriented, the Browser presents an overview of the test system component in tree form.
Multiple Browser views can be opened on a document and all editing performed in a Browser will be simultaneously reflected in the other opened Browser windows.
In addition to this, you may create sub Browsers. This means that you restrict the view to only display a few nodes. In combination with the possibility to have multiple Browsers open on the same test document, this enables you to keep just the interesting bits of information in a couple of small Browser windows.
By using the edit operations, such as Add In and Delete, you can manipulate the Browser structure to build a complete TTCN system component. You can control the amount of information actually displayed in a Browser, by collapsing and expanding sub trees.
You open the Browser and a TTCN document by selecting New or Open from the File menu. From the File menu, you can also select the four most recently used files.
To open additional Browsers for the same component:
The Browser is also opened automatically when ITEX is started from the Organizer, as described in Starting ITEX.
The initial structure of a TTCN tree contains place holders for the static parts of the system component. These static nodes are automatically created by ITEX whenever you create a new test system component. What you usually do when you build a test system component is to add dynamic child nodes to the static nodes, and fill them with test specification data. Examples of static nodes are the Declarations Part and the Constraints Part. Examples of dynamic nodes include tables, groups or objects in a table (e.g. test case variables).
The Browser displays all the static nodes in the order defined in the TTCN standard. This ordering cannot be changed. For example, it is not possible to have the Constraints Part coming before the Declarations Part. Only the dynamic items -- the tables -- may be added and deleted.
Static nodes are the only nodes that can become the root of a sub Browser.
Static nodes can take on four different appearances depending on the parse status of dynamic nodes below. Whenever you analyze a sub-tree, or parts of it, or edit it in a way such that the parse status of one or more dynamic nodes is altered, an abnormal parse status is indicated by the appearance of the static parent nodes.
To find a table that has to be corrected, you follow the marked nodes through the tree. Note that erroneous nodes have precedence over non-parsed ones, so even a single erroneous child to a static node will make it red no matter how many non-analyzed nodes there are in the sub-tree.
It may be that some of the static nodes will remain unused. A TTCN test system component is allowed to leave out the use of for example Test Case Variables. However, although this empty node will be displayed in the Browser, it will not be printed or output in the TTCN-MP format.
A dynamic node is always associated with a table and can be accessed by the Table Editor. Two kinds of dynamic nodes can have children, namely multiple tables and group tables. Multiple tables look just like ordinary table icons, with the added feature of possible children, whereas group tables (referred to as group nodes in the Browser) have a different look to distinguish them somewhat from the others.
Figure 227 : Different node types in a Browser
|
As the Browser displays the information in a TTCN document in a tree oriented way, it is very simple to control the amount of information that the you want to see at a specific moment.
Nodes with sub-trees are possible to expand and collapse to show or hide the branch below it. This works in the same way that you expand and collapse directory levels in the Windows Explorer by double-clicking.1
<Left arrow>
when an expanded node is selected. <Right arrow>
when a collapsed node is selected.Click a node to select it. <Ctrl>
-click a node to extend the current selection.
Instead of using the mouse for navigation, you can use the following shortcuts:
<Down Arrow>
. <Up Arrow>
.To rename a dynamic node:
<Enter>
.
|
To create a sub Browser:
|
To get a Browser with the full TTCN document tree, select New Window from the Window menu.
The static structure is automatically generated when a TTCN document is first created and cannot be edited. To build an individual TTCN system component, you need to add named tables -- such as PDUs, constraints and behavior tables -- and named objects to the multi-object tables -- such as test case variables, PCOs and timers.
Use the Edit menu choices for adding, deleting, copying, pasting, etc, editable nodes -- also called dynamic nodes -- (that is, groups, tables or objects in a multiple object table) in the Browser.
The test suite overview is a collection of tables that contain test suite structure, test case index and default index. These are used for reference in a printed copy of the system component, as described in the TTCN standard. The overview will be generated the first time you print the test suite, export it or open the overview tables. The generation may take a little while, but it is only needed once for each session, as the tables are automatically updated when you edit the test suite.
|
To add a new dynamic node as the last child of the selected node: |
To add a new dynamic node before the selected node:
<Ctrl+A>
.It is possible to add a new test case group, a new test step group or a new default group in the Dynamic Part.
|
To add a new group as the last child to the selected node:
|
To add a new group before the selected node:
To add a table to a group, select the group and Add In.
It is possible to specify that all the test cases in a given group are displayed in the compact format (see Annex C, clause C.3 of ISO/IEC 9646-3). The following commands allow the insertion of compact groups in the test suite hierarchy:
To add a compact group before the selected node:
To add a compact group as the last child of the selected node:
You may cut or copy dynamic nodes. Dynamic nodes may also be pasted according to compatible classes, for example:
However, it is not possible to paste a constraint, for example, as a test case behaviour.
Paste is not available if the clipboard contains an object of an incompatible type to the selected object.
|
To cut the selected node and its sub tree: |
|
To copy the selected node and its sub tree: |
|
To paste a node before the selected node:
|
|
To paste a node as the last child to the selected node: |
The most convenient way of creating a constraint is to copy the corresponding type and paste it as a constraint. Do this by copying the chosen type (ASP, PDU, CM or structured type), and then pasting it among the corresponding constraints. This works for both tabular constraints and for ASN.1 constraints.
The pasted table will have all its local names filled in. All that remains is to give the constraint a name and fill in the values.
Dynamic nodes may be removed from the test document.
|
To delete the selected node and its sub tree:
|
All editing commands can be undone, and undone actions can be redone.
|
|
To open a table, either:
<Enter>
It is possible to open several tables at the same time, but if it is more than ten, you will be asked to confirm it.
|
To print a TTCN document: |
For more information, see The Print Dialogs in ITEX.
The Table Editor is used for editing various TTCN tables. It displays the tables in three different parts: the header, the body and the footer. Each part, as well as many fields, can be resized.
You can edit tables by using the mouse and/or the keyboard. Rows in a table can easily be added, copied (both within a table and between other tables) and removed. The Table Editor shows the analysis status of the table contents, by use of colored text, and provides for immediate visual feedback during test simulation.
Figure 228 : A Table Editor for a test case
|
The three parts of a table -- header, body and footer -- are separated by horizontal bars, which you can drag to change the relative size and to hide parts of the table from view.
You can change the individual height of rows by dragging the leftmost row separator. In the body part, you may also change the individual width of columns by dragging the separators of the header fields.
Note that changing the column width may have effect on the row height, as the row will change to display all information it contains.
To change the name of a table, you can either rename its node in the Browser or edit the table name in the table itself.
To set the input focus in another part of a table, either:
<left arrow>
and <right arrow>
to move between the last field of one part and the first field of another part.To set the input focus within a part, either point and click or use the arrow keys. There are also some shortcuts:
When you have used the keyboard to move the input focus to a field, the contents of the field will be replaced with the new text when you start typing. To edit the existing text, you have to press <Home>
or <End>
first.
If you use the mouse to explicitly set the input focus in a field, you can start editing the existing text directly with the keyboard.
The table fields will expand automatically to accommodate the text. You can also add a line break in the text by using <Return>
.
To cut, copy and paste text in the fields, you use the corresponding commands in the popup menu, the Edit menu or the standard Windows shortcuts. However, note that it is only possible to paste text into a table field when the field contains a text pointer.
Note: The paste buffer for text is not the same as the one used for entire rows in the body of a table. |
You can add, delete, cut and copy rows in the body of all TTCN tables that contain more than one column. This is not possible in the headers and footers, since the formats of these parts of a table are defined by the TTCN standard.
The ASN.1 tables only have a single column with a single row and therefore adding, deleting, cutting and copying rows is not applicable. However, the contents of ASN.1 tables can still be copied, pasted, etc, as text.
<Shift>
-clicking another. <Ctrl>
-clicking the leftmost cell of the row.
Note: Setting the input focus will also deselect all selected rows. |
Rows in the body of a table may be cut, copied and pasted. Copy and Paste work across all the different tables although the Paste command is mainly intended for use among tables of the same or similar types.
|
To cut selected row or rows from the table: |
|
To copy selected row or rows: |
|
To paste a row or rows: |
To paste a row or rows before the current row:
It is possible to paste a row when a body row or field is selected.
Note: The paste buffer for entire rows in the body of a table, is not the same as the one used for text. |
To delete the selected row or rows, select Delete from the Edit menu.
|
To insert a new row before a selected row: |
|
To insert a new row after a selected row: |
To insert a new tree header row before a selected row:
To insert a new tree header row after a selected row:
You may also use <Ins>
to insert rows. Where the row will be inserted depends on the input focus:
<Ctrl+Ins>
gives the same effect as above but the new row is inserted before the row/field.The indention of behaviour lines can be increased and decreased:
|
To increase the indentation of a row in focus, or selected rows, by one position:
|
|
To decrease the indentation of row in focus, or the selected rows, by one position:
|
If you right-click a table field containing an identifier, you may open the table representing the identifier from the pop-up menu:
<Control>
-right-click the identifier.The Table Editor maintains a history of tables displayed with Open <Identifier> described above. This is similar to going back and forward in a web browser:
|
To go forward in the history of the Table Editor:
|
|
To go back in the history of the Table Editor:
|
The Data Dictionary gives you an alternative way of writing behaviour lines, by providing easy access to lists of PCOs, types, constraints, timers, etc, that you have already defined
Before you can use the Data Dictionary, the TTCN document has to be analyzed, because PCOs, types and constraints with major reference problems or missing type references will not be presented in the lists in the dialog.
To open the Data Dictionary:
It is only possible to have one Data Dictionary dialog opened.
The Data Dictionary dialog contains:
Generate a send or receive statement by selecting a PCO, a type and a constraint. You can also add a timer, assignment and qualifier.
Figure 229 : The Send/Receive tab in the Data Dictionary dialog
|
To add a send or receive statement:
In the Timer tab, you may generate a StartTimer, CancelTimer or a Timeout statement. As described above, you can also add timer statements from the Send/Receive tab. The difference is that from this tab you can also add Timeout value to the timer and you can add a timeout statement.
Figure 230 : The Timer tab in the Data Dictionary dialog
|
To add a timer statement:
Generate an Attachment statement by selecting a test step and specifying an actual parameter list (if the test step has a formal parameter list).
Figure 231 : The Attachment tab in the Data Dictionary dialog
|
To add an attachment statement:
The Log Manager is a collection of log outputs, where each test system component can report information. The Log Manager contains one log per test component, and one common pane that is used for general information.
Examples of actions that can result in log information:
The Log Manager can be configured to behave in various ways. The default setting is for the Log Manager to be hidden, but appear whenever log output is present. Only one instance of the Log Manager is available.
The contents of each log can be saved as a text file.
You can open tables by clicking and then <Ctrl>
-right-clicking the name of the table in the log.
Figure 232 : The Log Manager window
|
The Log Manager can be made to automatically become visible whenever new information is available in a log. This can be handy to reduce the amount of windows open at a given time as the Log Manager can be closed when it is not needed.
To allow the Log Manager to automatically open whenever new information is available:
The log font can be made smaller or larger, allowing more information to be viewed or increased readability.
To make the log text larger:
<Ctrl+Alt+L>
To make the log text smaller:
<Ctrl+Shift+L>
The information contained in a log can be copied to the clipboard, or saved to disk as an ordinary text file. In addition to normal text-selection, all text can also be selected with one operation.
To select all text:
To copy the selection to the clipboard:
To save all text in a log to a file:
To clear the displayed log:
As an alternative to the Browser, you can use the Finder for displaying TTCN tables in a list, without the ordering restrictions imposed by the TTCN tree structure.
You can search for and display tables in the Finder. The search may for example be based on name, type and content. You can either use the entire TTCN document (the Browser contents) or the Finder list as search source, and extend or restrict the number of tables displayed in any number of steps.
Another way of searching is relationally. This means that you search for tables that reference or are referenced by tables selected in the Finder. The relational search cannot be combined with the ordinary.
The tables that will be displayed after a search, can be sorted by a number of criteria:
Reversed sorting is also possible.
In addition, it is possible to for example open, analyze, rename and delete tables from the Finder, but not cut, copy, paste and insert since that require a tree context.
|
To open the Finder: |
|
The Finder consists of three areas:
Search criteria are used for restricting a search. This means that if you do not specify any search criteria -- all fields are empty and no buttons are clicked -- before you click the Find button, all dynamic TTCN tables of the test system component will be displayed.
Consequently, if you specify one or more search criteria, TTCN tables that match at least one of the criteria, will be displayed in the Finder. Additionally, this means that specifying all possible search criteria has the same effect as specifying none. This is merely as a convenience for quickly adding all tables of the test system component, as the closed search criteria is not meaningful.
Note: The search criteria are used for an OR-style search. |
Figure 234 : The Find tab in the Finder
|
To search for tables:
Figure 235 : The Relational Find tab in the Finder
|
You can search for tables that are referenced by and that reference tables that are displayed and selected in the Results list. To do this:
The Results List contains a subset of all dynamic TTCN tables in the TTCN document. You can perform most standard operation on the tables. However, it is not possible to cut, copy, paste or insert tables, since this requires the structural context of the Browser.
The contents of the Results List can be sorted if you click on the header of the information column. The available information is:
Click a second time on the header to sort the list in reverse order.
Click Clear to clear the contents of the Results List.
TTCN-GR -- the graphical notation -- is the format used when you edit or print a test suite in ITEX. TTCN-MP -- the textual notation (machine processable) -- can be used when you want to import a TTCN document into a non-ITEX tool or make backups.
To export a TTCN document to TTCN-MP:
To import a TTCN-MP document:
For a full supported EBNF, see The TTCN-MP Syntax Productions in BNF.
When you convert to MP, the TTCN document does not have to be analyzed or correct. TTCN-MP will be generated even for documents that are neither complete nor error-free. This implies that the generated MP file may be, but is not necessarily, conformant to the standardized TTCN-MP format
However, to ensure that the TTCN-MP document can be read by a non-ITEX tool, you should analyze the document and correct any errors.
An optional but non-standard TTCN-MP for compact tables and ASN.1 references is supported. Additional fields in dynamic tables (fields which are transferred to test suite overview tables) are also supported. You are recommended to use this format for transferring TTCN document between ITEX instances and for making backups of the TTCN documents. Otherwise it works just as the standard MP format.
When you import certain TTCN-MP documents, a problem with transferring the information (e.g. description) in the overview tables to the tables in Dynamic Part, may occur.
The TTCN standard allow path specifications to optionally include the document name first. This has the unfortunate effect that if the TTCN document contains a top level group with the same name as the TTCN document, there is, in general, no way of knowing if the first part of the paths is a group identifier or the TTCN document identifier.
ITEX assumes that if the first part of the path is equal to the document name, it is the optional document name and, when converting, strips it away. When the document is exported, the document name is always added to the front of all paths. That way ITEX is always able to open the MP files it exports.
If the TTCN document contains top level group identifiers equal to the document name, and ITEX is unable to resolve the paths, temporarily change the document name in the MP file and change it back once inside ITEX.
Note that ITEX 2.0 did not add the document name at export, and therefore the problem described may apply when open MP files exported by ITEX 2.0.
The contents of table fields in a TTCN-MP file are usually ignored. However, to make it possible to open non-bounded free text fields (for example TS_VarValue field) with embedded dollar characters (`$'), those fields will be syntax checked. This means that it is not possible to convert TTCN documents containing unmatched single or double quotes in non-bounded freetext fields, that is, when you open a TTCN-MP file, syntax errors in those fields will not be tolerated.
There is no integrated revision control system in ITEX. Since normal visible files are used to store the TTCN documents, it is easy to integrate ITEX in a revision control system. However, since the.itex
file format is binary, it is better to use the TTCN-MP format.
It is possible to export a TTCN document, or only a part of it, to HTML. The result will be one HTML-file containing what you selected to export, and -- when applicable -- hypertext links as well as information about the structure of the test suite will also be generated.
To export a TTCN document to HTML:
It is also possible to export a currently opened table to HTML. To do this:
Shortcut | Action |
---|---|
|
Increases font size. |
|
Decreases font size. |