IBM
Contents Index Previous Next



Exporting and Importing


In the following examples, you will use the menu choices Convert to MP in the Browser and Convert to GR in the Organizer for exporting and importing TTCN-MP documents from and to the TTCN Suite. However, you can also use Save As in the TTCN Suite for changing the document format. In addition, TTCN-MP documents may be opened directly in the TTCN Suite.

What You Will Learn

Exporting a Test Suite to MP Format

You shall now convert the test suite to TTCN-MP format:

  1. Select the entire test suite in the Browser window.
  2. Select Convert to MP from the File menu.
    The Convert to MP dialog is opened, in which you may specify the name of the new document and where it is to be saved.

Figure 54 : The Convert to MP dialog

  1. Select the directory path in the Directories box.
  2. Type the file name that you wish the exported file to be called. In this example the file name is Example_suite.mp.
    Note the suffix .mp (used by convention). You are now ready to convert the file.
  3. Click Convert to export the test suite.
    The TTCN-MP file for the test suite can now be found in the file Example_suite.mp. You can check it if you like.

Importing a Test Suite from MP Format

Your next task is to import the TTCN-MP file that you have just exported. Do not close the existing open test suite - you need that later.

  1. Select Convert to GR from the Generate menu in the Organizer. The Convert to GR dialog is opened:

Figure 55 : The Convert to GR dialog

  1. Select Convert TTCN MP to TTCN GR.
  2. Click the folder icon of the Source MP file name field. The Select Source MP file dialog is opened.
  3. Click the file that you want to convert, when you have found it in the Files list. In this case the file is Example_suite.mp.
  4. Click OK.
  5. Click the folder icon of the Destination directory for generated TTCN GR field. The Select Destination Directory dialog is opened.
  6. Select the destination directory, i.e. where you want the converted document to be saved.
  7. Click OK.
  8. Click the Convert button in the Convert to GR dialog.
    The file is converted and is stored in a file with a generated file name in the given directory. The generated file name is the MP file name with the extension .itex. This is shown in the Organizer log.

Note:

You can open and work with MP-files just as you do with GR-files. All conversions to and from MP will then be done transparently.

Now perform the following:

  1. Select the TTCN Test Specification chapter in the Organizer.
  2. Select Add Existing in the Edit menu in the Organizer. The Add Existing dialog is opened.
  3. Select the file that you just converted (Example_suite.itex) and click OK.
    Either type the filename and the path or click the folder button to select the file.
  4. Make sure that the Show in editor option is selected.
  5. Click Add.
    The test suite is now added in the TTCN Test Specification chapter and it is opened in the Browser.
  6. In the Browser, rename this test suite as Example_B.
  7. Expand the entire test suite.
  8. Analyze the entire test suite.
  9. Do not close Example_B, you will need it in the following exercise.

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