IBM
Contents Index Previous Next



Using the Table Editor


What You Will Learn

Opening the Table Editor

The Table Editor window is opened when you double-click on a table in the Browser window.

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

Editing the Test Case Table

As you can see, the TEST_CASE_1 table, or any other table, consists of fields where text may be inserted and edited. You are now going to edit the contents of TEST_CASE_1:

  1. Click in the Purpose field and type some text, for example:
    This is an example test case for the TTCN tutorial
    .
  2. Type some text in the Description field, e.g. Example test case.
    • Instead of clicking the mouse to set the input focus in the Description field, you may also press <Ctrl+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 by the TTCN Suite from the Browser structure.
  3. Press <Ins> or <Insert>.
    A new, automatically numbered, empty line is added to the body of the table.
  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 36 : The test case TEST_CASE_1 when it has been edited.
The misspelling of "SEND" is intentional.

Copying and Pasting Text and Table Rows

Before you close the editor you may want to try to copy and paste text and rows in the table:

Shortcut:

· <Ctrl+x> (Cut a row)

· <Ctrl+c> (Copy a row)

· <Ctrl+v> (Paste a row)

· <Ctrl+Meta+v> (Paste After)

· <Ctrl+Shift+v> (Paste Last)

· <Ctrl+Right arrow> (moves the input focus right)

· <Ctrl+Left arrow> (moves the input focus left)

· <Ctrl+Down arrow> (moves the input focus down)

· <Ctrl+Up arrow> (moves the input focus up)

Note:

There are two paste buffers: one for plain text and one for table rows.

When you have finished copying and pasting, make sure that the contents of the table are exactly as in Figure 36.

Closing the Table Editor

Completing the Test Suite

Now you should edit the other tables that you have already added to the test suite. Do this in a similar manner as described above, by using 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 37 : The PCO type LOWER_PCO

Figure 38 : The PCO L

Figure 39 : The PDU SEND

Figure 40 : The PDU RECEIVE

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

Figure 41 : The PDU constraint S1

Figure 42 : The PDU constraint R1

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

    Figure 43 : 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:
    • Select the entire line by clicking in the Nr column. Then select Decrease Indent from the Edit menu.
      (The shortcuts are <-> and <+> on the right-hand keypad.)
  2. Close all Table Editors when you have finished editing.
  3. Save the test suite by selecting Save in the File menu. A Save As dialog is displayed.
  4. Click OK.

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