IBM
Contents Index Previous Next



Using the Table Editor


What You Will Learn

Opening the Table Editor

The Table Editor is opened when you double-click a table icon in the Browser:

Figure 16 : The test case TEST_CASE_1 which has not yet been edited

Resizing the Table

As you can see, the Table Editor window is divided into three parts: the header, the body and the footer. These parts can be resized and hidden.

Editing the Test Case Table

As you can see, TEST_CASE_1, or any other table, consists of fields where text may be inserted and edited. This is what you are going to do now:

  1. Click in the Purpose field and type some text, for example:
    This is an example test case for the TTCN Suite tutorial.
  2. Type some text in the Description field: Example test case.
    • Instead of clicking the mouse to set the input focus, you can press <down arrow> until the cursor has reached the Description field.
      It is also possible to type text in the other fields but you do not have to do that in this tutorial. Note that the Group field is not editable. The contents of this field is always kept updated from the Browser structure.
  3. Select Insert New Row After from the Edit menu.
    • You can also press <Ins> or <Insert>.
      A new empty line is added to the body of the table. Note that the line is automatically numbered.
  4. Type L! SENT in the Behaviour description field of the new line.

Note:

The misspelling of "SEND" is intentional!

  1. Type S1 in the Constraints Ref field.
  2. Press <Ins> or <Insert> to add another new line.
  3. Type +TEST_STEP_1 in the Behaviour Description field of row 2
    Note that the text is automatically indented.

Figure 17 : The test case TEST_CASE_1 when it has been edited.

The misspelling of "SEND" is intentional.

When you have edited TEST_CASE_1, you should close the table.

Completing the Test Suite

You should now edit the other tables that you have already added to the test suite. Use the tables in the following figures as models.

  1. Edit the tables in the Declarations Part of the test suite, that is the PCO type LOWER_PCO, the PCO called L and the PDUs called SEND and RECEIVE:

Figure 18 : The PCO type LOWER_PCO

Figure 19 : The PCO L

Figure 20 : The PDU SEND

Since the contents of SEND and RECEIVE are identical, you can copy the text and rows from SEND and paste them in RECEIVE:
  • Select text in the usual way with the mouse.
  • Select an entire row in the body of a table by clicking the left most field.
    When you are going to paste, note the following:
  • Text can only be pasted in text edit mode, that is, when a field contains a text pointer.
  • A body row can only be pasted when a body row is selected or when a body field is highlighted.

Note:

This means that there are two paste buffers: one for plain text and one for body rows.

Figure 21 : The PDU RECEIVE

  1. Edit the tables in the Constraints Part, that is the PDU constraints called S1 and R1:

Figure 22 : The PDU constraint S1

Figure 23 : The PDU constraint R1

  1. Edit the test step called TEST_STEP_1 in the Dynamic Part:

Figure 24 : The test step TEST_STEP_1

When you add row 2 it is automatically indented, however, in this case it should not be. To decrease the indention, put the cursor in row 2 and then either:
  • Press <Alt+-> (<Alt> and the minus key).
  • Click the minus indention quick-button.
  • Select Edit > Decrease Indention Level.
  1. Close all tables when you have finished editing.
  2. Save the test suite by selecting Save in the File menu.

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