1、 INTERNATIONAL TELECOMMUNICATION UNION ITU-T X.292TELECOMMUNICATION STANDARDIZATION SECTOR OF ITU (05/2002) SERIES X: DATA NETWORKS AND OPEN SYSTEM COMMUNICATIONS Open Systems Interconnection Conformance testing OSI conformance testing methodology and framework for protocol Recommendations for ITU-T
2、 applications The Tree and Tabular Combined Notation (TTCN) ITU-T Recommendation X.292 ITU-T X-SERIES RECOMMENDATIONS DATA NETWORKS AND OPEN SYSTEM COMMUNICATIONS PUBLIC DATA NETWORKS Services and facilities X.1X.19 Interfaces X.20X.49 Transmission, signalling and switching X.50X.89 Network aspects
3、X.90X.149 Maintenance X.150X.179 Administrative arrangements X.180X.199 OPEN SYSTEMS INTERCONNECTION Model and notation X.200X.209 Service definitions X.210X.219 Connection-mode protocol specifications X.220X.229 Connectionless-mode protocol specifications X.230X.239 PICS proformas X.240X.259 Protoc
4、ol Identification X.260X.269 Security Protocols X.270X.279 Layer Managed Objects X.280X.289 Conformance testing X.290X.299 INTERWORKING BETWEEN NETWORKS General X.300X.349 Satellite data transmission systems X.350X.369 IP-based networks X.370X.399 MESSAGE HANDLING SYSTEMS X.400X.499 DIRECTORY X.500X
5、.599 OSI NETWORKING AND SYSTEM ASPECTS Networking X.600X.629 Efficiency X.630X.639 Quality of service X.640X.649 Naming, Addressing and Registration X.650X.679 Abstract Syntax Notation One (ASN.1) X.680X.699 OSI MANAGEMENT Systems Management framework and architecture X.700X.709 Management Communica
6、tion Service and Protocol X.710X.719 Structure of Management Information X.720X.729 Management functions and ODMA functions X.730X.799 SECURITY X.800X.849 OSI APPLICATIONS Commitment, Concurrency and Recovery X.850X.859 Transaction processing X.860X.879 Remote operations X.880X.899 OPEN DISTRIBUTED
7、PROCESSING X.900X.999 For further details, please refer to the list of ITU-T Recommendations. ITU-T Rec. X.292 (05/2002) i ITU-T RECOMMENDATION X.292 OSI conformance testing methodology and framework for protocol Recommendations for ITU-T applications The Tree and Tabular Combined Notation (TTCN) Su
8、mmary This Recommendation defines an informal test notation, called the Tree and Tabular Combined Notation (TTCN), for OSI conformance test suites, which is independent of test methods, layers and protocols, and which reflects the abstract testing methodology defined in ITU-T Recs X.290 and X.291. T
9、his edition incorporates corrections of defects received and is equivalent to ETSI TR 101 666, which is also known as TTCN2+. Source ITU-T Recommendation X.292 was prepared by ITU-T Study Group 17 (2001-2004) and approved under the WTSA Resolution 1 procedure on 14 May 2002. ii ITU-T Rec. X.292 (05/
10、2002) FOREWORD The International Telecommunication Union (ITU) is the United Nations specialized agency in the field of telecommunications. The ITU Telecommunication Standardization Sector (ITU-T) is a permanent organ of ITU. ITU-T is responsible for studying technical, operating and tariff question
11、s and issuing Recommendations on them with a view to standardizing telecommunications on a worldwide basis. The World Telecommunication Standardization Assembly (WTSA), which meets every four years, establishes the topics for study by the ITU-T study groups which, in turn, produce Recommendations on
12、 these topics. The approval of ITU-T Recommendations is covered by the procedure laid down in WTSA Resolution 1. In some areas of information technology which fall within ITU-Ts purview, the necessary standards are prepared on a collaborative basis with ISO and IEC. NOTE In this Recommendation, the
13、expression “Administration“ is used for conciseness to indicate both a telecommunication administration and a recognized operating agency. INTELLECTUAL PROPERTY RIGHTS ITU draws attention to the possibility that the practice or implementation of this Recommendation may involve the use of a claimed I
14、ntellectual Property Right. ITU takes no position concerning the evidence, validity or applicability of claimed Intellectual Property Rights, whether asserted by ITU members or others outside of the Recommendation development process. As of the date of approval of this Recommendation, ITU had not re
15、ceived notice of intellectual property, protected by patents, which may be required to implement this Recommendation. However, implementors are cautioned that this may not represent the latest information and are therefore strongly urged to consult the TSB patent database. ITU 2003 All rights reserv
16、ed. No part of this publication may be reproduced, by any means whatsoever, without the prior written permission of ITU. ITU-T Rec. X.292 (05/2002) iii CONTENTS Page 1 Scope 1 2 Normative references . 2 2.1 Identical Recommendations | International Standards 2 2.2 Paired Recommendations | Internatio
17、nal Standards equivalent in technical content 2 2.3 Additional references 3 3 Definitions 3 3.1 Basic terms from ITU-T Rec. X.290. 3 3.2 Terms from ITU-T Rec. X.200 . 5 3.3 Terms from ITU-T Rec. X.210 . 5 3.4 Terms from ITU-T Rec. X.680 . 5 3.5 Terms from ITU-T Rec. X.690 . 5 3.6 TTCN specific terms
18、. 5 4 Abbreviations. 10 4.1 Abbreviations defined in ITU-T Rec. X.290 10 4.2 Abbreviations defined in ITU-T Rec. X.291 10 4.3 Other abbreviations. 10 5 The syntax forms of TTCN 11 6 Compliance 12 7 Conventions . 12 7.1 Introduction. 12 7.2 Syntactic metanotation 12 7.3 TTCN.GR table proformas . 13 7
19、.3.1 Introduction 13 7.3.2 Single TTCN object tables 13 7.3.3 Multiple TTCN object tables 14 7.3.4 Alternative compact tables 14 7.3.5 Specification of proformas 15 7.4 Free Text and Bounded Free Text. 15 8 Concurrency in TTCN . 15 8.1 Test components . 15 8.2 Test component configurations. 16 9 TTC
20、N test suite structure . 17 9.1 Introduction. 17 9.2 Test Group References 17 9.3 Test Step Group References 17 9.4 Default Group References. 17 9.5 Parts of a TTCN test suite. 17 10 Test Suite Overview. 18 10.1 Introduction. 18 10.2 Test Suite Index 18 10.3 Test Suite Structure. 19 10.4 Test Case I
21、ndex. 20 10.5 Test Step Index . 21 10.6 Default Index 22 10.7 Test Suite Exports. 23 10.8 The Import Part. 24 10.8.1 Introduction 24 10.8.2 Imports . 24 iv ITU-T Rec. X.292 (05/2002) Page 11 Declarations part 26 11.1 Introduction. 26 11.2 TTCN types 26 11.2.1 Introduction 26 11.2.2 Predefined TTCN t
22、ypes 26 11.2.3 Test Suite Type Definitions 28 11.3 TTCN operators and TTCN operations 32 11.3.1 Introduction 32 11.3.2 TTCN operators 33 11.3.3 Predefined operations . 34 11.3.4 Test suite operation definitions and descriptions 36 11.4 Test suite parameter declarations 41 11.5 Test case selection ex
23、pression definitions 42 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 Binding of Test Case V
24、ariables 46 11.9 PCO Type Declaration 46 11.10 PCO declarations 46 11.11 CP declarations . 48 11.12 Timer declarations 49 11.13 Test components and configuration declarations 50 11.13.1 Test components . 50 11.13.2 Test component configuration declarations 52 11.14 ASP type definitions . 54 11.14.1
25、Introduction 54 11.14.2 ASP type definitions using tables . 54 11.14.3 Use of structured types within ASP type definitions 55 11.14.4 ASP type definitions using ASN.1 56 11.14.5 ASN.1 ASP type definitions by reference 56 11.15 PDU type definitions 57 11.15.1 Introduction 57 11.15.2 PDU type definiti
26、ons using tables. 57 11.15.3 Use of Structured Types within PDU definitions . 59 11.15.4 PDU type definitions using ASN.1. 60 11.15.5 ASN.1 PDU type definitions by reference 61 11.16 Test Suite Encoding Information 62 11.16.1 Encoding Definitions 62 11.16.2 Encoding variations 63 11.16.3 Invalid fie
27、ld encoding definitions . 65 11.16.4 Application of encoding rules. 65 11.17 CM type definitions 66 11.17.1 Introduction 66 11.17.2 CM type definitions using tables 67 11.17.3 CM type definitions using ASN.1. 67 11.18 String length specifications. 68 11.19 ASP, PDU and CM definitions for SEND events
28、. 69 11.20 ASP, PDU and CM definitions for RECEIVE events. 69 11.21 Alias definitions 70 11.21.1 Introduction 70 11.21.2 Expansion of aliases . 70 ITU-T Rec. X.292 (05/2002) v Page 12 Constraints part 71 12.1 Introduction. 71 12.2 General principles. 71 12.3 Parameterization of constraints. 72 12.4
29、Chaining of constraints . 72 12.5 Constraints for SEND events 72 12.6 Constraints for RECEIVE events 72 12.6.1 Matching values 72 12.6.2 Matching mechanisms 73 12.6.3 Specific value 74 12.6.4 Instead of Value 74 12.6.5 Inside Values 76 12.6.6 Attributes of values. 77 13 Specification of constraints
30、using tables 78 13.1 Introduction. 78 13.2 Structured type constraint Declarations 78 13.3 ASP constraint declarations 79 13.4 PDU Constraint Declarations 80 13.5 Parameterization of constraints. 81 13.6 Base constraints and modified constraints 82 13.7 Formal parameter lists in modified constraints
31、. 82 13.8 CM constraint declarations . 82 14 Specification of constraints using ASN.1. 83 14.1 Introduction. 83 14.2 ASN.1 type constraint declarations. 83 14.3 ASN.1 ASP constraint declarations 84 14.4 ASN.1 PDU constraint declarations 85 14.5 Parameterized ASN.1 constraints . 85 14.6 Modified ASN.
32、1 constraints . 86 14.7 Formal parameter lists in modified ASN.1 constraints. 86 14.8 ASP Parameter and PDU field names within ASN.1 constraints 86 14.9 ASN.1 CM constraint declarations . 87 15 The dynamic part . 87 15.1 Introduction. 87 15.2 Test Case dynamic behaviour . 87 15.2.1 Specification of
33、the Test Case Dynamic Behaviour table. 87 15.2.2 The Test Case Dynamic Behaviour proforma. 88 15.2.3 Structure of the Test Case behaviour 89 15.2.4 Concurrent Test Case Behaviour description 89 15.2.5 Line numbering and continuation . 89 15.3 Test Step dynamic behaviour 90 15.3.1 Specification of th
34、e Test Step Dynamic Behaviour table . 90 15.3.2 The Test Step Dynamic Behaviour proforma . 91 15.4 Default dynamic behaviour. 91 15.4.1 Default behaviour . 91 15.4.2 Specification of the Default Dynamic Behaviour table 91 15.4.3 The Default Dynamic Behaviour proforma 92 15.5 The behaviour descriptio
35、n. 92 15.6 The tree notation . 92 15.7 Tree names and parameter lists. 93 15.7.1 Introduction 93 15.7.2 Trees with parameters. 93 15.8 TTCN statements 94 vi ITU-T Rec. X.292 (05/2002) Page 15.9 TTCN test events 94 15.9.1 Sending and receiving events . 94 15.9.2 Receiving events. 94 15.9.3 Sending ev
36、ents 95 15.9.4 Lifetime of events. 95 15.9.5 Execution of the behaviour tree 95 15.9.6 The IMPLICIT SEND event. 97 15.9.7 The OTHERWISE event 98 15.9.8 OTHERWISE and concurrent TTCN . 99 15.9.9 The TIMEOUT event 99 15.9.10 Concurrent TTCN events and constructs 100 15.10 TTCN expressions 100 15.10.1
37、Introduction 100 15.10.2 References for ASN.1 defined data objects 101 15.10.3 References for data objects defined using tables 103 15.10.4 Assignments 103 15.10.5 Qualifiers . 104 15.10.6 Event lines with assignments and qualifiers . 104 15.11 Pseudo-events . 105 15.12 Timer management . 105 15.12.
38、1 Introduction 105 15.12.2 The START operation 105 15.12.3 The CANCEL operation . 106 15.12.4 The READTIMER operation 106 15.13 The ATTACH construct . 107 15.13.1 Introduction 107 15.13.2 Scope of tree attachment. 107 15.13.3 Tree attachment basics 107 15.13.4 The meaning of tree attachment 108 15.1
39、3.5 Passing parameterized constraints 109 15.13.6 Recursive tree attachment. 110 15.13.7 Tree attachment and Defaults . 110 15.14 Labels and the GOTO construct 110 15.15 The REPEAT construct 111 15.16 The Constraints Reference 112 15.16.1 Purpose of the Constraints Reference column 112 15.16.2 Passi
40、ng parameters in Constraint References . 112 15.16.3 Constraints and qualifiers and assignments 113 15.17 Verdicts 113 15.17.1 Introduction 113 15.17.2 Preliminary results 113 15.17.3 Final verdict 114 15.17.4 Verdicts and OTHERWISE 114 15.17.5 Verdict assignment in concurrent TTCN 115 15.18 The mea
41、ning of Defaults. 115 15.18.1 Introduction 115 15.18.2 Default References 116 15.18.3 The RETURN statement. 117 15.18.4 The ACTIVATE statement. 117 15.18.5 Defaults and tree attachment. 117 15.18.6 Tree Attachment, Defaults, Activate and Return 118 15.18.7 Defaults and CREATE 123 15.18.8 Defaults an
42、d CMs . 123 16 Page continuation. 125 16.1 Page continuation of TTCN tables 125 16.2 Page continuation of dynamic behaviour tables 125 ITU-T Rec. X.292 (05/2002) vii Page Annex A Syntax and static semantics of TTCN 126 A.1 Introduction. 126 A.2 Conventions for the syntax description. 126 A.2.1 Synta
43、ctic metanotation 126 A.2.2 TTCN.MP syntax definitions 126 A.3 The TTCN.MP syntax productions in BNF 127 A.3.1 TTCN Specification 127 A.3.2 TTCN Module 127 A.3.3 Test suite. 128 A.4 General static semantics requirements 151 A.4.1 Introduction 151 A.4.2 Uniqueness of identifiers 151 A.5 Differences b
44、etween TTCN.GR and TTCN.MP. 155 A.5.1 Differences in syntax 155 A.5.2 Additional static semantics in the TTCN.MP . 156 A.6 List of BNF production number 156 Annex B Operational semantics of TTCN 157 B.1 Introduction. 157 B.2 Precedence 157 B.3 Processing of test case errors 157 B.4 Converting a modu
45、larized test suite to an equivalent expanded test suite 157 B.5 TTCN operational semantics 158 B.5.1 Introduction 158 B.5.2 The pseudo-code notation. 158 B.5.3 Execution of a Test Suite 159 B.5.4 Execution of a Test Case 160 B.5.5 Expanding a set of alternatives . 161 B.5.6 Evaluation of an Event Li
46、ne . 163 B.5.7 Functions for TTCN events 164 B.5.8 Execution of the SEND event. 164 B.5.9 Execution of the RECEIVE event . 165 B.5.10 Execution of the OTHERWISE event 166 B.5.11 Execution of the TIMEOUT event . 167 B.5.12 Execution of the DONE event 168 B.5.13 Execution of the IMPLICIT SEND event. 1
47、69 B.5.14 Execution of a pseudo-event. 169 B.5.15 Execution of BOOLEAN expressions 170 B.5.16 Execution of assignments . 170 B.5.17 Execution of TIMER operations. 170 B.5.18 Functions for TTCN constructs 171 B.5.19 Execution of the ACTIVATE construct 172 B.5.20 Execution of the CREATE construct 172
48、B.5.21 Execution of the GOTO construct 173 B.5.22 Execution of the RETURN construct . 173 B.5.23 The verdict 173 B.5.24 The Conformance Log 174 B.5.25 Tree handling functions and procedures . 174 B.5.26 Miscellaneous functions used by the pseudo-code . 176 Annex C TTCN modules 178 C.1 Introduction.
49、178 C.2 TTCN Module Overview Part 178 C.2.1 Introduction 178 C.2.2 TTCN Module Exports . 178 C.2.3 TTCN Module Structure. 180 C.2.4 Test Case Index. 180 C.2.5 Test Step Index . 180 C.2.6 Default Index 180 viii ITU-T Rec. X.292 (05/2002) Page C.3 Import Part 180 C.3.1 Introduction 180 C.3.2 External. 180 C.3.3 Import . 181 Annex D Test Suite Index 182 Annex E Compact proformas . 183 E.1 Introduction. 183 E.2 Compact proformas for constraints. 183 E.2.1 Requ