1、INTERNATIONAL STANDARD ISOAEC 964613 Second edition 1998-1 1-01 Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 3: The Tree and Tabular Combined Notation (TTCN) Technologies de linformation - Interconnexion de systmes ouverts - Essais de c
2、onformit - Mthodologie gnrale et procdures - Partie 3: Notation combine, arborescente et tabulaire (TTCN) This material is reproduced from IS0 documents under International Organization for Standardization (60) Copyright License Number IHS/ICC/ i 996. Not for resale. No part of these IS0 documents m
3、ay be reproduced in any form, electronic retrieval system or otherwise, except as allowed in the copyright law of the country of use, or with the prior written consent of IS0 (Case postale 56, 12 1 I Geneva 20, Switzerland, Fax + 4 I 22 734 10 79), IHS or the IS0 Licensors members. Reference number
4、ISOAEC 9646-3:1998(E) ISO/IEC 9646-3: 1998 (E) Contents Page 1 scope . 1 2 Normative references 1 3 Definitions . 3 3.1 Basic tem from ISOAEC 9646-1 . . 3 3.2 Terms from ISO/IEC 7498-1 33 Terms from ISOAEC 10731 4 3.4 Terms from ISOAEC 8824- 1 . 4 3.5 Terms from ISOAEC 8825-1 . 5 . 5 4 Abbreviations
5、 8 4.1 Abbreviations defined in ISOAEC 9646- 1 . 8 4.2 Abbreviations defined in ISOEC 9646-2 . 8 9 . 3.6 TCN specific terms . 4.3 Other abbreviations . . 5 The syntax forms of TCN 6 Compliance . 7 Conventions . 7.1 Introduction 10 7.2 Syntactic metanotation . 11 7.3.2 Single TCN object tables 11 7.3
6、3 Multiple TCN 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 8 Concurrency in ITCN 13 . 13 . 13 9 TCN test suite structure 15 9.1 Introduction 15 9.2 Test Group References 9.3 Test Step Group References 9.4 Default Gro
7、up References . 15 9.5 Parts of a TCN test suite . 15 10TestSuiteOverview . 16 10.1 Introduction . . 16 . 16 10.3 Test Case Ind . . 18 10.4 Test Step Index . 19 10.7 The Import Part 7.3 TCN.GR table proformas 7.3.1 Introduction . .II 8.1 Test Components . 8.2 Test Component Configurations . . 10.5 D
8、efault Index 10.6 Test Suite Exports . . 22 10.7.1 Introduction . 22 10.7.2 Imports . 22 11 Declarations Part . 24 11.1 Introduction 24 11.2 TTCN types 24 11.2.1 Introduction 24 . 24 11.2.3 Test Suite Type Definitions 26 . . 11.2.2 Predefined TCN types . O ISOAEC 1998 All rights reserved . Unless ot
9、herwise 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 . ISOAEC Copyright Office Case Postale 56 CH-i21 1 Geneve 20 Switzerland . Prin
10、ted in Switzerland . i O ISO/IEC ISO/IEC 9646-3: 1998 (E) 11.3 TTCN operators and TTCN operations . 32 11.3.1 Introduction 32 11.3.2 TTCN operators . 32 11.3.3 Predefined operations . 33 11.3.4 Test Suite Operation definitions and descriptions . 35 11.4 Test Suite Parameter Declarations . 40 11.5 Te
11、st Case Selection Expression Definitions 41 11.6 Test Suite Constant Declarations 42 11.7 Test Suite Constant Declarations by Reference . 43 11.8 TTCN variables 44 11.8.1 Test Suite Variable Declarations 44 11.8.2 Binding of Test Suite Variables . 45 11.8.3 Test Case Variable Declarations 45 11.8.4
12、Binding of Test Case Variables . 46 11.9 PCO Type Declaration 46 11.10 PCO Declarations . 47 11.11 CP Declarations 49 11.12TimerDeclarations 50 11.13 Test Components and Configuration Declarations 51 11.13.1 Test Components . 51 11.13.2 Test Component Configuration Declarations . 53 11.14 ASP Type D
13、efinitions 55 11.14.1Introduction . 55 11.14.2 ASP Type Definitions using tables . 55 11.143 Use of Structured Types within ASP Type Definitions 56 11.14.4 ASP Type Definitions using ASN . 1 57 11.14.5 ASN . 1 ASP Type Definitions by Reference 58 11.15 PDU Type Definitions . 59 11.15.1Introduction .
14、 59 11.15.2 PDU Type Definitions using tables 59 11.153 Use of Structured Types within PDU definitions . 61 11.15.4 PDU Type Definitions using ASN.1 61 11.15.5 ASN.1 PDU Type Definitions by Reference 63 11.16 Test Suite Encoding Information . 64 11.16.1 Encoding Definitions 64 11.16.3 Invalid Field
15、Encoding Definitions . 66 11.16.4 Application of encoding rules . 11.17 CM Type Definitions . 69 11.17.2 CM Type Definitions using tables . 11.173 CM Type Definitions using ASN.l 11.16.2 Encoding Variations . 65 11.17.1 Introduction 11.18 String length specifications 70 11.19 ASP. PDU and CM Definit
16、ions for SEND events 71 11.20 ASP. PDU and CM Definitions for RECEIVE events . 72 11.21 Alias Definitions 72 11.21.1 Introduction . 72 11.21.2 Expansion of Aliases 72 12ConstraintsP art 73 12.1Introduction . 73 12.2 General principles 73 12.3 Parameterization of constraints . . 74 12.4 Chaining of c
17、onstraints 74 12.5 Constraints for SEND events . 75 12.6 Constraints for RECEIVE events 75 12.6.1 Matching values . 75 75 76 12.6.2 Matching mechanisms . 12.6.3 Specific Value . 12.6.4 Instead of Value STD-IS0 9b4L-3-ENGL 1798 W 40517113 07bbb30 872 ISO/IEC 9646-3: 1998 (E) o ISOrnC 12.6.5InsideValu
18、es . 79 12.6.6 Attributes of values 80 13 Specification of constraints using tables . 81 13.1 Introduction . 81 13.2 Structured Type Constraint Declarations 81 13.3 ASP Constraint Declarations . 83 13.4 PDU Constraint Declarations . 83 13.5 Parameterization of constraints 85 13.6 Base constraints an
19、d modified constraints . 85 13.7 Formai parameter lists in modified constraints 86 13.8 CM Constraint Declarations 86 14 Specification of constraints using ASN.1 87 14.1 Introduction . 87 14.2 ASN . 1 Type Constraint Declarations . 87 14.3 ASN.1 ASP Constraint Declarations . 88 14.4 ASN.1 PDU Constr
20、aint Declarations . 89 14.5 Parameterized ASN.1 constraints 90 14.6 Modified ASN.l constraints 90 14.7 Formai parameter lists in modified ASN.1 constraints 91 14.8 ASP Parameter and PDU field names within ASN . 1 constraints 91 14.9 ASN.1 CM Constraint Declarations 92 15 The Dynamic Part 92 15.1 Int
21、roduction . 92 15.2 Test Case dynamic behaviour . 92 15.2.1 Specification of the Test Case Dynamic Behaviour table . 92 15.2.2 The Test Case Dynamic Behaviour proforma 93 15.2.3 Structure of the Test Case behaviour . 94 15.2.4 Concurrent Test Case Behaviour Description 94 15.2.5 Line numbering and c
22、ontinuation -95 153.1 Specification of the Test Step Dynamic Behaviour table . 95 15.3.2 The Test Step Dynamic Behaviour proforma 96 15.4.1 Default behaviour 97 15.4.2 Specification of the Default Dynamic Behaviour table . 97 15.4.3 The Default Dynamic Behaviour proforma 97 15.5 The behaviour descri
23、ption 98 15.6 The tree notation . 98 15.7 Tree names and parameter lists 99 15.7.1 Introduction 99 15.7.2 Trees with parameters 99 15.8 TTCN statements 99 15.9 TTCN test events . 100 15.9.1 Sending and receiving events 100 15.9.2 Receiving events . 100 15.9.3 Sending events . 100 15.9.4 Lifetime of
24、events 101 15.9.5 Execution of the behaviour tree 101 15.9.6 The IMPLICIT SEND event 103 15.9.7 The OTHERWISE event . 104 15.9.8 OTHERWISE and concurrent “CN . 105 15.9.9 The TIMEOUT event 105 15.9.10 Concurrent TCN events and constructs 105 15.10 TTCN expressions . 106 15.10.1 Introduction 106 15.1
25、0.2 References for ASN.l defined data objects 108 15.103 References for data objects defined using tables 110 15.10.4 Assignments 110 15.10.5 Qualifiers 111 15.3 Test Step dynamic behaviour . 95 15.4 Default dynamic behaviour . 97 iv STD-IS0 9b4b-3-ENGL 1998 Is 48519n3 07bbb31 709 D o ISO/IEC ISO/IE
26、C 9646-3: 1998 (E) 15.10.6 Event lines with assignments and qualifiers . 111 15.11 Pseudo-events . 112 15.12Timermanagement . 112 15.12.1Introduction 112 15.12.2 The START operation 113 15.123 The CANCEL operation 113 15.12.4 The READTIMER operation . 114 15.13 The ATTACH construct . 114 15.13.1 Int
27、roduction 114 15.13.2 Scope of tree attachment 114 15.133 Tree attachment basics 115 15.13.4 The meaning of tree attachment . 115 15.135 Passing parameterized constraints . 117 15.13.6 Recursive tree attachment . 117 15.13.7 Tree attachment and Defaults 118 15.14 Labels and the GOT0 construct . 118
28、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.163 Constraints and qualifiers and assignments 120 15.17Verdicts 120 15.17.1 Introduction 120 15.17.2FVeliminary res
29、ults . 121 15.173 Final verdict 121 15.17.4 Verdicts and OTHERWISE 122 15.175 Verdict assignment in concurrent ITCN 122 15.18 The meaning of Defaults . 122 15.18.1 Introduction 122 15.18.2 Default References . 123 15.183 The RETURN statement 124 15.18.4 The ACTIVATE statement 124 15.185 Defaults and
30、 tree attachment . 124 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 133 16.1 Page continuation of TCN tables 133 16.2 Page continuation of dynamic behaviour tables 133 A(normative) Syntax and static seman
31、tics of TTCN . 134 A.2 Conventions for the syntax description 134 A.2.2 TCN.MP syntax definitions . 134 A.3 The TCN.MP syntax productions in BNF . 136 A.1Introduction . 134 A.2.1 Syntactic metanotation 134 A3.1TTCNSpecification 136 A3.2 ITCN Module . 136 A.3.2.1 TTCN Module Overview Part 136 A3.23 T
32、TCN Module Import Part 136 A3.3Testsuite . 137 A3.3.1 The Test Suite Overview 137 A3.3.2 Test Suite Index . 137 A3.33Test Suite Structure 137 A.3.3.4 Test Case Index . 138 A.3.3.5 Test Step Index 138 A33.6 Default Index . 138 A.33.7 Test Suite Exports . 138 A.33.8 The Import Part . 138 A3.3.9 The De
33、clarations Part . 138 V STD-IS0 Sbqb-3-ENGL ISO/IEC 9646-3: 1998 (E) O ISO/IEC A.3.3.10 Definitions 138 A.3.3.11 Parameterization and Selection 143 A.3.3.12 Declarations . A.3.3.13 ASP. PDU and CM Type Definitions . A.3.3.14 The Constraints Part . A.3.3.15 Test Suite Type Constraint Declarations . 1
34、54 A.3.3.16 Structured Type Constraint Declarations . 154 A.3.3.17 ASN . 1 Type Constraint Declarations . A.3.3.18 ASP Constraint Declarations 155 A.3.3.19 Tabular ASP Constraint Declarations A.3.3.20 ASN.l ASP Constraint Declarations 156 A.3.3.21 PDU Constraint Declarations 156 A.3.3.22 Tabular PDU
35、 Constraint Declarations . . 156 A.3.3.23 ASN . 1 PDU Constraint Declarations 158 A.3.3.24 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 A.3.3.28 Test Cases . A.3.3.29 Test Step Library . 160 A.3
36、.330 Default Library . . . 161 . 167 A.5.1 Differences in syntax . 172 A5.2 Additional static semantics in the TCN.MP. 173 A.6 List of BNF production numbers . 174 A.6.1 Introduction 174 A.6.2 The production index . 174 B(normative) Operational semantics of ITCN 181 B.l Introduction . 181 B.2 Preced
37、ence . 181 B.3 Processing of test case errors . 181 B.4 Converting a modularized test suite to an equivalent expanded test suite 181 B.5 ITCN operational semantics 183 B.5.1 Introduction . 183 B.5.2 The pseudo-code notation 183 B.5.2.1 introduction 183 B.5.2.2 Procedures and functions 183 B.5.23 Pro
38、cesses 183 B.5.2.4 Natural language within pseudo-code 184 B.5.2.5 Levels and alternatives 184 BJ.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 - natu
39、ral language . 186 B.5.5 Expanding a set of alternatives 186 B.5.5.1 Introduction . B.5.5.2 Saving Defaults . 187 vi STD-IS0 9b4b-3-ENGL 1998 4853903 07bbb33 583 9 O ISO/IEC ISO/IEC 9646-3: 1998 (E) B.5.53 Expansion of REPEAT constructs . 187 B.5.5.4 Appending default behaviour . 188 B.5.5.5 Expandi
40、ng attached trees 188 B.5.6 Evaluation of an Event Line 189 B.5.6.1 Pseudo-code 189 B.5.6.2 Natural language description . 189 B.5.7 Functions for ITCN events . 189 B.5.7.1 Functions for “TCN events . pseudo-code 189 B.5.7.2 Functions for ITCN events . natural language description 190 B.5.8 Executio
41、n of the SEND event . 190 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 B.5.9 Execution of the RECEIVE event 191 B.5.9.1 Execution of the RECEIVE event . pseudo-code . 191 B.5.9.2 Execution of the RECEIVE event . natura
42、l language description . 192 B.5.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 . 193 B.5.11.1 Execution of the TIMEOUT event . pseudo-code 193 B.5.11.2 Execution of
43、the TIMEOUT event . natural language description . 194 B.5.12 Execution of the DONE event 195 . 195 B.5.12.2 Execution of the DONE event . natural language description . 195 B.5.13 Execution of the IMPLICIT SEND event . 196 B.5.13.1 Execution of the IMPLICIT SEND event . pseudo-code 196 B.5.13.2 Exe
44、cution of IMPLICIT SEND . natural language description 196 B.5.14 Execution of a pseudo-event . 196 B.5.14.1 Execution of a pseudo-event - pseudo-code 196 B.5.14.2 Execution of PSEUDO-EVENTS . natural language description 196 . 196 B.5.15.1 Execution of BOOLEAN expressions . pseudo-code . 196 B.5.15
45、.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 TIME
46、R 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 BA18 Functions for ITCN constmcts . 198 B.5.18.1 Functions
47、for TCN constructs . pseudo-code 198 B.5.18.2 Functions for TCN constructs . natural language description 198 B.5.19Execution 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
48、 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 . 200 B.5.23
49、.1 The verdict . pseudo-code 200 B.5.23.2 The VERDICT . natural language description . 201 B.5.24 The Conformance Log . 201 B.5.24.1 The LOG . pseudo.code 201 B.5.24.2 The conformance log . natural language description 201 B.5.25 Tree handling functions and procedures 202 B.5.11 Execution of the TIMEOUT event B.5.12.1 Execution of the DONE event . pseudo-code . B.5.15 Execution of BOOLEAN expressions ISO/IEC 9646-3: 1998 (E) o ISO/IEC B.5.26 Miscellaneous functions used by the pseudo-code 203 C(normative) TCN Modules 206 C.1 Introduction . 206 C.2 TCN Modu