[Previous] [Next] [Contents] [Index]


    Tutorial: The Basics of ITEX in Windows

This tutorial is intended as an easy introduction to ITEX for the newcomer. It is assumed that you have some basic knowledge about Windows. In addition, to find ITEX meaningful to use, you have to understand TTCN.

Note:  Windows version

This is the Windows version of the tutorial. The UNIX version can be found in Tutorial: The Basics of ITEX on UNIX.

Note: 

This document is an ITEX primer and is not intended to provide a tutorial on TTCN. The volume ITEX Methodology Guidelines introduces some basic TTCN features presented with the aid of a simple example.

Table of Contents 

Purpose of This Tutorial

The purpose of this tutorial is to make you familiar with the basic functions of ITEX. You will start by creating a test suite and you will learn various ways of editing tables.

It is assumed that you know how to use Windows but that you have no or little previous knowledge about ITEX. However, to understand the full use of ITEX, you must have knowledge of TTCN. ITEX Methodology Guidelines introduces some essential TTCN features, presented with the aid of a simple example.

Starting ITEX

It is assumed that ITEX (or Telelogic Tau) has been installed correctly and that the installation directory is C:\tau35.

To start Telelogic Tau:

After a few seconds, the Organizer is started. The Organizer is the main window from which you have access to the tools in the Telelogic Tau environment.

A welcome window, where you may read the license agreement for Telelogic Tau, will also be displayed. The window disappears as soon as you click the Continue button or perform any action in the Organizer.

Figure 9 : The Organizer main window

Extracted pic [1]

The Organizer consists of a main window and a log window. In the main window, five areas -- known as chapters -- are displayed by default:

You may freely use these chapters to hold a number of documents and chapters may also be renamed, deleted and created -- the actual use is a matter of personal taste.

More information about customizing the chapters can be found in Customizing the Organizer Chapters.

Creating a TTCN Test Suite Document

What You Will learn

Setting the Source and Target Directory

You will begin by setting the source and target directory in the Organizer. The source directory is where your new documents will be saved by default. The target directory is where generated files are put. Both of these directories must already exist -- you cannot create them in the Organizer.


Extracted pic [19]
  1. Double-click the source directory icon in the Organizer window.
    • You may also select the source directory icon and then select Edit from the Edit menu in the Organizer or you may select Set Directories from the File menu.

Figure 10 : The Set Directories dialog

Extracted pic [20]

  1. Select the source directory by writing the path in the text field or by browsing in the dialog that is opened when you click the folder button. Make sure that you have write access to the directory.
  2. In the same way, you can change the target directory.
  3. Click OK in the Set Directories dialog.

Creating a New Test Suite

When you have set the source and target directories, you should create a new TTCN document.

  1. Select the chapter TTCN Test Specification in the Organizer.
  2. Select Add New from the Edit menu in the Organizer.

  3. The Add New dialog is opened. In the dialog you should set the document type and name.

Figure 11 : Add New dialog

Extracted pic [21]

  1. Select TTCN and Test Suite or Modular Test Suite in the New document type list.
  2. Type Tutorial in the New document name field.
  3. Make sure that the option Show in editor is selected.
  4. Click OK.

  5. A new TTCN document is created in the source directory. At the same time, a TTCN icon is created in the Organizer. After that, ITEX is started. The ITEX Browser will show the new test suite in collapsed format.

Figure 12  : ITEX is started and the Browser displays the test suite

Extracted pic [16]

Using the Browser

What You Will Learn

Expanding and Collapsing Nodes

The Browser displays the test suite in a collapsed format, which is indicated by plus signs in front of the nodes. You expand and collapse the nodes the same way that you expand and collapse directory levels in the Windows Explorer.

Figure 13  : The Dynamic Part has been expanded

Extracted pic [4]

Some nodes are not marked with plus or minus signs. Those node are tree nodes without children. The node Test Cases in Figure 13 is an example of this. Such nodes represent the static (structural) parts of the test suite that cannot be opened or edited.

Building a Test Suite

You are now going to add a TTCN table to your test suite.

To add a PCO type:

  1. Expand the Declarations Part.

  2. To be able to see the entire test suite, you may also have to enlarge the Browser window.
  3. Select the PCO Type Declarations node.
  4. Select Add in from the Edit menu.

  5. A PCO Type with the temporary name NoName is added in the PCO Type Declarations list. The table icon looks like a small graphical table, which means that it can be opened and edited.
  6. Rename the PCO type NoName by clicking on it when it is selected, that is, it becomes highlighted. Name the PCO type LOWER_PCO.

Figure 14  : The test suite when a PCO Type has been added

Extracted pic [2]

  1. You should also add the following items:

Figure 15 : The test suite when the tables have been added

Extracted pic [5]

The next step is to edit the tables that you just added.

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

Extracted pic [3]

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 ITEX tutorial.
  2. Type some text in the Description field: Example test case.
  3. 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.
  4. Select Insert New Row After from the Edit menu.
  5. A new empty line is added to the body of the table. Note that the line is automatically numbered.
  6. 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

  4. 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.

Extracted pic [7]

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

Extracted pic [15]

Figure 19 : The PCO L

Extracted pic [14]

Figure 20 : The PDU SEND

Extracted pic [9]

Note: 

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

Figure 21 : The PDU RECEIVE

Extracted pic [13]

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

Figure 22 : The PDU constraint S1

Extracted pic [8]

Figure 23 : The PDU constraint R1

Extracted pic [10]

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

Figure 24 : The test step TEST_STEP_1

Extracted pic [12]

  1. Close all tables when you have finished editing.
  2. Save the test suite by selecting Save in the File menu.

Analyzing the Test Suite

What You Will Learn

Analyzing the Test Suite

You are now going to analyze the test suite:

  1. Select Analyze Suite from the Build menu.
  2. The Analyzer/CCG Settings dialog is opened. You do not have to change the settings in this tutorial.

Figure 25 : The Analyzer/CCG Settings dialog

Extracted pic [17]

  1. Click OK.

  2. If you have edited the test suite as described, the ITEX Log Manager is opened with a textual log that should show a single error message:

Figure 26 : The ITEX Log Manager window showing one error

Extracted pic [11]

Finding and Correcting the Error

To find the erroneous table, you use the popup menu:

  1. In the Log Manager, click the table identifier, that is, the name of the table: TEST_CASE_1.
  2. <Ctrl>-right-click the name of the table again.

  3. A popup menu is opened.
  4. Select the top command in the popup menu: Test Case Name: TEST_CASE_1.

Figure 27 : Finding a table by using the popup menu in the Log Manager

Extracted pic [18]

You should now correct the error and analyze again:

  1. Correct the error, i.e. change SENT to SEND.
  2. Analyze the test suite again. You can do this while having the Table Editor window still opened since the Analyzer works on any level of the test suite.

  3. You will now have a small test suite that is syntactically correct. This means that the red markings will disappear.

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.

  3. The SEND table is pasted before S1.

Editing the New Table

  1. Open the new SEND table.

  2. 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.
  3. Type a new name in the Constraint Name field: S2.
  4. Give Field_1 the value 3 and Field_2 the value TRUE in the Field Value column.
  5. 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

Extracted pic [6]

  1. In the Send/Receive tab in the dialog, make the following settings:
  2. The Behaviour Line, the Constraint and the Verdict fields show the contents of the behaviour line that is inserted in the table.
  3. Click Apply.

  4. The behaviour line you have composed is inserted in the table.
  5. In the Attachment tab, select TEST_STEP_1.

  6. The Behavior Line will read +TEST_STEP_1.
  7. Click the Apply button.

  8. The behaviour line is inserted and TEST_CASE_2 should now be identical to TEST_CASE_1.
  9. 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.

  3. The tables are deleted.

Exporting a Test Suite

What You Will Learn

Exporting a Test Suite to MP Format and Generating the Overview

You should now convert the test suite to TTCN-MP format. However, before the actual conversion, the test suite overview has to be generated. How to do this will also be described below.

  1. Select the top node of the test suite in the Browser.
  2. Select Export from the File menu.

  3. Since the test suite overview has not been generated before, it has to be done now. A dialog is opened where you can confirm this operation.
  4. Click Yes in the confirmation dialog.

  5. Since the test suite you have created is small, the generation will not take long. Also, once it has been generated, it will be updated automatically.

    A file dialog is opened.
  6. Specify where the file is to be saved, ensure that you save as type TTCN-MP and give the file a name (example).

The TTCN-MP file for the test suite can now be found in the file example.mp. The Log Manager also informs you that the export is completed.

A TTCN-MP file can be opened like an ordinary .itex file.

Exporting a Test Suite to HTML Format

To export the entire test suite, or selected parts of it, to HTML, you proceed as described above. But instead of TTCN-MP, select HTML as the file type to export to.

It is also possible to only export an opened table. To do this:

  1. Open a table.
  2. Select Generate HTML from the pop-up menu in the table.
  3. Select a name of the file and where it should be saved.

A HTML document cannot be opened in ITEX again, but you can view it in an HTML browser.

Printing the Test Suite

You should by now have a test suite that is syntactically correct.

If you have exported the test suite, as described earlier, the test suite overview should also have been generated and it does not have to be done again. The overview will be automatically updated as soon as you make any changes in the test suite after the generation.

If you did not export the test suite, you will have to confirm the updating of the overview before printing is possible.

You can print a test suite both from ITEX and the Organizer. The main differences are that in ITEX there is a print preview, and in the Organizer, you can print several test suites at the same time.

Printing from ITEX

To print from ITEX:

  1. Ensure that the Browser window is active.
  2. Select Print from the File menu.

  3. The Print dialog is opened.
  4. If necessary, change some settings.
  5. Click OK.

  6. The test suite is printed.

Printing from the Organizer

To print from the Organizer:

  1. Select the TTCN document icon in the Organizer.
  2. Select Print from the File menu.

  3. The Print TTCN dialog is opened.
  4. If necessary, change some settings.
  5. Click Print.

  6. The test suite is printed.

So Far ...

You should now have learned how to create a test suite and how to edit it in the Browser. You have also learned how to create and edit tables and how to work with the Table Editor. Other things you should have learned is how to analyze the test suite, how to find errors and how to export to MP and HTML.

By practicing this tutorial you have probably not achieved any knowledge about TTCN. If you want to know more about the basics of TTCN you may read the ITEX Methodology Guidelines. That volume is, however, not a tutorial on TTCN.

The following tutorial is Tutorial: The ITEX Simulator in Windows. Before you start practising that, you should know how to use the SDT Simulator. A tutorial on that can be found in Tutorial: The SDT Simulator.


[Previous] [Next] [Contents] [Index]