Methods for Testing and Specification (MTS) - The Testing and Test Control Notation version 3 - Part 1: TTCN-3 Core Language

The present document defines the Core Language of TTCN-3. TTCN-3 can be used for the specification of all types of
reactive system tests over a variety of communication ports. Typical areas of application are protocol testing (including
mobile and Internet protocols), service testing (including supplementary services), module testing, testing of CORBA®
based platforms, APIs, etc. TTCN-3 is not restricted to conformance testing and can be used for many other kinds of
testing including interoperability, robustness, regression, system and integration testing. The specification of test suites
for physical layer protocols is outside the scope of the present document.
TTCN-3 is intended to be used for the specification of test suites which are independent of test methods, layers and
protocols. In addition to the textual format defined in the present document, while GFT (ETSI ES 201 873-3 [i.2])
defines a graphical presentation format for TTCN-3. The specification of these formats is outside the scope of the
present document.
While the design of TTCN-3 has taken the eventual implementation of TTCN-3 translators and compilers into
consideration the means of realization of Executable Test Suites (ETS) from Abstract Test Suites (ATS) is outside the
scope of the present document.

Metode za preskušanje in specificiranje (MTS) - 3. različica zapisa preskušanja in krmilnih preskusov - 1. del: Jedrni jezik TTCN-3

Ta dokument določa jedrni jezik TTCN-3. TTCN-3 je mogoče uporabiti za specificiranje vseh vrst reaktivnih sistemskih preskusov prek različnih komunikacijskih vrat. Običajna področja uporabe so preskušanje protokolov (vključno z mobilnimi in internetnimi protokoli), preskušanje storitev (vključno z dopolnilnimi storitvami), preskušanje modulov, preskušanje platform na osnovi arhitekture CORBA®, programski vmesniki (API) itd. TTCN-3 ni omejen na preskušanje skladnosti in se lahko uporabi za številne druge vrste preskušanja, vključno s preskušanjem medobratovalnosti, robustnosti, regresije, sistema in integracije. Specificiranje preskuševalnih nizov za protokole fizične plasti ne spada na področje uporabe tega dokumenta.
TTCN-3 je namenjen uporabi za specificiranje preskuševalnih nizov, ki so neodvisni od preskusnih metod, plasti in protokolov. Poleg besedilnega formata, ki je opredeljen v tem dokumentu, standard GFT (ETSI ES 201 873-3 [i.2]) določa format grafične predstavitve jezika TTCN-3. Specificiranje teh formatov ne spada na področje uporabe tega dokumenta.
Zasnova jezika TTCN-3 upošteva postopno uvedbo prevajalnikov TTCN-3, vendar pa realizacija izvršljivih preskuševalnih nizov (ETS) iz abstraktnih preskuševalnih nizov (ATS) ne spada na področje uporabe tega dokumenta.

General Information

Status
Published
Publication Date
28-Aug-2016
Current Stage
6060 - National Implementation/Publication (Adopted Project)
Start Date
26-Aug-2016
Due Date
31-Oct-2016
Completion Date
29-Aug-2016

Buy Standard

Standard
ETSI ES 201 873-1 V4.8.1 (2016-07) - Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 1: TTCN-3 Core Language
English language
346 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
ETSI ES 201 873-1 V4.8.1 (2016-05) - Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 1: TTCN-3 Core Language
English language
345 pages
sale 15% off
Preview
sale 15% off
Preview
Standardization document
SIST ES 201 873-1 V4.8.1:2016
English language
346 pages
sale 10% off
Preview
sale 10% off
Preview

e-Library read for
1 day

Standards Content (sample)

ETSI ES 201 873-1 V4.8.1 (2016-07)
ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 1: TTCN-3 Core Language
---------------------- Page: 1 ----------------------
2 ETSI ES 201 873-1 V4.8.1 (2016-07)
Reference
RES/MTS-201873-1 T3ed481
Keywords
language, methodology, testing, TTCN-3
ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE
Tel.: +33 4 92 94 42 00 Fax: +33 4 93 65 47 16
Siret N° 348 623 562 00017 - NAF 742 C
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° 7803/88
Important notice
The present document can be downloaded from:
http://www.etsi.org/standards-search

The present document may be made available in electronic versions and/or in print. The content of any electronic and/or

print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any

existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the

print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat.

Users of the present document should be aware that the document may be subject to revision or change of status.

Information on the current status of this and other ETSI documents is available at

https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx

If you find errors in the present document, please send your comment to one of the following services:

https://portal.etsi.org/People/CommiteeSupportStaff.aspx
Copyright Notification

No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying

and microfilm except as authorized by written permission of ETSI.

The content of the PDF version shall not be modified without the written authorization of ETSI.

The copyright and the foregoing restriction extend to reproduction in all media.
© European Telecommunications Standards Institute 2016.
All rights reserved.
TM TM TM

DECT , PLUGTESTS , UMTS and the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members.

3GPP and LTE™ are Trade Marks of ETSI registered for the benefit of its Members and

of the 3GPP Organizational Partners.

GSM® and the GSM logo are Trade Marks registered and owned by the GSM Association.

ETSI
---------------------- Page: 2 ----------------------
3 ETSI ES 201 873-1 V4.8.1 (2016-07)
Contents

Intellectual Property Rights ...................................................................................................................... 12

Foreword ................................................................................................................................................... 12

Modal verbs terminology .......................................................................................................................... 12

1 Scope .............................................................................................................................................. 13

2 References ...................................................................................................................................... 13

2.1 Normative references .............................................................................................................................. 13

2.2 Informative references ............................................................................................................................. 14

3 Definitions and abbreviations ......................................................................................................... 15

3.1 Definitions ............................................................................................................................................... 15

3.2 Abbreviations .......................................................................................................................................... 20

4 Introduction .................................................................................................................................... 21

4.0 General .................................................................................................................................................... 21

4.1 The core language and presentation formats ........................................................................................... 21

4.2 Unanimity of the specification ................................................................................................................ 23

4.3 Conformance ........................................................................................................................................... 23

5 Basic language elements ................................................................................................................ 23

5.0 General .................................................................................................................................................... 23

5.1 Identifiers and keywords ......................................................................................................................... 24

5.2 Scope rules .............................................................................................................................................. 24

5.2.0 General ............................................................................................................................................... 24

5.2.1 Scope of formal parameters ............................................................................................................... 27

5.2.2 Uniqueness of identifiers ................................................................................................................... 27

5.3 Ordering of language elements ................................................................................................................ 28

5.4 Parameterization ...................................................................................................................................... 28

5.4.0 General ............................................................................................................................................... 28

5.4.1 Formal parameters ............................................................................................................................. 29

5.4.1.0 General ......................................................................................................................................... 29

5.4.1.1 Formal parameters of kind value .................................................................................................. 29

5.4.1.2 Formal parameters of kind template ............................................................................................. 32

5.4.1.3 Formal parameters of kind timer .................................................................................................. 34

5.4.1.4 Formal parameters of kind port .................................................................................................... 34

5.4.2 Actual parameters .............................................................................................................................. 35

5.5 Cyclic Definitions.................................................................................................................................... 40

6 Types and values ............................................................................................................................ 40

6.0 General .................................................................................................................................................... 40

6.1 Basic types and values ............................................................................................................................. 41

6.1.0 Simple basic types and values............................................................................................................ 41

6.1.1 Basic string types and values ............................................................................................................. 42

6.1.1.0 General ......................................................................................................................................... 42

6.1.1.1 Accessing individual string elements ........................................................................................... 44

6.1.2 Subtyping of basic types .................................................................................................................... 45

6.1.2.0 General ......................................................................................................................................... 45

6.1.2.1 Lists of templates ......................................................................................................................... 45

6.1.2.2 Lists of types ................................................................................................................................ 45

6.1.2.3 Ranges .......................................................................................................................................... 46

6.1.2.4 String length restrictions .............................................................................................................. 46

6.1.2.5 Pattern subtyping of character string types .................................................................................. 47

6.1.2.6 Mixing subtyping mechanisms ..................................................................................................... 47

6.1.2.6.1 Mixing patterns, lists and ranges ............................................................................................ 47

6.1.2.6.2 Using length restriction with other constraints ....................................................................... 48

6.2 Structured types and values ..................................................................................................................... 48

6.2.0 General ............................................................................................................................................... 48

6.2.1 Record type and values ...................................................................................................................... 50

ETSI
---------------------- Page: 3 ----------------------
4 ETSI ES 201 873-1 V4.8.1 (2016-07)

6.2.1.0 General ......................................................................................................................................... 50

6.2.1.1 Referencing fields of a record type .............................................................................................. 52

6.2.1.2 Optional elements in a record....................................................................................................... 53

6.2.1.3 Nested type definitions for field types ......................................................................................... 53

6.2.2 Set type and values ............................................................................................................................ 54

6.2.2.0 General ......................................................................................................................................... 54

6.2.2.1 Referencing fields of a set type .................................................................................................... 54

6.2.2.2 Optional elements in a set ............................................................................................................ 54

6.2.2.3 Nested type definition for field types ........................................................................................... 54

6.2.3 Records and sets of single types ........................................................................................................ 54

6.2.3.0 General ......................................................................................................................................... 54

6.2.3.1 Nested type definitions ................................................................................................................. 57

6.2.3.2 Referencing elements of record of and set of types ..................................................................... 57

6.2.4 Enumerated type and values .............................................................................................................. 58

6.2.5 Unions ................................................................................................................................................ 60

6.2.5.0 General ......................................................................................................................................... 60

6.2.5.1 Referencing fields of a union type ............................................................................................... 60

6.2.5.2 Option and union .......................................................................................................................... 61

6.2.5.3 Nested type definition for field types ........................................................................................... 61

6.2.6 The anytype ....................................................................................................................................... 61

6.2.7 Arrays ................................................................................................................................................ 62

6.2.8 The default type ................................................................................................................................. 64

6.2.9 Communication port types ................................................................................................................. 64

6.2.10 Component types ............................................................................................................................... 66

6.2.10.1 Component type definition ........................................................................................................... 66

6.2.10.2 Reuse of component types ........................................................................................................... 67

6.2.11 Component references ....................................................................................................................... 69

6.2.12 Addressing entities inside the SUT .................................................................................................... 71

6.2.13 Subtyping of structured types ............................................................................................................ 73

6.2.13.0 General ......................................................................................................................................... 73

6.2.13.1 Length subtyping of record ofs and set ofs .................................................................................. 73

6.2.13.2 List subtyping of structured types and anytype ............................................................................ 74

6.2.13.3 Subtyping of the iterated type of record ofs and set ofs ............................................................... 76

6.2.13.4 Mixing subtyping mechanisms ..................................................................................................... 77

6.3 Type compatibility .................................................................................................................................. 78

6.3.0 General ............................................................................................................................................... 78

6.3.1 Compatibility of non-structured types ............................................................................................... 78

6.3.2 Compatibility of structured types ....................................................................................................... 79

6.3.2.0 General ......................................................................................................................................... 79

6.3.2.1 Compatibility of enumerated types .............................................................................................. 80

6.3.2.2 Compatibility of record and record of types ................................................................................ 80

6.3.2.3 Compatibility of set and set of types ............................................................................................ 81

6.3.2.4 Compatibility of union types ........................................................................................................ 81

6.3.2.5 Compatibility of anytype types .................................................................................................... 82

6.3.2.6 Compatibility between sub-structures .......................................................................................... 82

6.3.3 Compatibility of component types ..................................................................................................... 83

6.3.4 Type compatibility of communication and connection operations .................................................... 83

6.3.5 Type conversion ................................................................................................................................. 84

6.4 Type synonym ......................................................................................................................................... 84

7 Expressions ..................................................................................................................................... 84

7.0 General .................................................................................................................................................... 84

7.1 Operators ................................................................................................................................................. 85

7.1.0 General ............................................................................................................................................... 85

7.1.1 Arithmetic operators .......................................................................................................................... 86

7.1.2 List operator ....................................................................................................................................... 87

7.1.3 Relational operators ........................................................................................................................... 87

7.1.4 Logical operators ............................................................................................................................... 90

7.1.5 Bitwise operators ............................................................................................................................... 90

7.1.6 Shift operators .................................................................................................................................... 91

7.1.7 Rotate operators ................................................................................................................................. 92

7.2 Field references and list ele me nts ............................................................................................................ 92

ETSI
---------------------- Page: 4 ----------------------
5 ETSI ES 201 873-1 V4.8.1 (2016-07)

8 Modules .......................................................................................................................................... 93

8.0 General .................................................................................................................................................... 93

8.1 Definition of a module ............................................................................................................................ 93

8.2 Module definitions part ........................................................................................................................... 94

8.2.0 General ............................................................................................................................................... 94

8.2.1 Module parameters ............................................................................................................................ 95

8.2.2 Groups of definitions ......................................................................................................................... 96

8.2.3 Importing from modules .................................................................................................................... 97

8.2.3.0 General ......................................................................................................................................... 97

8.2.3.1 General format of import ............................................................................................................. 97

8.2.3.2 Importing single definitions ....................................................................................................... 104

8.2.3.3 Importing groups ........................................................................................................................ 104

8.2.3.4 Importing definitions of the same kind ...................................................................................... 105

8.2.3.5 Importing all definitions of a module ......................................................................................... 106

8.2.3.6 Import definitions from other TTCN-3 editions and from non-TTCN-3 modules ..................... 107

8.2.3.7 Importing of import statements from TTCN-3 modules ............................................................ 109

8.2.3.8 Compatibility of language specifications in imports .................................................................. 110

8.2.4 Definition of friend modules ............................................................................................................ 110

8.2.5 Visibility of definitions .................................................................................................................... 111

8.3 Module control part ............................................................................................................................... 112

9 Port types, component types and test configurations ................................................................... 113

9.0 General .................................................................................................................................................. 113

9.1 Communication ports ............................................................................................................................ 113

9.2 Test system interface ............................................................................................................................. 116

10 Declaring constants ...................................................................................................................... 118

11 Declaring variables ....................................................................................................................... 118

11.0 General .................................................................................................................................................. 118

11.1 Value variables ...................................................................................................................................... 119

11.2 Template variables ................................................................................................................................ 120

12 Declaring timers ........................................................................................................................... 121

13 Declaring messages ...................................................................................................................... 122

14 Declaring procedure signatures .................................................................................................... 123

15 Declaring templates ...................................................................................................................... 124

15.0 General .................................................................................................................................................. 124

15.1 Declaring message templates ................................................................................................................ 125

15.2 Declaring signature templates ............................................................................................................... 126

15.3 Global and local templates .................................................................................................................... 128

15.4 In-line Templates ................................................................................................................................... 129

15.5 Modified templates ................................................................................................................................ 130

15.6 Referencing elements of templates or template fields ........................................................................... 133

15.6.0 General ............................................................................................................................................. 133

15.6.1 Referencing individual string elements............................................................................................ 133

15.6.2 Referencing record and set fields .............................................................................................. 133

15.6.3 Referencing record of and set of elements ............................................................................. 134

15.6.4 Referencing signature parameters .................................................................................................... 138

15.6.5 Referencing union alternatives ...................................................................................................... 138

15.7 Template matching mechanisms ........................................................................................................... 139

15.7.0 General ............................................................................................................................................. 139

15.7.1 Specific values ................................................................................................................................. 140

15.7.2 Special symbols that can be used instead of values ......................................................................... 141

15.7.3 Special symbols that can be used inside values ............................................................................... 142

15.7.4 Special symbols which describe attributes of values ....................................................................... 142

15.8 Template Restrictions ............................................................................................................................ 143

15.9 Match Operation .................................................................................................................................... 145

15.10 Valueof Operation ................................................................................................................................. 147

15.11 Concatenating templates of string and list types ................................................................................... 147

ETSI
---------------------- Page: 5 ----------------------
6 ETSI ES 201 873-1 V4.8.1 (2016-07)

16 Functions, altsteps and testcases .................................................................................................. 149

16.0 General .................................................................................................................................................. 149

16.1 Functions ............................................................................................................................................... 149

16.1.0 General ............................................................................................................................................. 149

16.1.1 Invoking functions ........................................................................................................................... 151

16.1.2 Predefined functions ........................................................................................................................ 152

16.1.3 External functions ............................................................................................................................ 154

16.1.4 Invoking functions from specific places .......................................................................................... 155

16.2 Altsteps .................................................................................................................................................. 156

16.2.0 General ......................................................................................................

...

Final draft ETSI ES 201 873-1 V4.8.1 (2016-05)
ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 1: TTCN-3 Core Language
---------------------- Page: 1 ----------------------
2 Final draft ETSI ES 201 873-1 V4.8.1 (2016-05)
Reference
RES/MTS-201873-1 T3ed481
Keywords
language, methodology, testing, TTCN-3
ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE
Tel.: +33 4 92 94 42 00 Fax: +33 4 93 65 47 16
Siret N° 348 623 562 00017 - NAF 742 C
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° 7803/88
Important notice
The present document can be downloaded from:
http://www.etsi.org/standards-search

The present document may be made available in electronic versions and/or in print. The content of any electronic and/or

print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any

existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the

print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat.

Users of the present document should be aware that the document may be subject to revision or change of status.

Information on the current status of this and other ETSI documents is available at

https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx

If you find errors in the present document, please send your comment to one of the following services:

https://portal.etsi.org/People/CommiteeSupportStaff.aspx
Copyright Notification

No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying

and microfilm except as authorized by written permission of ETSI.

The content of the PDF version shall not be modified without the written authorization of ETSI.

The copyright and the foregoing restriction extend to reproduction in all media.
© European Telecommunications Standards Institute 2016.
All rights reserved.
TM TM TM

DECT , PLUGTESTS , UMTS and the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members.

3GPP and LTE™ are Trade Marks of ETSI registered for the benefit of its Members and

of the 3GPP Organizational Partners.

GSM® and the GSM logo are Trade Marks registered and owned by the GSM Association.

ETSI
---------------------- Page: 2 ----------------------
3 Final draft ETSI ES 201 873-1 V4.8.1 (2016-05)
Contents

Intellectual Property Rights .............................................................................................................................. 12

Foreword ........................................................................................................................................................... 12

Modal verbs terminology .................................................................................................................................. 12

1 Scope ...................................................................................................................................................... 13

2 References .............................................................................................................................................. 13

2.1 Normative references ....................................................................................................................................... 13

2.2 Informative references ...................................................................................................................................... 14

3 Definitions and abbreviations ................................................................................................................. 15

3.1 Definitions ........................................................................................................................................................ 15

3.2 Abbreviations ................................................................................................................................................... 20

4 Introduction ............................................................................................................................................ 21

4.0 General ............................................................................................................................................................. 21

4.1 The core language and presentation formats .................................................................................................... 21

4.2 Unanimity of the specification ......................................................................................................................... 23

4.3 Conformance .................................................................................................................................................... 23

5 Basic language elements ........................................................................................................................ 23

5.0 General ............................................................................................................................................................. 23

5.1 Identifiers and keywords .................................................................................................................................. 24

5.2 Scope rules ....................................................................................................................................................... 24

5.2.0 General ........................................................................................................................................................ 24

5.2.1 Scope of formal parameters ........................................................................................................................ 27

5.2.2 Uniqueness of identifiers ............................................................................................................................ 27

5.3 Ordering of language elements ......................................................................................................................... 28

5.4 Parameterization ............................................................................................................................................... 28

5.4.0 General ........................................................................................................................................................ 28

5.4.1 Formal parameters ...................................................................................................................................... 29

5.4.1.0 General .................................................................................................................................................. 29

5.4.1.1 Formal parameters of kind value ........................................................................................................... 29

5.4.1.2 Formal parameters of kind template ...................................................................................................... 32

5.4.1.3 Formal parameters of kind timer ........................................................................................................... 34

5.4.1.4 Formal parameters of kind port ............................................................................................................. 34

5.4.2 Actual parameters ....................................................................................................................................... 35

5.5 Cyclic Definitions............................................................................................................................................. 40

6 Types and values .................................................................................................................................... 41

6.0 General ............................................................................................................................................................. 41

6.1 Basic types and values ...................................................................................................................................... 41

6.1.0 Simple basic types and values..................................................................................................................... 41

6.1.1 Basic string types and values ...................................................................................................................... 42

6.1.1.0 General .................................................................................................................................................. 42

6.1.1.1 Accessing individual string elements .................................................................................................... 44

6.1.2 Subtyping of basic types ............................................................................................................................. 45

6.1.2.0 General .................................................................................................................................................. 45

6.1.2.1 Lists of templates .................................................................................................................................. 45

6.1.2.2 Lists of types ......................................................................................................................................... 45

6.1.2.3 Ranges ................................................................................................................................................... 46

6.1.2.4 String length restrictions ....................................................................................................................... 47

6.1.2.5 Pattern subtyping of character string types ........................................................................................... 47

6.1.2.6 Mixing subtyping mechanisms .............................................................................................................. 47

6.1.2.6.1 Mixing patterns, lists and ranges ..................................................................................................... 47

6.1.2.6.2 Using length restriction with other constraints ................................................................................ 48

6.2 Structured types and values .............................................................................................................................. 48

6.2.0 General ........................................................................................................................................................ 48

6.2.1 Record type and values ............................................................................................................................... 50

6.2.1.0 General .................................................................................................................................................. 50

ETSI
---------------------- Page: 3 ----------------------
4 Final draft ETSI ES 201 873-1 V4.8.1 (2016-05)

6.2.1.1 Referencing fields of a record type ....................................................................................................... 52

6.2.1.2 Optional elements in a record................................................................................................................ 53

6.2.1.3 Nested type definitions for field types .................................................................................................. 53

6.2.2 Set type and values ..................................................................................................................................... 54

6.2.2.0 General .................................................................................................................................................. 54

6.2.2.1 Referencing fields of a set type ............................................................................................................. 54

6.2.2.2 Optional elements in a set ..................................................................................................................... 54

6.2.2.3 Nested type definition for field types .................................................................................................... 54

6.2.3 Records and sets of single types ................................................................................................................. 54

6.2.3.0 General .................................................................................................................................................. 54

6.2.3.1 Nested type definitions .......................................................................................................................... 57

6.2.3.2 Referencing elements of record of and set of types .............................................................................. 57

6.2.4 Enumerated type and values ....................................................................................................................... 58

6.2.5 Unions ......................................................................................................................................................... 60

6.2.5.0 General .................................................................................................................................................. 60

6.2.5.1 Referencing fields of a union type ........................................................................................................ 60

6.2.5.2 Option and union ................................................................................................................................... 61

6.2.5.3 Nested type definition for field types .................................................................................................... 61

6.2.6 The anytype ................................................................................................................................................ 62

6.2.7 Arrays ......................................................................................................................................................... 62

6.2.8 The default type .......................................................................................................................................... 64

6.2.9 Communication port types .......................................................................................................................... 64

6.2.10 Component types ........................................................................................................................................ 66

6.2.10.1 Component type definition .................................................................................................................... 66

6.2.10.2 Reuse of component types .................................................................................................................... 67

6.2.11 Component references ................................................................................................................................ 69

6.2.12 Addressing entities inside the SUT ............................................................................................................. 71

6.2.13 Subtyping of structured types ..................................................................................................................... 73

6.2.13.0 General .................................................................................................................................................. 73

6.2.13.1 Length subtyping of record ofs and set ofs ........................................................................................... 73

6.2.13.2 List subtyping of structured types and anytype ..................................................................................... 74

6.2.13.3 Subtyping of the iterated type of record ofs and set ofs ........................................................................ 76

6.2.13.4 Mixing subtyping mechanisms .............................................................................................................. 77

6.3 Type compatibility ........................................................................................................................................... 78

6.3.0 General ........................................................................................................................................................ 78

6.3.1 Compatibility of non-structured types ........................................................................................................ 78

6.3.2 Compatibility of structured types ................................................................................................................ 79

6.3.2.0 General .................................................................................................................................................. 79

6.3.2.1 Compatibility of enumerated types ....................................................................................................... 80

6.3.2.2 Compatibility of record and record of types ......................................................................................... 80

6.3.2.3 Compatibility of set and set of types ..................................................................................................... 81

6.3.2.4 Compatibility of union types ................................................................................................................. 81

6.3.2.5 Compatibility of anytype types ............................................................................................................. 82

6.3.2.6 Compatibility between sub-structures ................................................................................................... 82

6.3.3 Compatibility of component types .............................................................................................................. 83

6.3.4 Type compatibility of communication and connection operations ............................................................. 83

6.3.5 Type conversion .......................................................................................................................................... 84

6.4 Type synonym .................................................................................................................................................. 84

7 Expressions ............................................................................................................................................. 84

7.0 General ............................................................................................................................................................. 84

7.1 Operators .......................................................................................................................................................... 85

7.1.0 General ........................................................................................................................................................ 85

7.1.1 Arithmetic operators ................................................................................................................................... 86

7.1.2 List operator ................................................................................................................................................ 87

7.1.3 Relational operators .................................................................................................................................... 87

7.1.4 Logical operators ........................................................................................................................................ 90

7.1.5 Bitwise operators ........................................................................................................................................ 90

7.1.6 Shift operators ............................................................................................................................................. 91

7.1.7 Rotate operators .......................................................................................................................................... 92

7.2 Field references and list ele me nts ..................................................................................................................... 92

ETSI
---------------------- Page: 4 ----------------------
5 Final draft ETSI ES 201 873-1 V4.8.1 (2016-05)

8 Modules .................................................................................................................................................. 93

8.0 General ............................................................................................................................................................. 93

8.1 Definition of a module ..................................................................................................................................... 93

8.2 Module definitions part .................................................................................................................................... 94

8.2.0 General ........................................................................................................................................................ 94

8.2.1 Module parameters ..................................................................................................................................... 95

8.2.2 Groups of definitions .................................................................................................................................. 96

8.2.3 Importing from modules ............................................................................................................................. 97

8.2.3.0 General .................................................................................................................................................. 97

8.2.3.1 General format of import ...................................................................................................................... 97

8.2.3.2 Importing single definitions ................................................................................................................ 104

8.2.3.3 Importing groups ................................................................................................................................. 104

8.2.3.4 Importing definitions of the same kind ............................................................................................... 105

8.2.3.5 Importing all definitions of a module .................................................................................................. 106

8.2.3.6 Import definitions from other TTCN-3 editions and from non-TTCN-3 modules .............................. 107

8.2.3.7 Importing of import statements from TTCN-3 modules ..................................................................... 109

8.2.3.8 Compatibility of language specifications in imports ........................................................................... 110

8.2.4 Definition of friend modules ..................................................................................................................... 110

8.2.5 Visibility of definitions ............................................................................................................................. 111

8.3 Module control part ........................................................................................................................................ 112

9 Port types, component types and test configurations ........................................................................... 113

9.0 General ........................................................................................................................................................... 113

9.1 Communication ports ..................................................................................................................................... 113

9.2 Test system interface ...................................................................................................................................... 116

10 Declaring constants .............................................................................................................................. 118

11 Declaring variables ............................................................................................................................... 118

11.0 General ........................................................................................................................................................... 118

11.1 Value variables ............................................................................................................................................... 119

11.2 Template variables ......................................................................................................................................... 120

12 Declaring timers ................................................................................................................................... 121

13 Declaring messages .............................................................................................................................. 122

14 Declaring procedure signatures ............................................................................................................ 123

15 Declaring templates .............................................................................................................................. 124

15.0 General ........................................................................................................................................................... 124

15.1 Declaring message templates ......................................................................................................................... 125

15.2 Declaring signature templates ........................................................................................................................ 126

15.3 Global and local templates ............................................................................................................................. 128

15.4 In-line Templates ............................................................................................................................................ 129

15.5 Modified templates ......................................................................................................................................... 130

15.6 Referencing elements of templates or template fields .................................................................................... 133

15.6.0 General ...................................................................................................................................................... 133

15.6.1 Referencing individual string elements..................................................................................................... 133

15.6.2 Referencing record and set fields ....................................................................................................... 133

15.6.3 Referencing record of and set of elements ...................................................................................... 134

15.6.4 Referencing signature parameters ............................................................................................................. 138

15.6.5 Referencing union alternati ves ............................................................................................................... 138

15.7 Template matching mechanisms .................................................................................................................... 139

15.7.0 General ...................................................................................................................................................... 139

15.7.1 Specific values .......................................................................................................................................... 140

15.7.2 Special symbols that can be used instead of values .................................................................................. 141

15.7.3 Special symbols that can be used inside values ........................................................................................ 142

15.7.4 Special symbols which describe attributes of values ................................................................................ 142

15.8 Template Restrictions ..................................................................................................................................... 143

15.9 Match Operation ............................................................................................................................................. 145

15.10 Valueof Operation .......................................................................................................................................... 147

15.11 Concatenating templates of string and list types ............................................................................................ 147

ETSI
---------------------- Page: 5 -----------
...

SLOVENSKI STANDARD
SIST ES 201 873-1 V4.8.1:2016
01-oktober-2016

0HWRGH]DSUHVNXãDQMHLQVSHFLILFLUDQMH 076 UD]OLþLFD]DSLVDSUHVNXãDQMDLQ

NUPLOQLKSUHVNXVRYGHO-HGUQLMH]LN77&1

Methods for Testing and Specification (MTS) - The Testing and Test Control Notation

version 3 - Part 1: TTCN-3 Core Language
Ta slovenski standard je istoveten z: ETSI ES 201 873-1 V4.8.1 (2016-07)
ICS:
33.040.01 Telekomunikacijski sistemi Telecommunication systems
na splošno in general
35.060 Jeziki, ki se uporabljajo v Languages used in
informacijski tehniki in information technology
tehnologiji
SIST ES 201 873-1 V4.8.1:2016 en

2003-01.Slovenski inštitut za standardizacijo. Razmnoževanje celote ali delov tega standarda ni dovoljeno.

---------------------- Page: 1 ----------------------
SIST ES 201 873-1 V4.8.1:2016
---------------------- Page: 2 ----------------------
SIST ES 201 873-1 V4.8.1:2016
ETSI ES 201 873-1 V4.8.1 (2016-07)
ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 1: TTCN-3 Core Language
---------------------- Page: 3 ----------------------
SIST ES 201 873-1 V4.8.1:2016
2 ETSI ES 201 873-1 V4.8.1 (2016-07)
Reference
RES/MTS-201873-1 T3ed481
Keywords
language, methodology, testing, TTCN-3
ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE
Tel.: +33 4 92 94 42 00 Fax: +33 4 93 65 47 16
Siret N° 348 623 562 00017 - NAF 742 C
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° 7803/88
Important notice
The present document can be downloaded from:
http://www.etsi.org/standards-search

The present document may be made available in electronic versions and/or in print. The content of any electronic and/or

print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any

existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the

print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat.

Users of the present document should be aware that the document may be subject to revision or change of status.

Information on the current status of this and other ETSI documents is available at

https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx

If you find errors in the present document, please send your comment to one of the following services:

https://portal.etsi.org/People/CommiteeSupportStaff.aspx
Copyright Notification

No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying

and microfilm except as authorized by written permission of ETSI.

The content of the PDF version shall not be modified without the written authorization of ETSI.

The copyright and the foregoing restriction extend to reproduction in all media.
© European Telecommunications Standards Institute 2016.
All rights reserved.
TM TM TM

DECT , PLUGTESTS , UMTS and the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members.

3GPP and LTE™ are Trade Marks of ETSI registered for the benefit of its Members and

of the 3GPP Organizational Partners.

GSM® and the GSM logo are Trade Marks registered and owned by the GSM Association.

ETSI
---------------------- Page: 4 ----------------------
SIST ES 201 873-1 V4.8.1:2016
3 ETSI ES 201 873-1 V4.8.1 (2016-07)
Contents

Intellectual Property Rights ...................................................................................................................... 12

Foreword ................................................................................................................................................... 12

Modal verbs terminology .......................................................................................................................... 12

1 Scope .............................................................................................................................................. 13

2 References ...................................................................................................................................... 13

2.1 Normative references .............................................................................................................................. 13

2.2 Informative references ............................................................................................................................. 14

3 Definitions and abbreviations ......................................................................................................... 15

3.1 Definitions ............................................................................................................................................... 15

3.2 Abbreviations .......................................................................................................................................... 20

4 Introduction .................................................................................................................................... 21

4.0 General .................................................................................................................................................... 21

4.1 The core language and presentation formats ........................................................................................... 21

4.2 Unanimity of the specification ................................................................................................................ 23

4.3 Conformance ........................................................................................................................................... 23

5 Basic language elements ................................................................................................................ 23

5.0 General .................................................................................................................................................... 23

5.1 Identifiers and keywords ......................................................................................................................... 24

5.2 Scope rules .............................................................................................................................................. 24

5.2.0 General ............................................................................................................................................... 24

5.2.1 Scope of formal parameters ............................................................................................................... 27

5.2.2 Uniqueness of identifiers ................................................................................................................... 27

5.3 Ordering of language elements ................................................................................................................ 28

5.4 Parameterization ...................................................................................................................................... 28

5.4.0 General ............................................................................................................................................... 28

5.4.1 Formal parameters ............................................................................................................................. 29

5.4.1.0 General ......................................................................................................................................... 29

5.4.1.1 Formal parameters of kind value .................................................................................................. 29

5.4.1.2 Formal parameters of kind template ............................................................................................. 32

5.4.1.3 Formal parameters of kind timer .................................................................................................. 34

5.4.1.4 Formal parameters of kind port .................................................................................................... 34

5.4.2 Actual parameters .............................................................................................................................. 35

5.5 Cyclic Definitions.................................................................................................................................... 40

6 Types and values ............................................................................................................................ 40

6.0 General .................................................................................................................................................... 40

6.1 Basic types and values ............................................................................................................................. 41

6.1.0 Simple basic types and values............................................................................................................ 41

6.1.1 Basic string types and values ............................................................................................................. 42

6.1.1.0 General ......................................................................................................................................... 42

6.1.1.1 Accessing individual string elements ........................................................................................... 44

6.1.2 Subtyping of basic types .................................................................................................................... 45

6.1.2.0 General ......................................................................................................................................... 45

6.1.2.1 Lists of templates ......................................................................................................................... 45

6.1.2.2 Lists of types ................................................................................................................................ 45

6.1.2.3 Ranges .......................................................................................................................................... 46

6.1.2.4 String length restrictions .............................................................................................................. 46

6.1.2.5 Pattern subtyping of character string types .................................................................................. 47

6.1.2.6 Mixing subtyping mechanisms ..................................................................................................... 47

6.1.2.6.1 Mixing patterns, lists and ranges ............................................................................................ 47

6.1.2.6.2 Using length restriction with other constraints ....................................................................... 48

6.2 Structured types and values ..................................................................................................................... 48

6.2.0 General ............................................................................................................................................... 48

6.2.1 Record type and values ...................................................................................................................... 50

ETSI
---------------------- Page: 5 ----------------------
SIST ES 201 873-1 V4.8.1:2016
4 ETSI ES 201 873-1 V4.8.1 (2016-07)

6.2.1.0 General ......................................................................................................................................... 50

6.2.1.1 Referencing fields of a record type .............................................................................................. 52

6.2.1.2 Optional elements in a record....................................................................................................... 53

6.2.1.3 Nested type definitions for field types ......................................................................................... 53

6.2.2 Set type and values ............................................................................................................................ 54

6.2.2.0 General ......................................................................................................................................... 54

6.2.2.1 Referencing fields of a set type .................................................................................................... 54

6.2.2.2 Optional elements in a set ............................................................................................................ 54

6.2.2.3 Nested type definition for field types ........................................................................................... 54

6.2.3 Records and sets of single types ........................................................................................................ 54

6.2.3.0 General ......................................................................................................................................... 54

6.2.3.1 Nested type definitions ................................................................................................................. 57

6.2.3.2 Referencing elements of record of and set of types ..................................................................... 57

6.2.4 Enumerated type and values .............................................................................................................. 58

6.2.5 Unions ................................................................................................................................................ 60

6.2.5.0 General ......................................................................................................................................... 60

6.2.5.1 Referencing fields of a union type ............................................................................................... 60

6.2.5.2 Option and union .......................................................................................................................... 61

6.2.5.3 Nested type definition for field types ........................................................................................... 61

6.2.6 The anytype ....................................................................................................................................... 61

6.2.7 Arrays ................................................................................................................................................ 62

6.2.8 The default type ................................................................................................................................. 64

6.2.9 Communication port types ................................................................................................................. 64

6.2.10 Component types ............................................................................................................................... 66

6.2.10.1 Component type definition ........................................................................................................... 66

6.2.10.2 Reuse of component types ........................................................................................................... 67

6.2.11 Component references ....................................................................................................................... 69

6.2.12 Addressing entities inside the SUT .................................................................................................... 71

6.2.13 Subtyping of structured types ............................................................................................................ 73

6.2.13.0 General ......................................................................................................................................... 73

6.2.13.1 Length subtyping of record ofs and set ofs .................................................................................. 73

6.2.13.2 List subtyping of structured types and anytype ............................................................................ 74

6.2.13.3 Subtyping of the iterated type of record ofs and set ofs ............................................................... 76

6.2.13.4 Mixing subtyping mechanisms ..................................................................................................... 77

6.3 Type compatibility .................................................................................................................................. 78

6.3.0 General ............................................................................................................................................... 78

6.3.1 Compatibility of non-structured types ............................................................................................... 78

6.3.2 Compatibility of structured types ....................................................................................................... 79

6.3.2.0 General ......................................................................................................................................... 79

6.3.2.1 Compatibility of enumerated types .............................................................................................. 80

6.3.2.2 Compatibility of record and record of types ................................................................................ 80

6.3.2.3 Compatibility of set and set of types ............................................................................................ 81

6.3.2.4 Compatibility of union types ........................................................................................................ 81

6.3.2.5 Compatibility of anytype types .................................................................................................... 82

6.3.2.6 Compatibility between sub-structures .......................................................................................... 82

6.3.3 Compatibility of component types ..................................................................................................... 83

6.3.4 Type compatibility of communication and connection operations .................................................... 83

6.3.5 Type conversion ................................................................................................................................. 84

6.4 Type synonym ......................................................................................................................................... 84

7 Expressions ..................................................................................................................................... 84

7.0 General .................................................................................................................................................... 84

7.1 Operators ................................................................................................................................................. 85

7.1.0 General ............................................................................................................................................... 85

7.1.1 Arithmetic operators .......................................................................................................................... 86

7.1.2 List operator ....................................................................................................................................... 87

7.1.3 Relational operators ........................................................................................................................... 87

7.1.4 Logical operators ............................................................................................................................... 90

7.1.5 Bitwise operators ............................................................................................................................... 90

7.1.6 Shift operators .................................................................................................................................... 91

7.1.7 Rotate operators ................................................................................................................................. 92

7.2 Field references and list ele me nts ............................................................................................................ 92

ETSI
---------------------- Page: 6 ----------------------
SIST ES 201 873-1 V4.8.1:2016
5 ETSI ES 201 873-1 V4.8.1 (2016-07)

8 Modules .......................................................................................................................................... 93

8.0 General .................................................................................................................................................... 93

8.1 Definition of a module ............................................................................................................................ 93

8.2 Module definitions part ........................................................................................................................... 94

8.2.0 General ............................................................................................................................................... 94

8.2.1 Module parameters ............................................................................................................................ 95

8.2.2 Groups of definitions ......................................................................................................................... 96

8.2.3 Importing from modules .................................................................................................................... 97

8.2.3.0 General ......................................................................................................................................... 97

8.2.3.1 General format of import ............................................................................................................. 97

8.2.3.2 Importing single definitions ....................................................................................................... 104

8.2.3.3 Importing groups ........................................................................................................................ 104

8.2.3.4 Importing definitions of the same kind ...................................................................................... 105

8.2.3.5 Importing all definitions of a module ......................................................................................... 106

8.2.3.6 Import definitions from other TTCN-3 editions and from non-TTCN-3 modules ..................... 107

8.2.3.7 Importing of import statements from TTCN-3 modules ............................................................ 109

8.2.3.8 Compatibility of language specifications in imports .................................................................. 110

8.2.4 Definition of friend modules ............................................................................................................ 110

8.2.5 Visibility of definitions .................................................................................................................... 111

8.3 Module control part ............................................................................................................................... 112

9 Port types, component types and test configurations ................................................................... 113

9.0 General .................................................................................................................................................. 113

9.1 Communication ports ............................................................................................................................ 113

9.2 Test system interface ............................................................................................................................. 116

10 Declaring constants ...................................................................................................................... 118

11 Declaring variables ....................................................................................................................... 118

11.0 General .................................................................................................................................................. 118

11.1 Value variables ...................................................................................................................................... 119

11.2 Template variables ................................................................................................................................ 120

12 Declaring timers ........................................................................................................................... 121

13 Declaring messages ...................................................................................................................... 122

14 Declaring procedure signatures .................................................................................................... 123

15 Declaring templates ...................................................................................................................... 124

15.0 General .................................................................................................................................................. 124

15.1 Declaring message templates ................................................................................................................ 125

15.2 Declaring signature templates ............................................................................................................... 126

15.3 Global and local templates .................................................................................................................... 128

15.4 In-line Templates ................................................................................................................................... 129

15.5 Modified templates ................................................................................................................................ 130

15.6 Referencing elements of templates or template fields ........................................................................... 133

15.6.0 General ............................................................................................................................................. 133

15.6.1 Referencing individual string elements............................................................................................ 133

15.6.2 Referencing record and set fields .............................................................................................. 133

15.6.3 Referencing record of and set of elements ............................................................................. 134

15.6.4 Referencing signature parameters .................................................................................................... 138

15.6.5 Referencing union alternatives ...................................................................................................... 138

15.7 Template matching mechanisms ........................................................................................................... 139

15.7.0 General ............................................................................................................................................. 139

15.7.1 Specific values ................................................................................................................................. 140

15.7.2 Special symbols that can be used instead of values ......................................................................... 141

15.7.3 Special symbols that can be used inside values ............................................................................... 142

15.7.4 Special symbols which describe attributes of values ....................................................................... 142

15.8 Template Restrictions ............................................................................................................................ 143

15.9 Match Operation .................................................................................................................................... 145

15.10 Valueof Operation ................................................................................................................................. 147

15.11 Concatenating templates of string and list types ................................................................................... 147

ETSI
---------------------- Page: 7 ----------------------
SIST ES 201 873-1 V4.8.1:2016
6 ETSI ES 201 873-1 V4.8.1 (2016-07)

16 Functions, altsteps and testcases .................................................................................................. 149

16.0 General .................................................................................................................................................. 149

16.1 Functions ..............................................................................................................

...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.