IBM
Contents Index Previous Next



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.

Hint:

If you try to open very large test suites, for example containing extensive constraint declarations, you may get an error message about "scanner buffer overflow". You can solve this by setting the environment variable ITEX_SCANNER_BUFFER_SIZE to a high value, for example 75 000 000.

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.

This is an ordinary static node. All children to this node have been analyzed with status OK.

This is a static node where at least one of the dynamic nodes in the sub tree below has not yet been analyzed or is in need of analysis. There are no erroneous dynamic nodes.

This is a static node where at least one of the dynamic nodes in the sub tree below has been analyzed with an error or warning as result. In the actual view, the arrow is red for errors and purple for warnings.

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.

This is a group node with all dynamic nodes in its sub tree analyzed with status OK.

This is a group node with a sub-tree containing at least one non-analyzed dynamic node, but no erroneous ones.

This is a group node with a sub-tree containing at least one dynamic node analyzed with an erroneous status or a warning. In the actual view, the color is red for errors and purple for warnings.

This is a dynamic node (or multi-table) that is analyzed with status OK.

This is a dynamic node that needs to be analyzed.

This is a dynamic node that has been analyzed and contains one error. In the actual view, the cross is red for errors and purple for warnings.

Figure 217 : Different node types in a Browser

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

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:

Renaming Dynamic Nodes

To rename a dynamic node:

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:

Creating a Sub Browser

To create a sub Browser:

  • Select Make Sub Browser from the View menu. This replaces the contents of the active Browser with the selected node and its sub tree.

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:

  • Select Add In from the Edit menu.
    • The shortcut is <Ctrl+Shift+A>.

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 as the last child to the selected node:

  • Select Add Group In from the Edit menu.

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:

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:

  • Select Edit > Cut.
    • The shortcut is <Ctrl+X>.

To copy the selected node and its sub tree:

  • Select Edit > Copy.
    • The shortcut is <Ctrl+C>.

To paste a node before the selected node:

  • Select Edit > Paste.

To paste a node as the last child to the selected node:

  • Select Edit > Paste In.
    • The shortcut is <Ctrl+V>.

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.

To delete the selected node and its sub tree:

  • Select Delete from the Edit menu.

Undoing/Redoing Operations

All editing commands can be undone, and undone actions can be redone.

  • To revert the last edit step, select Undo from the Edit menu.
    • The shortcut is <Ctrl+Z>.

  • To revert the last Undo, select Redo from the Edit menu.
    • The shortcut is <Ctrl+Y>.

Opening a Table

To open a table, either:

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

To print a TTCN document:

  • Select Print from the File menu.
    • The shortcut is <Ctrl+P>.

For more information, see "The Print Dialogs in the TTCN Suite" on page 333 in chapter 5, Printing Documents and Diagrams.

1

Note 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
Contents Index Previous Next