Chapter 2

TTCN-3 by Example

To properly introduce the most important concepts of TTCN-3, we will start by looking at a real-life example. The example is based on the Internet's Domain Name System (DNS) [29] and aims at verifying that a DNS server is able to properly resolve host names to their corresponding IP addresses. The example in this section is highly simplified in order to allow us to focus on TTCN-3 related issues rather than on details of the particular problem domain.

When referring to the implementation or element, that is to be tested, the term implementation under test (IUT) is often used. If the IUT is part of a larger system and we can only communicate indirectly with the IUT and it is more appropriate to use the term system under test (SUT). In this book, we will only use the term SUT, as this naming is more general and applies also for the minimal case where we can talk directly with the IUT, and the IUT is the same as the SUT.

In the following sections, we will present an initial test case, showing how to test that a specific host name is correctly resolved. For this particular example, we will go through the necessary definitions for data types, messages and test behaviour. We will then extend this test case in three directions. Firstly, we will extend it to handle situations in which the SUT does not behave as expected. Secondly, we will show how several different interfaces of the SUT can be connected to different components of the test system to allow us ...

Get An Introduction to TTCN-3, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.