Chapter 10

Templates

The exchange of information via messages plays a prominent role in the black box testing of protocols, but is also important in the testing of systems that employ various forms of (remote) procedure call interaction. To help users in efficiently defining the information to be sent and received in such communication, Testing and Test Control Notation Version 3 (TTCN-3) allows the definition of so-called templates. Templates are closely coupled to TTCN-3 types. TTCN-3 types define the logical structure of messages, whereas templates specify their information content.

The simplest form of TTCN-3 templates defines a unique value, which is mainly used as the argument to sending operations. The real power of TTCN-3 templates, however, lies in their ability to specify multiple values or variations of a message within one single definition, which can then be used in a receive statement. This feature allows the user to handle complex messages by only focusing on the relevant parts and ignoring information, which is not of interest in a given test situation. After discussing how this selective matching can be specified, we will go on to introduce regular expressions, which is one of the important new additions to the TTCN-3 language.

We have already briefly introduced templates in our discussion of the different communication operations in Chapters 4–6. In the next two chapters, however, we are less concerned with the actual usage of templates but rather with the different ...

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.