IBM
Contents Index Previous Next



Merging TTCN Documents


The Merge tool is used for merging one TTCN document (complete or partial) into another TTCN document. There are two ways for merge:

  1. Merge the selected tables from the open Test Suite into the another open Test Suite (Merge to suite).
  2. Merge all tables from any Test Suite into the open Test Suite (Merge from file).

Figure 224 : Shows how Merge works

Merge will only work as depicted above if the two TTCN documents do not conflict. A conflict occurs if any TTCN object in the Merge TTCN document has the same name as any TTCN object in the Destination TTCN document. If such a conflict is detected, the conflicting object will be skipped, information about this will be put in log, and the merge process continued.

Merging of constraint tables are handled separately. For example, the Merge TTCN document 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 type. There are, however, limitations to this type conversion, the conversion will for example not convert an ASN.1 Constraint to a TTCN Constraint nor vice versa.

Merge to suite

Open the Merge TTCN document and the Destination TTCN document. Select in Merge TTCN document the tables that should be merged into Destination TTCN document. From the File menu choose Merge to suite (should this menu item be dimmed, most likely you have currently only one open TTCN document). A dialog with names of other open test suites will appear. Select the Destination TTCN document and press "Merge" button.

Merge from file

Open Destination TTCN document. From the File menu choose Merge from file. A file selection dialog will appear. Choose the file that contains the Merge TTCN document. GR (*.itex) and MP (*.mp) file formats are supported.

It is possible to select several files at same time. In this case they will all be merged one by one into the Destination TTCN document.

Merge from command line

TTCNMerge is a command-line tool for merging two or more TTCN documents into one.

Usage:

TTCNMerge <Destination TTCN Suite file> <Source file 1> 
... <Source file n>

If <Destination TTCN Suite file> doesn't exist, it will be created.

Example 216

TTCNMerge total.itex main.mp decl.mp initial.itex

The appearance order of source files in command line is significant such that files are being merged one by one in order of their appearance, and, if the table with the same name exists in several TTCN source documents, only the first appearance will be merged. All others will be skipped with warnings given.


http://www.ibm.com/rational
Contents Index Previous Next