IBM
Contents Index Previous Next



Creating TTCN Tables in Other Ways


The methods described below make it faster and more efficient to create TTCN tables. They also avoid annoying spelling errors and reduces the amount of text that needs to be typed.

What You Will Learn

Copying and Pasting

You shall now practice another way of creating a TTCN table, namely by copying and pasting it.

  1. Find the PDU called SEND in the Browser.
  2. Copy the SEND PDU by using the popup menu.
  3. Find the PDU Constraint called S1.
  4. Open the pop-up menu on S1 and select Paste Before from it.
    The SEND copy is pasted before S1.

Editing the New Table

  1. Open the new SEND table.
    The Table Editor window is opened displaying the table. As you can see, the PDU Type field and the Field names are filled in. Now you just have to change the name and insert values in Field_1 and Field_2.
  2. Type a new name in the Constraint Name field, e.g. S2.
  3. Give Field_A the value 3 and Field_B the value TRUE in the Field Value column.
  4. Analyze the entire test suite as described in Analyzing the Test Suite.

Using the Data Dictionary

This section contains an example of an efficient way of creating test cases. Start by creating a new test case:

  1. Create a new test case.
  2. Name the test case, for example TEST_CASE_2.
  3. Open the test case.
  4. Select Add Send Statement from the Table Editor Data Dictionary menu. The Add Send dialog is opened.

Figure 48 : Add Send dialog

  1. Click on S2 in the Constraints list.
  2. Click OK.
    A send statement has now been automatically generated.
  3. Select the generated line in the Table Editor by clicking in the Nr column.
  4. Select Add Attach Statement from the Table Editor Data Dictionary menu. The Add Attach dialog is opened.

Figure 49 : Add Attach dialog

There is only one test step available (i.e. TEST_STEP_1) so this will be automatically selected.
  1. Click OK.
    A new line has been added to the table.

Deleting the Tables

For the remainder of the tutorial you will not need the two tables that you have just created. You should therefore delete them.

  1. Select Deselect All from the pop-up menu in the Browser.
  2. Select TEST_CASE_2.
  3. Select the PDU Constraint S2, while at the same time pressing <Ctrl>.
  4. Select Delete from the Edit menu. The items are deleted.

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