O'Reilly logo

An Introduction to TTCN-3, 2nd Edition by Stephan Schulz, Federico Engler, Stefan Keil, Stephan Tobies, Thomas Deiß, Colin Willcock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required