This chapter contains a reference manual to the ITEX Browser. The Browser presents an overview of the TTCN document. In the Browser, it is possible to edit the TTCN document structure, to determine which parts of the document to view, and to apply different tools.
The functionality of the Browser, the menus, windows and quick buttons, are described in this chapter. The Table Editor is described in The ITEX Table Editor (on UNIX). How to analyze and find tables is described in Analyzing TTCN Documents (on UNIX).
For an overview of ITEX, see Introduction to ITEX on UNIX.
Note: UNIX version This is the UNIX version of the chapter. The corresponding Windows chapter is Editing TTCN Documents (in Windows). |
The Browser is the part of ITEX that presents TTCN document structures. When a new TTCN document is opened, place holders for the static parts of the document are already created. Then you can add and delete the dynamic parts.
The amount of information actually displayed in a Browser can be collapsed and expanded. It is also possible to display selected parts of the TTCN document in a sub Browser. You open a sub Browser from the main Browser or from another sub Browser.
The functionality of a menu choice is applied to all items or selections of items in the Browser. If an operation is invoked from the Organizer (see The Organizer), it is always applied to all items in the TTCN document.
You open the ITEX Browserby selecting a TTCN document already included in the Organizer followed by the menu choice Edit, or by double-clicking the TTCN document. You may also add a new TTCN document with Add New or Add Existing from the Edit menu, or start a Browser directly by selecting Editors > TTCN Browser from the Tools menu. See The Organizer for more information.
For a general description of the Telelogic Tau user interface, see User Interface and Basic Operations.
The TTCN document in the Browser contains items. These are:
The Browser displays all the static items 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. The structure is indicated by indention.
Figure 193 : The ITEX Browser window on UNIX
|
Figure 193 depicts the Browser window. The test suite overview, the import part, the declarations part, the constraints part, the test cases and the defaults library are collapsed. This is indicated by the three dots.
The dynamic part and the test step library are expanded. The test step library contains two test steps: LT
and UT. LT
has been edited but not analyzed. This is indicated by the shaded bar (gray on a color screen). The table icon indicates that UT
is opened and the filled bar (red on a color screen) that UT
has been analyzed and is erroneous. Items with no analysis bars have been analyzed and contain no errors.
Items in bold font represent the static (or structural) parts of the TTCN document and cannot be opened or edited. The items in normal font represent named TTCN tables which can be opened and edited.
Some of the static items may remain unused. For example, if Test Case Variables is not used it will still be displayed in the Browser. However, it will not be printed or output in the TTCN-MP format.
There is a difference between selection and input focus. Selection is an inverted item or text string. The input focus is indicated by a rectangular border surrounding the relevant item. Keyboard commands operate on the item with input focus, not the selection.
Point and click once to select a single item in a Browser -- note that this also sets the input focus. Selecting a new item will deselect the previous item (if any).
To select severalitems, press <Ctrl>
while selecting items. Note that the input focus is set to the last selected item. Pressing <Ctrl>
while selecting items works in toggle mode: a selected item will be deselected and vice versa.
When clicking the middle mouse button, the input focus will be set to the new item. The selection will not be changed.
The selection can also be changed by using commands in the Browser popup menus, see Using Popup Menus.
More complex selections of items can be made by using the Selector; see Using More Complex Selections.
Note: The Compare tool may also be used to make selections See Comparing TTCN Documents for more information. |
The View menu is used for deciding how much of the test suite that should be displayed in a Browser. This is useful when you work with large test suites. This menu also contain commands to access any opened Table Editor and to close all opened editors, as well as to access any loaded TTCN document.
Hides all items under the marked item. A collapsed item is indicated by an ellipsis (...). A shortcut for Collapse is to type <c>
without invoking the View menu.
Displays all items at the next level below the marked item. A short-cut for Expand is to type <e>
without invoking the View menu.
Displays all items at all levels below the marked item. A short-cut for Expand Tree is to type <Shift+e>
without invoking the View menu.
Closes all open Table Editors, regardless of which document they belong to.
This sub menu presents a list of all open Table Editors, in any TTCN document. By selecting an item in this list, the corresponding Table Editor is brought forward.
This sub menu presents a list of all loaded TTCN documents. By selecting an item in this list, the main Browser of the corresponding document is brought forward.
Sub Browsers may be created to display selected portions of a test suite. These selections may be made manually or with the Selector (see above).
This facility is useful when working with a large test suite or with items that fulfil certain criteria.
|
Causes a sub Browser to be displayed containing only the selected items from this Browser. There is no limit on the number of sub Browsers that may be displayed. |
Note: Closing the main Browser also closes any sub Browsers that are opened. |
ITEX displays all the components of a TTCN document in the structured format of the Browser. Part of this structure is static and common to every TTCN document. This static structure is automatically generated by ITEX when the TTCN document is first created.
To build an individual TTCN document, named tables (such as PDUs, Constraints and Behaviours) and named objects to the multi-object tables (such as Test Case Variables, PCOs and Timers) must be added to this static structure.
The Edit menu is used to add, delete, copy, cut, paste etc. editable items (i.e. groups, tables or objects in a multiple object table) in a Browser.
Adds a new table to the Browser or adds an object to a table in the Browser.
In the case of single-object tables, select the Browser item that "holds" the table. Choosing Add will add a new table to the end of the list of tables. The new table will be unnamed. Use the Rename command to give the table its correct name, or open the table and edit the name there.
To add a new TTCN PDU to a Browser, select the item TTCN PDU Type Definitions and apply Add.
In the case of multiple-object tables, select the item that is the name of the table. Choosing Add will add a new object to the end of the list of objects in this table. The new object will be unnamed. Use the Rename command to give the table its correct name, or open the table and edit the name there.
To add a new Test Case Variable to a Browser, select the item Test Case Variables item and apply Add.
Similar to Add but the new table (or object in a table) is inserted before a selected table (or selected object).
Note: Only a single item should be selected. |
Similar to Add but the new table (or object in a table) is inserted after a selected table (or selected object).
Note: Only a single item should be selected. |
The following commands are used to add/insert new groups to the Test Case, Test Step and Default libraries.
Adds a new Test (Case) Group, a new Test Step Group or a new Default Group in the Dynamic Part. The new group is added at the next level after the selected group.
Use the Rename command to edit the temporary name NoName. Note that ITEX automatically adds the trailing slash (/).
To add a table to a group, select the group and use the Add command.
Inserts a new group before a selected item.
Inserts a new group after a selected item.
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:
Adds a compact group at the next level after the selected group.
Inserts a compact group before a selected item.
Inserts a compact group after a selected item.
The places where the Add command may be used, may also be sorted.
Sort the list of items below the selected item lexicographically.
Editable items may be cut or copied to the clipboard. The contents of the clipboard may be pasted according to compatible classes, for example:
However, it is not possible to paste a Constraint for example as a Test Case Behaviour.
The Paste command is not available if the clipboard contains an object of an incompatible type to the selected object.
Note: On the table row and text levels, no paste restrictions apply. |
Deletes the selected items from the Browser and stores them in the clipboard.
Copies selected items from the Browser to the clipboard.
Pastes the contents of the clipboard before a selected item.
Pastes the contents of the clipboard after a selected item.
Pastes the contents of the clipboard to the end of a list of tables (or list of objects in a multi-object table).
Editable items may be removed from the Browser.
Deletes selected items from the Browser.
ITEX has no undo so this command is irreversible. |
The cursor and mouse may be used to set the input focus on an item in a Browser. However, you may find the following shortcut keys more useful:
<Down Arrow>
moves the input focus to the next item. This movement is not sensitive to the structure of a Browser.<Shift+Down Arrow>
moves the input focus to the next item at the same level of indentation.<Up Arrow>
moves the input focus to the previous item. This movement is not sensitive to the structure of a Browser.<Shift+Up Arrow>
moves the input focus to the previous item at the same level of indentation.<Left Arrow>
moves the input focus to the previous level of indentation.<Shift+Left Arrow>
moves the input focus to the previous level of indentation and collapses that branch in a Browser.<Right>
moves the input focus to the first item at the next level of indentation. If the next level is collapsed then it is automatically expanded.<Shift+Right Arrow>
moves the input focus to the last item at the next level of indentation. If the next level is collapsed then it is automatically expanded.The Rename command is used to give names to newly created Browser items that have the temporary name NoName or to rename existing Browser items. It is available in the popup menu for the item.
Renames the dynamic item. A text box with a cursor appears for the item. Type the new name and then press <Return>
. It is also possible to copy, cut, paste and delete text.
<Copy>
or <L6>
on a Sun keyboard copies selected text.<Cut>
or <L10>
on a Sun keyboard cuts selected text. <Ctrl+k>
cuts text from the current position to the end of the line.<Paste>
or <L8>
on a Sun keyboard pastes text that is stored in the paste buffer. <Ctrl+y>
pastes the most recently cut line at the current position.<Delete>
or <Backspace>
deletes one character to the left of the insertion point. <Ctrl+d>
deletes one character to the right of the insertion point.
Note: ITEX has no undo function. This means that |
A shortcut for Rename is to type <r>
without invoking the pop-up menu. The item with the input focus will then be renamed.
A table is opened from a Browser when you double click on the specific item. Observe that this command has the additional effect of deselecting every item in the Browser. If this additional effect is undesirable, it can be inhibited by holding down <Ctrl>
simultaneously.
In the case of single-object tables, point to the table name (e.g. Test Case name). To open a multiple-object table, point to a Browser item that is the title of the table (e.g. Test Case Variables) or to an object in the table (e.g. a Test Case Variable name).
In the case of collapsed items, point and double-click to expand the item (e.g. displaying all items at the next level below the pointed item). A double-click on a group table (regardless if it is collapsed or not) opens the group table. If the item pointed at is a leaf node that is not a table, the double-click will instead create a new item below it.
Alternatively, you may point and click once with the middle mouse button (i.e. set the input focus) and then press <t>
to open the table. Note that the input focus can also be set with shortcut keys. See Key and Button Bindings.
If a table has previously been opened, but it is for some reason hard to get at, it may be brought forward by selecting the name of the table in the submenu Show Editor of the menu View.
|
To print a TTCN document: |
For more information, see The Print Dialogs in ITEX.
ITEX consists of several tools and for running each tool it is required that the appropriate license is installed. The ITEX License Information dialog is used to list these licenses.
Figure 194 : The Information dialog
|
This menu is shown when you point to an item in the Browser and click the right mouse button. Most of the commands are also available in the main menu bar. The commands in this menu are applied on the pointed item. Using this menu moves the input focus to the item pointed to, but does not change the selection.
This menu is shown when you point to the background of the Browser and click the right mouse button. Using this menu does not affect the selection or the input focus.
The following commands in the popup menus are not available elsewhere.
Selects all items in the Browser. The same effect can be achieved by pressing <Ctrl+/>
.
Deselects all selected items. The same effect can be achieved by pressing <Ctrl+\>
.
Toggles the selection state for the item. The same effect can be achieved by pressing <Ctrl+space>
.
Toggles the selection state for the whole sub-tree below the item. The same effect can be achieved by pressing <Ctrl+Shift+space>
.
Renames the item, see Rename.
Apart from manually selecting items in the Browser, more complex selections can be made by using the Selector tool. These selections can then be displayed in a sub Browser.
The Selector tool is available from the Browser Tools menu. Like the other ITEX tools, the Selector tool works on selections. The purpose of the Selector tool is to, from an existing selection, create a new selection.
With the Selector, you can make selections in three ways:
You can make selections by specifying restrictions on table names, restrictions on tables types and even restrictions on the contents of the tables.
Restrictions can also include the analysis status of the table, i.e. not analyzed, error and OK.
Selections can also be made depending on references between TTCN objects. A typical use of this feature might be to select (and perhaps later Convert to TTCN-MP) an entire Test Case, i.e. the Test Case Behaviour and all its associated declarations, constraints, Test Steps etc.
Note: UNIX only The Selector is only available on UNIX. |
Creates a new selection from a given selection. The Selector dialog is opened:
|
Enables the user to define the restrictions on the identifiers of the named TTCN tables (e.g. ASPs, PDUs, Constraints, Test Cases, Test Steps and Defaults) to be selected. This restriction is a regular expression (see Regular Expressions). If the name restriction field is empty then no restrictions on the table names will apply.
The name restriction ^abc
will select all tables whose names begin with the string "abc".
Enables the user to define the restrictions on which kind of TTCN tables that are to be selected. Click once to select one or more table types.
Suppose that the initial selection is the entire Dynamic Part. Choosing the table types Test Case Dynamic Behaviour and Test Step Dynamic Behaviour together with the name restriction ^abc
will select all test cases and test steps whose names begin with the string "abc".
If no table types at all are selected then no type restrictions are assumed to apply (i.e. the same effect as selecting all table types).
Enables the user to define the restrictions on the contents of TTCN tables that are to be selected. This restriction is a regular expression (see Regular Expressions). If the content restriction field is empty then no restrictions on the contents of tables will apply.
Suppose that the initial selection is the entire TTCN document. Choosing the table type TTCN PDU Type Definition together with the Content restriction ^xyz
will select all TTCN PDUs which have a field beginning with the string "xyz".
Enables the user to choose a select mode: restrict, extend or replace.
|
When a TTCN document is analyzed, ITEX builds a symbol table of all the named TTCN objects that are in the TTCN document. If required, the Selector will perform a `look-up' in this table in order to select referenced objects.
It is required that the TTCN document is analyzed before applying the Selector with the Relations option. This will ensure that the entries in the symbol table are consistent with the TTCN document on the screen.
There are three kinds of references: References, References recursively and Referenced by
Saves the current selection for later retrieval. This operation may, for example, be used when an Access application is to be applied on the TTCN document. To be able to retrieve the saved selection in another session the Save Document command needs to be issued after this command. For more information see Getting Started with ITEX Access.
Retrieves the saved selection.
Note that there is no explicit search command in ITEX. This functionality is instead implemented by the Selector. A search pattern (regular expression) can be defined for either the complete content of a set of objects or only for the names.
A search always operates with a Browser selection as its scope. It will produce another selection as the result. By creating a sub Browser from the resulting selection a convenient environment for viewing the objects that fulfilled the search predicate is achieved.
Often, after making a selection, it is useful to make a sub Browser which only contains the items which are selected. This can easily be done by using the Browser command from the Tools menu of the Browser.
Applying the Selector on an entire TTCN document with the Analyze status option set to error will select all objects that have syntax and/or static semantic errors. Choosing the Browser command from the Tools menu of the Browser where the selection was applied will create a Sub-browser that only contains the error objects (including the structure needed to "glue" them together).
Tools like the Selector and Replace tools use string patterns to match and search for named objects or text strings. In UNIX terminology these patterns are called regular expressions. Regular expressions include symbols specifying the pattern to be searched for. Some of these symbols are:
\ < > ^ $ [ ] *
Use of these symbols in regular expressions involves a quite complicated syntax which can be very powerful. We illustrate some common uses below, but for full information we suggest that the user takes a look at the UNIX manual entry for regexp (do a man regexp), and look under the heading Regular Expressions.
TTCN tables contain fields. Fields contain text strings. Text strings contain words.
The pattern abc
will match all words that include the string "abc", e.g. abcxyz xyzabc, xyzabcxyz, abc.
The pattern \<abc\>
will match all words that are exactly "abc". This is useful for finding TTCN identifiers embedded in strings and comments.
The pattern ^abc
will match any field that begins with the string "abc", e.g. abcxyz abc, abcabc.
The pattern abc$
will match any field that ends with the string "abc", e.g. xyzabc, abc, abcabc.
The pattern ^abc$
will only match fields containing exactly "abc".
The pattern abc[1-5]$
will select all fields that end with "abc" and a single number between 1 and 5, e.g. abc1 and xyzabc4, but not abc7 or abc12.
The Replace tool will search for all occurrences of a user specified string (for example an identifier) and replace them with another user specified string. The search string is specified as a regular expression, which gives powerful matching possibilities.
Replace works in two modes: from a Browser, which allows the replacement of strings on a global scale (i.e. throughout all tables in a TTCN document) and from a Table Editor, which does replacements on a local scale (i.e. only within a single table).
Note: UNIX only The Replace tool is only available on UNIX. |
The Replace tool is available from the Browser Edit menu.
Replace is applied to selected items in a Browser. Selections may be arbitrary and they can be made by either by using the mouse or by using the Selector tool (see Using More Complex Selections).
To perform a Replace in an entire TTCN document, do a Select All and then apply the Replace tool.
|
Searches for a user specified string (i.e. search string) and replaces it with another user specified string (i.e. replace string). The replace will only be applied to items in the current selection. |
The Replace tool is available from the Table Editor Tools menu.
|
Searches for a user specified string (i.e. search string) and replaces it with another user specified string (i.e. replace string). The replace will only be applied within the relevant table. |
No matter if it is invoked from the Browser or the Table Editor, the Replace dialog is the same.
|
Controls the log device for the Replace tool. The default value is Screen, but the log can be directed to a named file by choosing File or turned off altogether by choosing None.
For a full description of this command see ITEX Logs.
The search string is specified as a regular expression (see Regular Expressions).
The replace string is the text string which will be used to replace all matching occurrences of the search string.
Suppose that a TTCN document contains many send events of the form: L!I X=INC(X) and that the user wishes to change this to: L!INFO X=INC(X). Selecting the entire TTCN document and specifying the search string as "\<I\>" will change L!I to L!INFO but not INC to INFONC.
This example, however, is rather dangerous. Firstly because it is applied to the entire TTCN document and may make unforeseen and undesired changes to other tables than the behaviour tables, and secondly because it would change all verdicts of I (for INCONClusive) if these are used in the behaviour tables.
The solution is to restrict the scope of the Replace to the behaviour tables and to do the Replace in two passes: one with a search string of "^L! I" and with a replace string "L! INFO", and the other with a search string of "^L? I" and with a replace string "L? INFO".
The Reporter presents status information on selected Browser items (i.e. TTCN objects) in the form of a simple list. This list can include such information as analyze status and modification dates etc. The Reporter also provides limited formatting of the list.
Reporter output may be stored to file for later use, for example printing or as input to an AWK script for further processing.
Note: UNIX only The Reporter tool is only available on UNIX. |
The Reporter tool is available from the Browser Tools menu.
The Reporter tool is applied to selected items in a Browser, and presents them in the form of a simple list. Selections can either be made by using the mouse or by using the Selector tool (see Using More Complex Selections).
|
Controls the log (output) device for the Reporter tool. The default value is Screen, but the log can be directed to a named file by choosing File or turn it off altogether by choosing None. The file extension for the reporter log is .rpt
.
For a full description of this command see ITEX Logs.
The following options specify which information about each selected item shall appear in each Reporter list entry.
The list can be formatted using either tab or nl + tab, where nl stands for new line.
Figure 199 : ITEX log for Reporter (tab)
|
Figure 200 : ITEX log for Reporter (nl+tab)
|
Full verbosity gives more detailed information. The following extra information is available with full verbosity:
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 like SCCS or RCS. The .itex
file format, being binary, is however not very suitable for that, it is better to use the TTCN-MP format to store in the revision control system.
Increased functionality is obtained if not only the TTCN-MP file is stored. The output from the Reporter contains useful information like modification dates and cross-reference lists.
By applying the following procedure whenever a check-point is desired the revision system becomes even more powerful:
Test-Suite.mp
.Test-Suite.rpt
.It is now easy to obtain useful information about the difference between revisions by simply comparing the stored report files. A compare could be made using e.g. sccs diff
(if SCCS is used).
The Compare tool is used for comparing two TTCN documents with respect to finding similarities that exist between them, i.e. two TTCN objects that have the same name. These objects need not necessarily be of the same type.
The Compare tool is accessed from a Browser and is applied to selections of items in that Browser.
Compare will check either only for similar names or for names and object type. The comparison can also include the contents of tables if required.
The Compare tool can also check the group structure of TTCN documents for similarities, i.e. it will indicate Test Group, Test Step Group and Default Group paths that are the same in both TTCN documents.
Any similarities that are found may be logged in a log file. There are three levels of log verbosity: quiet, some and full. Execution of the Compare tool may result in a new selection, which can be used to create a separate Browser if so wished.
One of the main uses of this tool will be to help remove conflicts from two TTCN documents prior to performing a merge operation.
Note: UNIX only The Compare tool is only available on UNIX. |
To use the Compare tool, you need two TTCN documents to operate on: the destination document and the compare document.
Figure 201 : How Compare works
|
A selection from the destination document may be compared with the compare document. If any similarities are found between the two TTCN documents this will result in the modification of the original selection in the destination TTCN document.
Compares a Browser selection from one TTCN document with another TTCN document with respect to similarities. Make the selection in a destination TTCN document Browser and call the Compare tool from the same Browser.
Figure 202 : Compare Documents dialog
|
Controls the log device for the Compare tool. The default value is Screen, but the log can be directed to a named file by choosing File or turn it off altogether by choosing None.
For a full description of this command see ITEX Logs.
Presents a list of currently open documents. For Compare to work correctly at least two documents must be present in this list. The document name in bold italic font is the document from which the Compare tool was called, i.e. thedestinationdocument. The user must choose another document in this list, i.e. the compare document, in order to do a comparison.
In the dialog above the destination document is Test_Suite_A
and hence the compare document may only be Test_Suite_B
.
Specifies the effect that the Compare operation will have on the original selection in the destination TTCN document.
|
Sets the verbosity level for the log file.
Figure 204 : Compare: Verbosity
|
Note: Using the Nothing action together with the Quiet option is rather meaningless! |
Figure 205 : Compare: log (Verbosity: some)
|
Figure 206 : Compare: log (Verbosity: full)
|
Extends the scope of the comparison to include the contents (down to the level of a single character) of the tables as well. Thus, two objects are considered to be identical if their names, object types and entire contents are identical. If the verbosity is full the differences are detailed.
Extends the scope of the comparison to include the Test Group, Test Step Group and Default Group references in the relevant behaviour tables. This option is only available when the Compare content option is chosen.
A separate program, itexdiff
, may also be used to quickly compare the contents of two ITEX files. The tool is less powerful than the Compare tool, but it may be very useful when there is a need for quickly comparing two revisions of the same TTCN document for equality.
The program is run like:
itexdiff FooSuite.itex /home/user1/FooSuite.itex
This will test the content of the two TTCN documents for equality and report the result in a printout. To get a more elaborate compare, the -d
switch may be added like:
itexdiff -d FooSuite.itex /home/user1/FooSuite.itex
This will give the output of running the program diff
on the MP representation of the content of the two documents.
Running the program without any arguments will print out a terse usage message.
The Merge tool will only work if the two TTCN documents to be merged do not conflict. A conflict occurs if any TTCN objects in the TTCN documents have the same name.
One of the first things Merge does is to compare the two TTCN documents. If any conflicts are found it will be notified and the Merge operation will not be initiated. Use the Compare tool to find and resolve the conflicts.
For a full description of this command see Merging TTCN Documents.
The Merge tool is used for merging one TTCN document (complete or partial) into another TTCN document.
A useful application of the Merge tool is to use the Selector tool and the Convert to MP tool to extract a complete test case (the Test Case Dynamic Behaviour together with its declarations, constraints etc.) and merge it with another TTCN document.
Note: UNIX only The Merge tool is only available on UNIX. |
The merge tool requires that two TTCN documents are opened. We shall call them the merge TTCN document and the destination TTCN document or selection.
Figure 207 : Shows how Merge works
|
Merge will only work if the two TTCN documents do not conflict. A conflict occurs if any selected TTCN object in the merged TTCN document has the same name as any TTCN object in the destination document.
One of the first things Merge does is to compare the two documents. Any conflicts that are found will be notified and the Merge operation will be aborted. Use the Compare tool to find and resolve the conflicts.
For a full description of this command see Comparing TTCN Documents.
Once the selected objects in the merge TTCN document do not conflict with the destination TTCN document, the Merge tool can be used.
Merges a selection into another TTCN document. Make the selection in the merge TTCN document and call the merge tool to merge the selected nodes into the destination document.
Figure 208 : Merge Documents dialog
|
Test_Suite_B
and the merge document is Test_Suite_A
.The Merge Tool is not only useful when merging two documents together. It can also be used in the creation of a new document that needs to obtain some information from another document. The following procedure can be useful:
There are also alternate ways of doing this. Copy/Paste between the documents or using the Convert to MP tool and the Convert to GR tool or the Merge from MP tool.
Use the menu choice Merge from MP or Autolink Merge for merging the content of an MP file into a TTCN document. For additional information on merging an Autolink generated MP file, see Merging TTCN Test Suites in ITEX.
Four steps are involved in a merge from MP:
The Merge from MP tool requires that one TTCN document is open. We shall call it the destination TTCN document. This is where the merge from MP is called from.
Figure 209 : How a merge from MP works
|
Merge from MP will only work as depicted above if the two TTCN documents do not conflict. A conflict occurs if any TTCN object in the MP file has the same name as any TTCN object in the destination document. If such a conflict is detected, the conflicting object in the MP file will be skipped and the merge process continued.
Merging of constraint tables are handled specially. For example, an MP file may contain a TTCN ASP Constraint constraint1
that refers to the type type1
, where the type1
Type table is of the incompatible type TTCN PDU TypeDef. This will make the merge process insert a copy of constraint1
as a table of type TTCN PDU Constraint instead of the original type1. There are, however, limitations to this "type conversion". The conversion will not convert an ASN.1 Constraint to a TTCN Constraint nor vice versa.
The menu choice Merge from MP in the Tools menu and Autolink Merge in the SDT Link menu makes it possible to merge the content of an MP file into the current TTCN document.
Figure 210 : The Merge from MP dialog
|
.mp
..mp
will cause only those files whose names end with .mp
to be displayed, e.g. example.mp
It is possible to convert a TTCN document to TTCN-MP format.
There are no restrictions on the analysis state of the TTCN document with regards to its correctness, i.e. it will generate TTCN-MP even for TTCN 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 a TTCN document that is output in TTCN-MP by ITEX can be read by a non-ITEX tool, it is necessary to make sure that the TTCN document is correctly analyzed, that the test suite overview have been recently updated. You also have to select everything in the document before convert to MP. The ITEX format option in the dialog will in most such cases have to be non-selected.
Convert to MP, invoked from the Browser, works on Browser selections, i.e. it is possible to output selected items (e.g. a single test case or just the constraints). Convert to MP will add the necessary keywords to the MP file to make it into a TTCN-MP that can be converted back into GR format.
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. This format is the recommended format for transferring TTCN document between ITEX instances, and also for making backups of the TTCN documents.
Convert to MP is accessible from the Browser File menu and from the Organizer Generate menu.
The items selected in the Browser will be converted to TTCN-MP. Selections can be arbitrary -- ITEX will add the necessary keywords to the MP file to make it into a TTCN-MP that can be converted back into GR format.
To convert an entire TTCN document, do a Select All and then select Convert to MP from the File menu, or invoke this operation from the Organizer. For more information, see Convert to MP (TTCN).
For example, to convert a complete test case, use the Selector, together with the References recursively option and then apply Convert to MP on the resulting selection.
Presents a dialog in which you can convert the selected items to MP.
Figure 211 : Convert to MP file dialog
|
Controls the log device for the Convert to MP tool. The default value is Screen, but the log can be directed to a named file by choosing File or disabled by choosing None.
For a full description of this command see ITEX Logs.
Enables the user to convert a TTCN document to a non-standard MP with the following extra information:
Sets the filter for the files that will be displayed in the Files list. By convention ITEX TTCN-MP files are given the suffix .mp
.
The name filter *.mp
will cause only those files whose names end with .mp
to be displayed, e.g. example.mp
Lists the directories in the current file system directory. To change directory, point to the required directory name and double-click.
Lists the ITEX TTCN-MP files (if any) that are in the current directory and which match the filter.
Displays the selected document.
Updates the Files list according to the filter.
A separate program, itex2mp
, may be used to quickly export the content of an ITEX file. The generated MP format includes the ITEX-specific extensions.
The program is run like:
itex2mp FooSuite.itex FooSuite.mp
This will export the content of the TTCN document into the specified MP file. You may notice that the program has the "style" of a specialized cp
program.
Running the program without any arguments will print out a terse usage message.
ITEX allows TTCN documents to be input in the TTCN-MP format, by using the Convert to GR tool.
The Convert to GR tool is flexible, it will read any TTCN-MP file that has been successfully generated by the Convert to MP tool, even if the MP file only contain parts of a test suite. Convert to GR will also read TTCN-MP from other products which support TTCN assuming that this TTCN-MP follows the ISO standard.
For a full EBNF supported by the Convert to GR tool, see The TTCN-MP Syntax Productions in BNF.
An optional but non-standard TTCN-MP for converting TTCN documents that use compact tables and ASN.1 references with an explicit definition, is also supported.
For a full description of this command see Convert to GR (TTCN).
When converting certain TTCN 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 exporting, the document name is always added to the front of all paths. That way ITEX is always able to convert the MP files it exports. Note that ITEX 2.0 did not add the document name at export, and therefore the problem described here may also apply when converting MP files exported by ITEX 2.0.
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.
Normally the Convert to GR tool ignores the content of the fields of tables in the MP file but, to allow converting of non-BoundedFreeText fields (e.g. TS_VarValue field) with embedded dollar characters (e.g. "$") the Convert to GR tool has been enhanced with a simple syntax checker of the fields. This has the implication that it is no longer possible to convert TTCN documents containing unmatched single or double quotes in non-BoundedFreeText fields, i.e. Convert to GR is less tolerant about syntax errors in the fields.
ITEX generates the contents of the Test Suite Overview tables (i.e. The Test Suite Structure, Test Case Index, Test Step Index and Default Index tables) and the TTCN Module Overview (i.e. The TTCN Module Structure and the index tables).
These tables are not editable. The extra information that they require (such as references to selection expressions and descriptions) are entered at the corresponding table rather than in the Test Suite Overview tables. This ensures consistency between the TTCN document and the contents of the Test Suite Overview.
The Test Case Dynamic Behaviour table displayed by the ITEX Table Editor has an additional field in the table header called: Selection Ref.
This field is used to hold the reference to a Selection Expression (if any) declared in the Test Case Selection Expression Definitions table. This reference will then appear in the Selection Ref column of the Test Case Index when the index is generated using the Generate tool.
If the Selection Reference needs to be edited this must be done in the relevant Test Case table and not in the Test Case Index table (which cannot be edited). The Test Suite Overview (or the TTCN Module Overview) must be re-generated in order to update any changes.
The additional Selection Ref field in the Test Case header is notprinted in the TTCN-GR form. It is however exported in the ITEX specific MP format.
The Test Case, the Test Step and the Default Dynamic Behaviour tables displayed by the ITEX Table Editor have an additional field in the table header called Description.
The Description field is used to hold the description of the behaviour table, which in many cases may simply be a copy or a shortened form of the Test Purpose or Test Step or Default Objective. This description will then appear in the Description column of the relevant index when it is generated using the Generate Overview tool.
If the Description needs to be edited this must be done in the relevant behaviour table and not in the index tables (which cannot be edited). The Test Suite Overview (or the TTCN Module Overview) must be re-generated in order to update any changes.
The additional Description field in the Test Case, Test Step and Default headers is notprinted in the TTCN-GR form. It is however exported in the ITEX specific MP format.
The ITEX Browser supports additional non-standard tables for groups. These tables are: the Test Group table, the Test Step Group table and the Default Group table. None of these tables are printed in the TTCN-GR form.
The Test Group table has two fields in its header that are used to hold information for the Test Suite Structure table. These fields are: Selection Ref and Test Group Objective.
The Selection Ref field is used to hold a reference to a Selection Expression (if any) declared in the Test Case Selection Expression Definitions table. This reference will then appear in the Selection Ref column of the Test Suite Structure when it is generated using the Generate tool.
The Test Group Objective field is used to hold the description of the Test Group. This description will then appear in the Test Group Objective column of the Test Suite Structure when it is generated using the Generate tool.
If either the Selection Reference or the Test Group Objective needs to be edited this must be done in the relevant Test Group table and not in the Test Suite Structure table (which cannot be edited). The Test Suite Overview must be re-generated in order to update any changes.
All of these fields are exported in the ITEX specific MP format.
The Generate tool is available from the Tools menu in the Browser and the Tools menu in the Table Editor. Unlike other tools it does not require a selection: it always applies to the entire TTCN document and its action is the same whether it is invoked from a Browser or from a Table Editor.
Figure 212 : Generate Suite Overview dialog
|
In the event of an ITEX crash, it is possible to recover up-to-the-minute changes. The auto-save content is stored in the two "comma files": *.itex,s
and *.itex,t
. To be able to open those files, you need to concatenate them into a .itex
format file. This is accomplished with the iconcat
program.
The program is run like:
iconcat #FooSuite.itex FooSuite-saved.itex
This will concatenate the content of the ITEX files #FooSuite.itex,s
and #FooSuite.itex,t
into the
ITEX file. Note that the program ignores any existing
FooSuite-saved.itex #FooSuite.itex
file, despite the argument syntax.
You may notice that the program has the "style" of a specialized cp
program. Running the program without any arguments will print out a terse usage message.
Key | Action |
---|---|
|
Toggles the select status of all nodes in the subtree. |
|
Toggles the select status of the focused node. |
|
Set the select status of all nodes in the subtree. Remove select status on all others. |
|
Set the select status of the focused node. Remove select status on all others. |
|
Open an editor on the focused node. |
|
Get help on Browser. |
|
Hide subtree. |
|
Make children of the focused node visible. |
|
Make whole subtree visible. |
|
Rename the focused node. |
|
Copy the focused node (for later paste). |
|
Cut the focused node (for later paste). |
|
Paste the content of the paste buffer before/above the focused node. |
|
Add a new child to the focused node. It is placed last in the child list. |
|
Add a new sibling before/above the focused node. |
|
Add a new sibling after/below the focused node. |
|
Add a new group child to the focused node. It is placed last in the child list. |
|
Add a new group sibling before/above the focused node. |
|
Add a new group sibling after/below the focused node. |
|
Move down in tree such that if we start on root node we come to "Test Cases". |
|
Select all nodes in browser. |
|
Deselect all nodes in browser. |
|
Move focus to previous visible node. |
|
Move focus to next visible node. |
|
Move focus to parent of the focused node. |
|
If the children of the focused node are hidden, make them visible. Then move focus to first child. |
|
Move focus to previous node at same level. |
|
Move focus to next node at same level. |
|
Move focus to parent of the focused node, and hide the subtree. |
|
If the children of the focused node are hidden, make them visible. Then move focus to last child. |
|
Move to first visible node of browser. |
|
Move to last visible node of browser. |
|
Show node popup menu. |
Ctrl+Z |
Run Analyze & Stop |