![]() |
![]() |
![]() |
![]() |
![]() |
Exporting a TTCN Document to TTCN-MP
TTCN-MP - the textual notation (machine processable) - can be used when you want to import a TTCN document into a non-TTCN Suite tool or make backups.
By using the menu command Convert to MP, you can convert a TTCN-GR document to TTCN-MP. However, note that it is also possible to simply use Save Document As for changing the format. The difference between the two menu commands is that Convert to MP gives the option to save as TTCN Suite MP or standard MP, while Save As produces TTCN Suite MP. How this differs from the standard MP format is described in The TTCN Suite 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 the TTCN Suite can be read by a non-TTCN Suite 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 TTCN Suite 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 the TTCN Suite 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.
Converting to TTCN-MP in the TTCN Suite
The items selected in the Browser will be converted to TTCN-MP. Selections can be arbitrary - the TTCN Suite 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.
File > Convert to MP
Presents a dialog in which you can convert the selected items to MP.
Log Device
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 The TTCN Suite Logs.
The TTCN Suite MP format
Enables the user to convert a TTCN document to a non-standard MP with the following extra information:
- Compact tables
- Is intended for TTCN documents where the Test Case Dynamic Behaviours (i.e. compact test cases) table has been used. Check this option to generate an MP file that contains additional keywords that specifically identify compact tables. If this option is not used the TTCN Suite will output a standard TTCN-MP file where each test case in the compact test cases table is represented as a single test case (i.e. the information about the compact table is lost).
- Additional fields in dynamic tables
- ASN.1 reference tables
- Import tables
Filter
Sets the filter for the files that will be displayed in the Files list. By convention 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
Directories
Lists the directories in the current file system directory. To change directory, point to the required directory name and double-click.
Files
Lists the TTCN Suite TTCN-MP files (if any) that are in the current directory and which match the filter.
Selection
Displays the selected document.
Filter
Updates the Files list according to the filter.
Exporting by Using itex2mp
A separate program, itex2mp, may be used to quickly export the content of a TTCN Suite file. The generated MP format includes the TTCN Suite-specific extensions.
itex2mp FooSuite.itex FooSuite.mpThis 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.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |