![]() |
![]() |
![]() |
![]() |
![]() |
Using the Browser
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.
Opening the Browser and a TTCN Document
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 the TTCN Suite is started from the Organizer, as described in "Starting the TTCN Suite" on page 1256.
If you try to open a TTCN document that is already opened by any another user or in another TTCN Suite Browser, you will get a question informing that the file is opened by another user and ask to open it in read-only mode. In read-only mode you will not be able to save your changes (if any) in the same file, but free to save the TTCN document as another file. No other restrictions exist in read-only mode: you may browse, analyze, generate code, etc.
The question that the file is opened by another user is isuued because a read-lock file (with additional suffix '-read_lock') exists in the same directory as the document. This may also happen if the TTCN Suite or Windows has crashed. In this case just remove this file and try to open the TTCN document again.
The Browser User Interface
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 the TTCN Suite 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 in the 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.
Dynamic Nodes in the Browser
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.
Controlling the Nodes in the 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.
Expanding and Collapsing a Node
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
- The shortcut for collapse is <Left arrow> when an expanded node is selected.
- The shortcut for expand is <Right arrow> when a collapsed node is selected.
Selecting Nodes
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:
- To move the selection to the next node, use <Down Arrow>.
- To move the selection to the previous node, use <Up Arrow>.
Renaming Dynamic Nodes
Sorting Dynamic Nodes
The Sort command is applicable for any node that has dynamic subnodes. The command sorts the sub-nodes in alphabetical order.
To sort a dynamic node do one of the following:
- Right-click a node, then choose Sort from the shortcut menu.
- Select the node to sort. From the Edit menu choose Sort.
Creating a Sub Browser
To get a Browser with the full TTCN document tree, select New Window from the Window menu.
Editing the Browser Structure
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.
Generating the Test Suite Overview
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.
Adding Nodes
To add a new dynamic node as the last child of the selected node:
- In the case of multiple-object tables, select the node that represents the multiple-table. When you select Add In, a new node will be added as the last child node.
To add a new dynamic node before the selected node:
Adding Groups
It is possible to add a new test case group, a new test step group or a new default group in the Dynamic Part, it is also possible to add a new Group for constraint declaration in the Constraints Part.
To add a new group before the selected node:
To add a table to a group, select the group and Add In.
Adding Compact Tables
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:
Cutting, Copying and Pasting Nodes
You may cut or copy dynamic nodes. Dynamic nodes may also be pasted according to compatible classes, for example:
- Test suite parameters, test suite constants, test suite variables and test case variables may be pasted into each other.
- TTCN ASP, PDU, structured type and CM definitions may be pasted into each other and into TTCN ASP, PDU, structured type and CM constraints (and vice versa).
- ASN.1 ASP, PDU, structured type and CM definitions may be pasted into each other and into ASN.1 ASP, PDU, structured type and CM constraints (and vice versa).
- Test case, test step and default behaviors may be pasted into each other.
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.
Creating Constraints
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.
Deleting Nodes
Dynamic nodes may be removed from the test document.
Undoing/Redoing Operations
All editing commands can be undone, and undone actions can be redone.
Opening a Table
- Double-click a table node in the Browser.
- Select a table node and then press <Enter>
- Select a table node and then Open Table Editor from the View menu.
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.
Printing a TTCN Document
For more information, see "The Print Dialogs in the TTCN Suite" on page 333 in chapter 5, Printing Documents and Diagrams.
1Note that test group nodes differ. Double-clicking a group node that is expanded always opens its associated table instead of collapsing it. Click on the minus sign to the left of the group icon instead.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |