7/30/2019 Testing and Test Control Notation Version 3
1/25
Testing and Test Control Notation Version 3 Internationally standardized testing language
Product of the European Telecommunications StandardsInstitute (ETSI)
A programming language that has been used for more than15 years in standardization as well as industry
Specifically designed for black box testing and certification Constantly developed and maintained at ETSI by a team of
leading testing experts from industry, institutes, and
academia
A testing technology that applies to a variety of application domainsand types of testing
Proven to work in very large and complex industrial tests,e.g., 3G network elements
Standards from ETSI [some cross-listed as ITU standards] ES 201 873-1 (Z.140): TTCN-3 Core Language ES 201 873-2 (Z.141): TTCN-3 Tabular Presentation Format
(TFT)
ES 201 873-3 (Z.142): TTCN-3 Graphical Presentation Format(GFT)
ES 201 873-4 (Z.143): TTCN-3 Operational Semantics ES 201 873-5: TTCN-3 Runtime Interface (TRI) ES 201 873-6: TTCN-3 Control Interfaces (TCI) ES 201 873-7: Using ASN.1 with TTCN-3
ES 201 873-8: The IDL to TTCN-3 Mapping Proposed: Mappings to XML, C++ Currently: Edition 3 of TTCN-3 (2007/8)
What makes TTCN-3 different
From conventional programming or scripting languages? Rich type system including native list types and support for
subtyping
Embodies powerful build-in matching mechanism Snapshot semantics, i.e., well defined handling of port and
timeout queues during their access
Concept of verdicts and a verdict resolution mechanism Support for specification of concurrent test behaviour Support for timers Allows test configuration at run-time Tests focus only on implementation to be tested
From a test tool or vendor proprietary testing language? Not tied to a particular application or its interface(s) Not tied to any specific test execution environment,
compiler or operation system
TTCN-3 as such is not executable and requires acompiler/interpreter, adapter as well as codec
implementations
TTCN-3 test systems in a nutshell
7/30/2019 Testing and Test Control Notation Version 3
2/25
7/30/2019 Testing and Test Control Notation Version 3
3/25
Main Capabilities of TTCN-3
Dynamic concurrent testing configurations Various communication mechanisms (synch and asynch) Data and signature templates with powerful matching mechanisms Specification of encoding information Display and user-defined attributes Test suite parameterization Test case controland selection mechanisms Assignment and handling of test verdicts Harmonized with ASN.1 and IDL (XML and C++ coming) Different presentation formats Well-defined syntax, static semantics and operational semantics
7/30/2019 Testing and Test Control Notation Version 3
4/25
7/30/2019 Testing and Test Control Notation Version 3
5/25
7/30/2019 Testing and Test Control Notation Version 3
6/25
7/30/2019 Testing and Test Control Notation Version 3
7/25
7/30/2019 Testing and Test Control Notation Version 3
8/25
7/30/2019 Testing and Test Control Notation Version 3
9/25
Uses of Data in TTCN-3 Test Specifications
Data in TTCN-3 is used internally to the test component as information passed between test components within the
test system
as test data transmitted to and received from the SystemUnder Test (SUT)
The grouping mechanism can be used to collect data definitions of asimilar kind e.g.,
Service Primitives (ASP) Protocol Data Units (PDU) internal coordination messages
7/30/2019 Testing and Test Control Notation Version 3
10/25
Data TemplatesTemplates are special data values that have the following
characteristics
matching mechanisms
they can be parameterized
they can be modified to provide a simple form of
inheritance
Templates can be applied to simple types as well as complex
types
Are most often used to define the possible received values
of messages and responses to remote procedure calls
Matching
Mechanis
ms Notation
Description
( ... ) Match a value in a list of valuesnot ( ... ) Match a value not in a list of values
(lower..upper) Match an integer range? Wildcard for any value* Wildcard for any value or no value
...... Wildcard for any single element in a string or array
...... Wildcard for any number of consecutive elements
in a string or array
length Match on a restricted length (string type)ifpresent Match if an optional element is present
7/30/2019 Testing and Test Control Notation Version 3
11/25
7/30/2019 Testing and Test Control Notation Version 3
12/25
7/30/2019 Testing and Test Control Notation Version 3
13/25
7/30/2019 Testing and Test Control Notation Version 3
14/25
7/30/2019 Testing and Test Control Notation Version 3
15/25
7/30/2019 Testing and Test Control Notation Version 3
16/25
7/30/2019 Testing and Test Control Notation Version 3
17/25
Pre-defined Functions
Convertbitstring value to integer value bit2int
Convert hexstring value to integer value hex2int
Convert octetstring value to integer value oct2int
Convert charstring value to integer value str2int
Convert integer value tobitstring value int2bit
Convert integer value to hexstring value int2hex
Convert integer value to octetstring value int2oct
Convert integer value to charstring value int2str
Length functions
Return the length of a value of any string type lengthof
Return number of elements in record, record of, template,
set, set of
sizeof
Presence / Choice functions
Determine if an optional field in a record, template, etc. is
present
ispresent
Determine which choice has been made in a union type ischosen
7/30/2019 Testing and Test Control Notation Version 3
18/25
Convertbitstring value to integer value bit2int
Convert hexstring value to integer value hex2int
Convert octetstring value to integer value oct2int
Convert charstring value to integer value str2int
Convert integer value tobitstring value int2bit
Convertinteger
value tohexstring
value
int2hex
Convert integer value to octetstring value int2oct
Convert integer value to charstring value int2str
Length functions
Return the length of a value of any string type lengthof
Return number of elements in record, record of,
template, set, set of
sizeof
Presence / Choice functions
Determine if an optional field in a record, template, etc. is
present
ispresent
Determine which choice has been made in a union type ischosen
Configuration Operations Operation KeywordCreate a new parallel test component create
Connect two components connect
Connect component to test system interface map
Get master test component address mtc
Get test system interface address system
Get own address self
Start execution of test component start
Stop execution of test component stop
Check termination of test component done
Creating ComponentsThe master test component (MTC) is the only component
that is automatically created when the test case is executed
All parallel test components (PTCs) must be created
explicitly using the create operation
The create operation returns the unique component
reference for the newly created component
Components can be created at any point in a behaviour
description
7/30/2019 Testing and Test Control Notation Version 3
19/25
Asynchronous Communication OperationsOperation KeywordSend a message send
Receive a message receive
Trigger on a given message trigger
Check in queue of port for message check
Clear port clear
Clear and give access to port start
Stop access to port stop
Synchronous Communication Operations
Operation
Keyword
Invoke (remote) procedure call call
Reply to (remote) procedure call reply
Raise an exception raise
Accept (remote) procedure call getcall
Handle response from previous call getreply
Catch exception (from called entity)catch
7/30/2019 Testing and Test Control Notation Version 3
20/25
Check reply or exception check
Clear port clear
Clear and give access to port start
Stop access to port stop
7/30/2019 Testing and Test Control Notation Version 3
21/25
Named Alternatives
7/30/2019 Testing and Test Control Notation Version 3
22/25
7/30/2019 Testing and Test Control Notation Version 3
23/25
Additional OperationsStatement
Keyword or symbol Module control part
Timer operations
Start timer start Yes
Stop timer stop Yes
Read elapsed time read Yes
Check timeout event timeout Yes
Check timer statusrunning
YesVerdict operations
Set local verdict verdict.set
Get local verdict verdict.get
SUT operations
Cause SUT action sut.action
VerdictsVerdicts:pass, fail, inconc, none, error
Each test component has its own local verdict
can be written (set) and read (get)Global verdict returned by Test Case (read-only)
7/30/2019 Testing and Test Control Notation Version 3
24/25
7/30/2019 Testing and Test Control Notation Version 3
25/25