ISO/IEC 9646-3:1998
(Main)Information technology — Open Systems Interconnection — Conformance testing methodology and framework — Part 3: The Tree and Tabular Combined Notation (TTCN)
Information technology — Open Systems Interconnection — Conformance testing methodology and framework — Part 3: The Tree and Tabular Combined Notation (TTCN)
1.1 This part of l[SO/lEC 9646 defines an informal test notation, called the Tree and Tabular Combined Notation (TTCN), for OS1 conformance test suites, which is independent of test methods, layers and protocols, and which reflects the abstract testing methodology defined in ISO/IEC 9646-l and ISWIEC 9646-2. 1.2 It also specifies requirements and provides guidance for using TTCN in the specification of system-independent conformance test suites for one or more OS1 standards. It specifies two forms of the notation: one, a human-readable form, applicable to the production of conformance test suite standards for OS1 protocols; and the other, a machine-processable form, applicable to processing within and between computer systems. 1.3 This part of ISO/IEC 9646 applies to the specification of conformance test cases which can be expressed abstractly in terms of control and observation of protocol data units and abstract service primitives. Nevertheless, for some protocols, test cases may be needed which cannot be expressed in these terms. The specification of such test cases is outside the scope of this part of ISO/IEC 9646, although those test cases may need to be included in a conformance test suite standard. For example. some static conformance requirements related to an application service may require testing techniques which are specific to that particular application. The specification of test cases in which more than one behavior description is to be run in parallel is dealt with by the concurrency features (particularly involving the definition of Test Components and Test Component Configurations). 1.4 This part of ISO/IEC 9646 specifies requirements on what a test suite standard may specify about a conforming realization of the test suite, including the operational semantics of TTCN test suites. 1.5 This part of ISO/IEC 9646 applies to the specification of conformance test suites for OS1 protocols in OS1 layers 2 to 7, specifically including Abstract Syntax Notation One (ASN. 1) based protocols. The following are outside the scope of this part of ISOIIEC 9646: a) the specification of conformance test suites for Physical layer protocols; b) the relationship between TTCN and formal description techniques; c) the means of realization of executable test suites (ETS) from abstract test suites. 1.6 This part of ISO/IEC 9646 defines mechanisms for using concurrency in the specification of abstract test cases. Concurrency in TTCN is applicable to the specification of test cases: a) in a multi-party testing context; b) which handle multiplexing and demultiplexing in either a single-party or multi-party testing context; c) which handle splitting and recombining in either a single-party or multi-party testing context; d) in a single-party testing context when the complexity of the protocol or set of protocols handled by the IUT is such that concurrency can simplify the specification of the test case 1.7 TTCN modules are defined to allow sharing of common TTCN specifications between test suites.
Technologies de l'information — Interconnexion de systèmes ouverts — Essais de conformité — Méthodologie générale et procédures — Partie 3: Notation combinée, arborescente et tabulaire (TTCN)
General Information
Relations
Standards Content (Sample)
INTERNATIONAL ISOAEC
STANDARD 9646-3
Second edition
1998-l I-01
Information technology - Open Systems
Interconnection - Conformance testing
methodology and framework -
Part 3:
The Tree and Tabular Combined Notation
(TTCN)
Technologies de I’informa tion - lnterconnexion de systkmes ouverts -
- Mkthodologie g&&ale et proc6dures -
Essais de conformit
Partie 3: Notation cornbinge, arborescente et tabulaire (TTCN)
---------------------- Page: 1 ----------------------
ISO/IEC 9646-3: 1998 (E)
Contents
Page
1Scope.
.
....................................................................
2 Normative references.
1
.........................................................
3Definitions
...3
...............................................................
3.1 Basic terms from ISO/IEC 9646-l
.3
........................................
3.2 Terms from ISO/IEC 7498-l
.4
............................................
3.3 Terms from ISO/IEC 10731 .4
.............................................
3.4 Terms from ISO/IEC 8824-l
.4
............................................
3.5 Terms from ISO/IEC 8825-l
5
............................................
3.6 TTCN specific terms. .5
..................................................
4Abbreviations
..s
..............................................................
4.1 Abbreviations defined in ISO/IEC 9646- 1.
.8
.................................
4.2 Abbreviations defined in ISO/IEC 9646-2.
.8
.................................
4.3 Other abbreviations.
.9
...................................................
5ThesyntaxformsofTTCN.
.
...................................................
6Compliance.
..10
............................................................
7Conventions.l 0
7.1Introduction.l 0
7.2 Syntactic metanotation
10
.................................................
7.3 TTCN.GR table proformas.
-11
............................................
7.3.1 Introduction 11
...................................................
7.3.2 Single TTCN object tables. 11
.......................................
7.3.3 Multiple TTCN object tables. .12
....................................
7.3.4 Alternative compact tables.
.12
......................................
7.3.5 Specification of proformas.
.13
......................................
7.4 Free Text and Bounded Free Text
.13
.......................................
8ConcurrencyinTTCN.l 3
8.1TestComponents
..13
...................................................
8.2 Test Component Configurations.
.13
........................................
9 TTCN test suite structure.
.15
....................................................
9.1Introduction.l 5
9.2 Test Group References
.15
................................................
9.3 Test Step Group References
.15
............................................
9.4 Default Group References.
.15
.............................................
9SPartsofaTTCNtestsuite
.15
..............................................
10 Test Suite Overview.
.16
.......................................................
lO.lIntroduction.l 6
10.2 Test Suite Structure.
.16
.................................................
10.3TestCaseIndex.l 8
10.4TestStepIndex.l 9
10.5 Default Index
.20
......................................................
10.6TestSuiteExports.2 1
10.7TheImportPart.2 2
10.7.1 Introduction
.22
.................................................
10.7J Imports.
.22
....................................................
llDeclarationsPart.2 4
ll.lIntroduction.2 4
11.2TTCNtypes.2 4
112.1 Introduction
.24
.................................................
11.2.2 Redefined TTCN types.
.24
.......................................
11.2.3 Test Suite Type Definitions. .26
....................................
0 ISO/IEC 1998
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or
utilized in any form or by any means, electronic or mechanical, including photocopying and micro-
film, without permission in writing from the publisher.
ISO/IEC Copyright Office l Case Postale l 56 CH- 1211 Geneve 20 l Switzerland.
Printed in Switzerland.
---------------------- Page: 2 ----------------------
ISO/IEC 9646-3: 1998 (E)
0 ISO/IEC
.................................. .32
11.3 TI’CN operators and TTCN operations
................................................. .32
11.3.1 Introduction
.............................................. .32
11.3.2 TTCN operators
.......................................... .33
11.3.3 Predefined operations
................... .35
11.3.4 Test Suite Operation definitions and descriptions.
...................................... .40
11.4 Test Suite Parameter Declarations
.............................. .41
11.5 Test Case Selection Expression Definitions.
....................................... ‘42
11.6 Test Suite Constant Declarations
............................ .43
11.7 Test Suite Constant Declarations by Reference
..................................................... 44
11.8 TI’CN variables
................................ .44
11.8.1 Test Suite Variable Declarations.
................................. .45
11.8.2 Binding of Test Suite Variables.
................................. .45
11.8.3 Test Case Variable Declarations
................................. .46
11.8.4 Binding of Test Case Variables.
.46
11.9 PC0 Type Declaration .
.................................................. .47
11.10 PC0 Declarations
................................................... .49
11.11 CP Declarations
................................................. .50
11.12 Timer Declarations
........................ .5 1
11.13 Test Components and Configuration Declarations.
.51
11.13.1 Test Components .
...................... .53
11.13.2 Test Component Configuration Declarations
.............................................. .55
Il.14 ASP Type Definitions.
.55
11.14.1 Introduction .
.............................. .55
11.14.2 ASP Type Definitions using tables
.............. .56
11.14.3 Use of Structured Types within ASP Type Definitions.
............................. .57
11.14.4 ASP Type Definitions using ASN. 1
....................... .58
11.14.5 ASN.1 ASP Type Definitions by Reference
............................................. .59
11.15 PDU Type Definitions.
................................................ .59
11.15.1 Introduction
11.15.2 PDU Type Definitions using tables. . .59
11.15.3 Use of Structured Types within PDU definitions . .61
.............................. 61
11.15.4 PDU Type Definitions using ASN.l
11.15.5 ASN. 1 PDU Type Definitions by Reference. . .63
11.16 Test Suite Encoding Information . .64
11.16.1 Encoding Definitions . .64
.65
11.16.2 Encoding Variations. .
11.16.3 Invalid Field Encoding Definitions . .66
11.16.4 Application of encoding rules . .68
11.17 CM Type Definitions . .69
.69
11.17.1 Introduction .
11.17.2 CM Type Definitions using tables. . .69
11.17.3 CM Type Definitions using ASN.1 . .70
11.18 String length specifications. . .70
11.19 ASP, PDU and CM Definitions for SEND events . .71
11.20 ASP, PDU and CM Definitions for RECEIVE events. . .72
.72
11.21 Alias Definitions .
.72
11.21.1 Introduction .
11.21.2 Expansion of Aliases . .72
12ConstraintsPart.7 3
12.1Introduction.7 3
.................................................. .73
12.2 General principles.
........................................ .74
12.3 Parameterization of constraints.
.............................................. .74
12.4 Chaining of constraints.
.......................................... .75
12.5 Constraints for SEND events
....................................... .75
12.6 Constraints for RECEIVE events
............................................. .75
12.6.1 Matching values.
........................................ .75
12.6.2 Matching mechanisms.
............................................... .76
12.6.3 Specific Value
.............................................. .76
12.6.4 Instead of Value
. . .
III
---------------------- Page: 3 ----------------------
0 ISO/IEC
ISO/IEC 9646-3: 1998 (E)
12.6.5 Inside Values . .79
12.6.6 Attributes of values . .80
........................................ .81
13 Specification of constraints using tables
13.lIntroduction.8 1
................................. .81
13.2 Structured Type Constraint Declarations
.......................................... .83
13.3 ASP Constraint Declarations
.......................................... .83
13.4 PDU Constraint Declarations
........................................ .85
13.5 Parameterization of constraints.
................................ .85
13.6 Base constraints and modified constraints
............................ .86
13.7 Formal parameter lists in modified constraints.
13.8 CM Constraint Declarations. . .86
.......................................
14 Specification of constraints using ASN.1 .87
14,lIntroduction.8 7
....................................
14.2 ASN.l Type Constraint Declarations .87
....................................
14.3 ASN.1 ASP Constraint Declarations .88
.................................... .89
14.4 ASN.1 PDU Constraint Declarations
14.5 Parameterized ASN.l constraints. . .90
14.6 Modified ASN.1 constraints. . .90
......................
14.7 Formal parameter lists in modified ASN. 1 constraints. .91
.............. .91
14.8 ASP Parameter and PDU field names within ASN. 1 constraints.
....................................
14.9 ASN.1 CM Constraint Declarations. .92
15TheDynamicPart.9 2
15.lIntroduction.9 2
......................................... .92
15.2 Test Case dynamic behaviour.
.............. .92
15.2.1 Specification of the Test Case Dynamic Behaviour table
....................... .93
15.2.2 The Test Case Dynamic Behaviour proforma
............................. .94
15.2.3 Structure of the Test Case behaviour.
15.2.4 Concurrent Test Case Behaviour Description . .94
................................ .95
15.2.5 Line numbering and continuation
.......................................... .95
15.3 Test Step dynamic behaviour
15.3.1 Specification of the Test Step Dynamic Behaviour table . .95
15.3.2 The Test Step Dynamic Behaviour proforma . .96
15.4 Default dynamic behaviour. . .97
15.4.1 Default behaviour. . .97
.97
15.4.2 Specification of the Default Dynamic Behaviour table. .
.97
15.4.3 The Default Dynamic Behaviour proforma. .
15.5 The behaviour description. . .98
.98
15.6 The tree notation. .
15.7 Tree names and parameter lists. . .99
15.7.1 Introduction . .99
.99
15.7.2 Trees with parameters .
15.8 TTCN statements . .99
..l~
15.9TT’CNtestevents. .
100
15.9.1 Sending and receiving events. .
100
15.9.2 Receiving events .
15.9.3Sendingevents.l 00
15.9.4 Lifetime of events . 101
15.9.5 Execution of the behaviour tree . .lOl
15.9.6 The IMPLICIT SEND event . .103
15.9.7 The OTHERWISE event. . .104
15.9.8 OTHERWISE and concurrent TTCN . .105
15.9.9 The TIMEOUT event. . .105
15.9.10 Concurrent TTCN events and constructs. . .105
..lO 6
15.10TTCNexpressions. .
.106
15.10.1 Introduction .
...................... .108
15.10.2 References for ASN. 1 defined data objects.
110
15.103 References for data objects defined using tables. .
110
15.10.4 Assignments .
..lll
15.10.5Qualifiers .
---------------------- Page: 4 ----------------------
0 ISO/IEC ISO/IEC 9646-3: 1998 (E)
15.10.6 Event lines with assignments and qualifiers . 111
15.1lPseudo-events.ll 2
.112
15.12 Timer management. .
.112
15.12.1 Introduction .
.113
15.12.2 The START operation. .
.113
15.12.3 The CANCEL operation .
.114
15.12.4 The READTIMER operation. .
15.13 The ATTACH construct. . .114
15.13.1 Introduction . .114
.114
15.13.2 Scope of tree attachment .
.115
15.13.3 Tree attachment basics. .
15.13.4 The meaning of tree attachment. . .115
.117
15.13.5 Passing parameterized constraints .
15.13.6 Recursive tree attachment . .117
15.13.7 Tree attachment and Defaults . .118
15.14 Labels and the GOT0 construct . .118
15.15 The REPEAT construct. . .119
15.16 The Constraints Reference . .119
15.16.1 Purpose of the Constraints Reference column. . .119
15.16.2 Passing parameters in Constraint References . .120
15.16.3 Constraints and qualifiers and assignments . .120
15.17Verdicts.12 0
15.17.1 Introduction . .120
15.17.2 Preliminary results. . .121
.121
15.17.3 Final verdict .
15.17.4 Verdicts and OTHERWISE. . .122
15.17.5 Verdict assignment in concurrent TTCN. . .122
.122
15.18 The meaning of Defaults. .
.122
15.18.1 Introduction .
.123
15.18.2 Default References. .
15.18.3 The RETURN statement . .124
................................... .124
15.18.4 The ACTIVATE statement
.................................. .124
15.18.5 Defaults and tree attachment
15.18.6 Tree Attachment, Defaults, Activate and Return. . .126
15.18.7 Defaults and CREATE . .132
15.18.8 Defaults and CMs . .132
16Pagecontinuation.13 3
16.1 Page continuation of TTCN tables . .133
16.2 Page continuation of dynamic behaviour tables . .133
A(normative) Syntax and static semantics of TI’CN . .134
A,lIntroduction.13 4
A.2 Conventions for the syntax description . .134
A.2.1 Syntactic metanotation . .134
A.2.2 ‘ITCN.MP syntax definitions . .134
A.3 The TTCN.MP syntax productions in BNF . .136
A.3.1 TTCN Specification . .136
A.3.2TTCNModule.13 6
A.3.2.1 TTCN Module Overview Part . .136
A.3.2.2 ‘ITCN Module Import Part . .136
A.3.3Testsuite.13 7
.137
A.3.3.1 The Test Suite Overview .
.137
A.3.3.2 Test Suite Index .
.137
A.3.3.3 Test Suite Structure .
.138
A.3.3.4 Test Case Index .
,138
A.3.3.5TestStepIndex. .
A.3.3.6 Default Index. . .138
A.3.3.7 Test Suite Exports . .138
A.3.3.8TheImportPar-t. . .13 8
A.3.3.9 The Declarations Part. . .138
V
---------------------- Page: 5 ----------------------
ISO/IEC 9646-3: 1998 (E) 0 ISO/IEC
A.3.3.10 Definitions
............................................... .138
A.3,3.11 Parameterization and Selection
................................ 143
A.3.3.12 Declarations
.............................................. .144
A,3.3.13 ASP, PDU and CM Type Definitions
.......................... .149
A.3.3.14 The Constraints Part.
....................................... .154
A.3.3.15 Test Suite Type Constraint Declarations
......................... 154
8.3.3.16 Structured Type Constraint Declarations.
........................ 154
A.3.3.17 ASN. 1 Type Constraint Declarations.
........................... 155
A.3.3.18 ASP Constraint Declarations
.................................. 155
A.3.3.19 Tabular ASP Constraint Declarations
.......................... .155
8.3.3.20 ASN.1 ASP Constraint Declarations
............................ 156
A,3.3.21 PDU Constraint Declarations.
................................. 156
A.3.3.22 Tabular PDU Constraint Declarations
........................... 156
A.3.3.23 ASN. 1 PDU Constraint Declarations.
........................... 158
A.3324 CM Constraint Declarations.
.................................. 159
A.3.3.25 Tabular CM Constraint Declaration.
............................ 159
A.3.3.26 ASN.1 CM Constraint Declaration
............................. 159
A.3.3.27 The Dynamic Part
.159
.........................................
A.3.3.28 Test Cases
.159
...............................................
A.3.3.29 Test Step Library.
......................................... .160
A.3.3.30 Default Library.
........................................... .160
A.3.3.31 Behaviour descriptions.
..................................... .160
A.3.3.32 Behaviour lines
161
............................................
A.3.3.33 TTCN statements.
......................................... .161
A.3.3.34 Expressions I63
...............................................
A.3.3.35 Timer operations I64
...........................................
A.3.3.36 Types.16 5
A.3.3.37Values.16 5
A.3.3.38 Miscellaneous productions. .167
..................................
A.4 General static semantics requirements.
168
........................................
A.4.1Introduction.~.16 8
A.4.2 Uniqueness of identifiers
.168
...........................................
A.5 Differences between TTCN.GR and TTCN.MP .172
................................
A.5.1 Differences in syntax
.172
..............................................
A.5.2 Additional static semantics in the TTCN.MP.
............................ 173
A.6 List of BNF production numbers.
,174
...........................................
A.6.1Introduction.17 4
A.6.2 The production index
.174
..............................................
B(normative) Operational semantics of TTCN.
..................................... 181
B.lIntroduction.18 1
B.2Precedence.18 1
B.3 Processing of test case errors.
.181
..............................................
B.4 Converting a modularized test suite to an equivalent expanded test suite. 18 1
.............
B.5 TTCN operational semantics
.183
...............................................
B.5.1Introduction.18 3
B.5.2 The pseudo-code notation.
.183
..........................................
B.5.2.1 Introduction
.183
...............................................
B.5.2.2 Procedures and functions .183
.....................................
B.5.2.3 Processes
.183
.................................................
B.5.2.4 Natural language within pseudo-code 184
............................
B.5.2.5 Levels and alternatives. .184
......................................
B.5.3 Execution of a Test Suite .184
...........................................
B.5.3.1 Introduction .184
...............................................
B.5.4 Execution of a Test Case. .185
...........................................
B.5.4.1 Execution of a Test Case - pseudo-code .185
.........................
B.5.4.2 Execution of a Test Case or Test Component - natural language . .186
B.5.5 Expanding a set of alternatives .186
.......................................
B.5.5.1 Introduction
............................................... .186
B.5.5.2 Saving Defaults
.187
............................................
vi
---------------------- Page: 6 ----------------------
ISO/IEC 9646-3: 1998 (E)
0 ISOJIEC
B.5.5.3 Expansion of REPEAT constructs.
............................. .187
B.5.5.4 Appending default behaviour . .188
B.5.5.5Expandingattachedtrees .18 8
....................................
.189
B.5.6EvaluationofanEventLine
.........................................
B.5.6.1Pseudo-code.18 9
.189
B.5.6.2 Natural language description
..................................
B.5.7 Functions for TTCN events. .189
.........................................
B.5.7.1 Functions for TTCN events - pseudo-code . .189
B.5.7.2 Functions for TTCN events - natural language description. . 190
.190
B.5.8 Execution of the SEND event
........................................
B.5.8.1 Execution of the SEND event - pseudo-code. . .190
B.5.8.2 Execution of the SEND event - natural language description . .191
.191
B.5.9 Execution of the RECEIVE event. .
B.5.9.1 Execution of the RECEIVE event - pseudo-code . .191
B.5.9.2 Execution of the RECEIVE event - natural language description. . .192
B.S.10 Execution of the OTHERWISE event. .193
................................
B.5.10.1 Execution of the OTHERWISE event - pseudo-code . .193
B.5.10.2 Execution of the OTHERWISE event - natural language description. . 193
B.5.11 Execution of the TIMEOUT event .193
...................................
B.5.11.1 Execution of the TIMEOUT event - pseudo-code. . .193
B.5.11.2 Execution of the TIMEOUT event - natural language description . 194
.195
B.5.12 Execution of the DONE event.
......................................
B.5.12.1 Execution of the DONE event - pseudo-code . ,195
B.5.12.2 Execution of the DONE event - natural language description. . .195
.196
B.5.13 Execution of the IMPLICIT SEND event. .
B.5.13.1 Execution of the IMPLICIT SEND event - pseudo-code . .196
B.5.13.2 Execution of IMPLICIT SEND - natural language description. . 196
.196
B.5.14 Execution of a pseudo-event.
.......................................
B.5.14.1 Execution of a pseudo-event - pseudo-code .196
.....................
B.5.14.2 Execution of PSEUDO-EVENTS - natural language description . 196
B.5.15 Execution of BOOLEAN expressions. ,196
................................
B.5.15.1 Execution of BOOLEAN expressions - pseudo-code .196
..............
B.5.15.2 Execution of BOOLEAN expressions - natural language description. . 197
B.5.16 Execution of assignments .197
..........................................
B.5.16.1 Execution of assignments - pseudo-code. .197
.......................
B.5.16.2 Execution of ASSIGNMENTS - natural language description . 197
B.5.17 Execution of TIMER operations. .197
....................................
B.5.17.1 Execution of TIMER operations - pseudo-code. . .197
B.5.17.2 Execution of START timer - natural language description . 198
B.5.17.3 Execution of CANCEL timer - natural language description . .198
B.5.17.4 Execution of READTIMER - natural language description . 198
B.5.18 Functions for ‘ITCN constructs. .198
.....................................
B.5.18.1 Functions for TTCN constructs - pseudo-code . .198
B.5.18.2 Functions for TTCN constructs - natural language description. . 198
B.5.19 Execution of the ACTIVATE construct ,198
...............................
B.5.19.1 Execution of the ACTIVATE construct - pseudo-code . .198
B.5.19.2 Execution of the ACTIVATE construct - natural language description . 199
B.5.20 Execution of the CREATE construct .199
.................................
B.5.20.1 Execution of the CREATE event - pseudo-code . .199
B.5.20.2 Execution of the CREATE event - natural language description. 199
......
B.5.21 Execution of the GOT0 construct. .200
...................................
B.5.22 Execution of the RETURN construct .200
.................................
B.5.23Theverdict.20 0
.200
B.5.23.1 The verdict - pseudo-code
...................................
.201
B.5.23.2 The VERDICT - natural language description. .
B.5.24 The Conformance Log .201
............................................
.201
B.5.24.1 The LOG - pseudo-code
.....................................
B.5.24.2 The conformance log - natural language description. . .201
B.5.25 Tree handling functions and procedures. . .202
vii
---------------------- Page: 7 ----------------------
0 ISO/IEC
ISO/IEC 9646-3: 1998 (E)
....................... .203
B.5.26 Miscellaneous functions used by the pseudo-code
................................................. .206
C(normative) TTCN Modules
C.lIntroduction.20 6
............................................. .206
C.2 TTCN Module Overview Part.
C.2.lIntroduction.20 6
C.2.2TTCNModuleExports.20 6
........................................... .208
C.2.3 TI’CN Module Structure.
.................................................. .209
C.2.4 Test Case Index.
.................................................. .209
C.2.5 Test Step Index.
..................................................... .209
C.2.6 Default Index
C.3ImportPart.20 9
C.3.lIntroduction.20 9
C.3.2Extemal.
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.