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 are now going to practice another way of creating a TTCN table, namely by copying and pasting it.

  1. Copy the PDU called SEND in the Browser.
  2. Select S1 and then paste the table you have copied.
    The SEND table 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: S2.
  3. Give Field_1 the value 3 and Field_2 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

You can use the Data Dictionary to interactively build behaviour lines in behaviour tables. In the Data Dictionary dialog, you can compose sends, receives, timeouts and attachments, and at the same time see how it turns out in the dialog.

In this simple example, you will use the Data Dictionary to create a new test case with the same contents as TEST_CASE_1, and as a comparison you may have that table opened too:

  1. Create a new test case and open it.
  2. Name the test case TEST_CASE_2.
  3. Open the Data Dictionary from the View menu.

Figure 28 : The Data Dictionary dialog

  1. In the Send/Receive tab in the dialog, make the following settings:
    • Select the PCO L.
    • Select the ! (exclamation mark) radio button, which means that you will add a send statement.
    • Select the type SEND.
    • Select the constraint S1.
    • No verdict should be selected.
      The Behaviour Line, the Constraint and the Verdict fields show the contents of the behaviour line that is inserted in the table.
  2. Click Apply.
    The behaviour line you have composed is inserted in the table.
  3. In the Attachment tab, select TEST_STEP_1.
    The Behavior Line will read +TEST_STEP_1.
  4. Click the Apply button.
    The behaviour line is inserted and TEST_CASE_2 should now be identical to TEST_CASE_1.
  5. Close the Data Dictionary dialog.

Deleting the Tables

You will not need the newly created tables in the rest of this tutorial. You should therefore delete them:

  1. Select S2 and TEST_CASE_2 in the Browser.
  2. Select Delete from the Edit menu or press the <Delete> key.
    The tables are deleted.

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