ETSI TR 102 026-2002 Telecommunications and Internet Protocol Harmonization Over Networks (TIPHON) Study of the Use of TTCN-3 for SIP and for OSP Test Specifications (V1 1 1)《网络上电信.pdf

上传人:周芸 文档编号:735628 上传时间:2019-01-12 格式:PDF 页数:39 大小:1.87MB
下载 相关 举报
ETSI TR 102 026-2002 Telecommunications and Internet Protocol Harmonization Over Networks (TIPHON) Study of the Use of TTCN-3 for SIP and for OSP Test Specifications (V1 1 1)《网络上电信.pdf_第1页
第1页 / 共39页
ETSI TR 102 026-2002 Telecommunications and Internet Protocol Harmonization Over Networks (TIPHON) Study of the Use of TTCN-3 for SIP and for OSP Test Specifications (V1 1 1)《网络上电信.pdf_第2页
第2页 / 共39页
ETSI TR 102 026-2002 Telecommunications and Internet Protocol Harmonization Over Networks (TIPHON) Study of the Use of TTCN-3 for SIP and for OSP Test Specifications (V1 1 1)《网络上电信.pdf_第3页
第3页 / 共39页
ETSI TR 102 026-2002 Telecommunications and Internet Protocol Harmonization Over Networks (TIPHON) Study of the Use of TTCN-3 for SIP and for OSP Test Specifications (V1 1 1)《网络上电信.pdf_第4页
第4页 / 共39页
ETSI TR 102 026-2002 Telecommunications and Internet Protocol Harmonization Over Networks (TIPHON) Study of the Use of TTCN-3 for SIP and for OSP Test Specifications (V1 1 1)《网络上电信.pdf_第5页
第5页 / 共39页
点击查看更多>>
资源描述

1、ETSI TR I02 026 1.1.1 (2002-01) Technical Repor Telecommunications and Internet Protocol Harmonization Over Networks (TIPHON); Study of the use of TTCN-3 for SIP and for OSP test specifications 2 ETSI TR 102 026 VI .I .I (2002-01) Reference DTR/TIPHON-06019 Keywords VolP, interoperability, IP, testi

2、ng, TTCN ETSI 650 Route des Lucioles F-O6921 Sophia Antipolis Cedex - FRANCE Tel.: +33 4 92 94 42 O0 Fax: +33 4 93 65 47 16 Siret No 348 623 562 00017 - NAF 742 C Association but non lucratif enregistre la Sous-prfecture de Grasse (06) No 7803/88 Important notice Individual copies of the present doc

3、ument can be downloaded from: http:l/w.etsi .orq The present document may be made available in more than one electronic version or in print. In any case of existing or perceived difference in contents between such versions, the reference version is the Portable Document Format (PDF). In case of disp

4、ute, the reference shall be the printing on ETSI printers of the 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 E

5、TSI documents is available at 3 If you find errors in the present document, send your comment to: Cori vriaht Notifica tion No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media. O European Telecommunicat

6、ions Standards Institute 2002. All rights reserved. ETSI 3 ETSI TR 102 026 VI . 1 . 1 (2002-01) Contents Intellectual Property Rights 5 Foreword . 5 1 Scope 6 2 References 6 3 Abbreviations . 6 Suitability of TTCN-3 for SIP testing 8 5.1 Architectural considerations for testing SIP 8 9 5.3 Expressin

7、g SIP messages in TTCN-3 10 . 12 . 12 5.3.1.2 Wildcards . 13 5.3.1.3 Using modified templates . . 13 5.3.2 TTCN-3 regular expressions . . 14 5.3.2.1 Simple patterns . 14 5.3.2.2 More complex patterns . 14 5.3.2.2.1 Set expression . 15 5.3.2.2.2 Reference expression . . 15 5.3.2.2.3 Match expression

8、n times . 15 5.3.2.3 Using regular expressions with SIP . 15 6.1 Architectural considerations for testing OSP 16 6.1.1 Normal OSP message exchange 16 . 17 6.2 Expressing OSP behaviour in TTCN-3 . 17 18 6.3.1 AuthonzationRequest 18 XML declaration 18 . 18 . 19 . 20 6.3.3 Wildcards . 20 7 8 9 4 Backgr

9、ound 7 5 5.2 5.3.1 5.3.1.1 Expressing SIP dynamic behaviour in TTCN-3 6 Suitability of TTCN-3 for OSP testing . 16 6.1.2 Token carria 6.3 6.3.1.1 6.3.1.2 6.3.1.3 6.3.2 Expressing OSP messages in TTCN-3 Practical experience of using TTCN-3 . 21 Availability of tools 21 Maintenance of the TTCN-3 stand

10、ard 21 10 Training 22 Annex A: A . 1 Introduction 23 A.2 The rule and its two corollaries 23 A.3 Some guidelines . 24 A.3.1 Module organization . 24 A.3.2 Comments . . A.3.3 Type definitions . A.3.3.1 Basic types . A.3.3.2 Structured types . A.3.3.2.1 Enumerations . Suggested style guidelines . 23 2

11、7 28 28 29 29 ETSI 4 ETSI TR 102 026 VI .I .I (2002-01) A.3.3.2.2 A.3.3.2.3 A.3.4 A.3.5 A.3.6 A.3.6.1 A.3.6.2 A.3.7 A.3.8 A.3.9 A.3.10 A.3.11 A.3.12 A.3.13 Records et al 29 Variable definitions. 29 Function definitions. . . .30 Whitespace 31 Statements 31 Simple statements . 31 Compound statements.

12、31 Naming conventions . 32 Beautifiers and formatters Presentation fonts and sheet orientation Alternates, named or not PICS and PIXIT parameters . 33 33 34 35 . 35 .37 Annex B: Bibliography 38 History 39 ETSI 5 ETSI TR 102 026 VI .I .I (2002-01) Intellectual Property Rights IPRs essential or potent

13、ially essential to the present document may have been declared to ETSI. The information pertaining to these essential IPRs, if any, is publicly available for ETSI members and non-members, and can be found in ETSI SR O00 314: “Intellectual Property Rights (7PRs); Essential, orpotentially Essential, I

14、PRs notlJied to ETSI in respect ofETSI standards“, which is available from the ETSI Secretariat. Latest updates are available on the ETSI Web server (5). Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been carried out by ETSI. No guarantee can be given as to the exist

15、ence of other IPRs not referenced in ETSI SR O00 3 14 (or the updates on the ETSI Web server) which are, or may be, or may become, essential to the present document. Foreword This Technical Report (TR) has been produced by ETSI Project Telecommunications and Internet Protocol Harmonization Over Netw

16、orks (TIPHON). ETSI 6 ETSI TR 102 026 VI .I .I (2002-01) 1 Scope The present document provides an analysis on the suitability of using TTCN-3 as defined in ES 210 873-1 i to spec the test specifications for TIPHON protocols, in particular the TIPHON profile of SIP (Session Initiation Protocol) and t

17、he TIPHON OSP (Open Settlement Protocol). This study is restricted to the use of the TTCN-3 Core Language. 2 Re fe re nces For the purposes of this Technical Report (TR) the following references apply: il ETSI ES 201 873-1: “Methods for Testing and Specification (MTS); The Tree and Tabular Combined

18、Notation version 3; Part 1: TTCN-3 Core Language“. ISO/IEC 9646-3 : “Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 3: The Tree and Tabular Combined Notation (TTCN) Edition 2“. 21 31 ETSI TS 101 321: “Telecommunications and Internet Proto

19、col Harmonization Over Networks (TIPHON); Open Settlement Protocol (OSP) for Inter-Domain pricing, authorization, and usage exchange“. ITU-T Recommendation Z. 140: “The tree and tabular combined notation version 3 (TTCN-3): Core language“. 41 3 Abbreviations For the purposes of the present document,

20、 the following abbreviations apply: ASN. 1 ATS DTD IUT MTC OSP (P)IXIT PDU SIP SUT TCP (P)ICS TTCN-2 TTCN-3 UDP XML PCO DE Abstract Syntax Notation One Abstract Test Suite Document Type Definition Implementation Under Test Master Test Component Open Settlement Protocol (Protocol) Implementation Conf

21、ormance Statement (Protocol) Implementation extra Information for Testing Protocol Data Unit Session Initiation Protocol System Under Test Transfert Control Protocol Tree and Tabular Combined Notation version 2 Testing and Test Control Notation version 3 User Datagram Protocol extensible Markup Lang

22、uage Point of Control and Observation Development Environment ETSI 7 ETSI TR 102 026 VI .I .I (2002-01) 4 Background The detailed code for nearly all ETSI (conformance) Abstract Test Suites (ATS) is written in TTCN. There are two versions of TTCN, version 2 (TTCN-2) as defined in ISO/IEC-9646-3 2 an

23、d the recently published ETSI version 3 ES 201 873-1 i. NOTE: Version 1 of TTCN is not now used by ETSI. Version 2 is oriented towards conformance testing and has been widely applied in testing telecommunications protocols and services for over 10 years. TTCN-3 is a modernization of TTCN-2. It has b

24、een developed to apply to a wide range of testing applications (i.e. it is not limited to conformance testing) and the syntax of the language has been brought into line with that of other modern programming languages. While it is not anticipated that TTCN-2 will immediately replace TTCN-3 (from ETSI

25、s point of view the transition to TTCN-3 is expected to occur over several years) there are good reasons to consider using TTCN-3 for “new“ protocols such as SIP or OSP. EP TIPHON is writing test specifications for H.225, H.245, H.248, SIP and OSP. The tests for the first three protocols are being w

26、ritten in TTCN-2. This is mainly due to timing (the work was started several months prior to the publication of TTCN-3) and the fact that they are “traditional“ protocols (for example H.225 is very close to Q.93 1). It is also more likely that, in the short-term, the actual test systems for these pr

27、otocols will be based on TTCN-2. However, the nature of SIP and OSP (e.g., text-based, datacom-oriented) makes them an ideal candidate for TTCN-3. The present document makes an initial analysis on the suitability of using TTCN-3 to for SIP and OSP test specifications. ETSI 8 ETSI TR 102 026 VI .I .I

28、 (2002-01) 5 Suitability of TTCN-3 for SIP testing In order to understand the suitability of TTCN-3 for testing SIP it is necessary to consider three main aspects: the basic testing architecture, i.e. the location of the test interfaces; the expression of dynamic behaviour (i.e. SIP message exchange

29、s); the representation of data (i.e. SIP messages). These aspects are described in clauses 5.1, 5.2 and 5.3 respectively. 5.1 Architectural considerations for testing SIP Two conceptual SIP test systems are illustrated in figure 1. The TTCN-3 parts of the test system are represented by the white box

30、es, which in the present document we refer to as the “TTCN-3 Tester“. The light grey box represents sub-structured parts of the test system. The dark grey boxes indicate the underlying transport layer, either UDP or TCP. Option 1 Option 2 SIP messages in TTCN -3 I I High level (intelligent) processi

31、ng of the SIP , Figure 1: Basic test system architecture TTCN-3 behaviour is executed over test ports, sometimes called PCOs (Points of Control and Observation). For SIP testing there are basically two options for the placement of the PCO. directly over UDP (or TCP); higher than UDP (or TCP), i.e. “

32、embedded“ in the test system. In the first option of figure 1 all processing of the SIP messages is expressed in TTCN-3. For received messages this means that the PCO delivers a SIP message to the TTCN-3 tester as a single text string. The TTCN-3 code must then (somehow) parse this text string and b

33、reak it down into data structures on which the TTCN-3 matching mechanisms etc. can operate. For send messages the reverse occurs i.e. TTCN-3 data structures representing the SIP message are encoded as a single text string. It is certainly possible to use TTCN-3 this way but this would probably be in

34、efficient. It would also overload the TTCN-3 test cases (not to mention the test suite writers) with detail not explicitly relevant to the test purposes. In the second option, the test system receives a SIP message over the UDP (or TCP) port and does the initial parsing before passing the structure

35、to the TTCN-3 Tester via the PCO. In its simplest form this parser need only recognize the basic “outline“ of the message with no detailed knowledge of individual headers. This structure would be mapped to the corresponding TTCN-3 template on a best possible fit basis. The TTCN-3 Tester then operate

36、s directly on this data structure rather than the incoming text string (by pattern matching). ETSI 9 ETSI TR 102 026 VI .I .I (2002-01) If the tester is to deliver more complex TTCN-3 structures then the underlying parser will need to be correspondingly complex. As this will effect how a TTCN-3 test

37、 case is expressed (i.e. place restrictions on how TTCN-3 is used) it is important that this functionality is defined by EP TIPHON at an early stage. In conventional protocol testing (especially when using, say, ASN. 1) this sub-layer (shaded light grey in figure 1) is often referred to as an encode

38、r-decoder. Here, the incoming data is a bit stream which is decoded by the test system and passed to the TTCN-3 tester in structured form. Discussions with several tool implementers indicate that option 2 should be the favoured approach. The present document therefore recommends that EP TIPHON follo

39、w option 2 when writing TTCN-3 test cases for SIP. 5.2 Expressing SIP dynamic behaviour in TTCN-3 SIP has very simple dynamic behaviour. The TTCN-3 communication and timer mechanisms etc. are entirely adequate to specifi the exchange of SIP messages. The present document recommends that TIPHON SIP t

40、ests are expressed using asynchronous communication. NOTE: Generally, SIP testing would be based on asynchronous message exchanges, however TTCN-3 does have synchronous communication if it is desired to express the test that way. A typical piece of SIP behaviour could be: / / / / / / / / / testcase

41、SIP-RG-RT-V-OOlO runs on Sipcomponent system SipInterfaces Selection: To be defined Status: Mandatory SUT: A UA, a proxy, or a redirect server. Precondition: None Ref: 2.2 il, 7.1 il, 10.14 il Purpose: Ensure that the IUT, in order to be registered, sends a REGISTER request t to its proxy (Home serv

42、er, outbound proxy) with the action field set to “proxy“ in the Contact header field, without user name in the Request-URI, with a Via header field and with a SIP URL as request-URI. var REG-Request V-REGISTER-Request; var ContactAddress-List V-ContactList; var Genericparam-List V-GenericParamList;

43、var integer i,j, nbelement, nbparam; var boolean hasBeenFound:=false; sut .action (“Please REGISTER“) ; TWait .start (PX-TWAIT) ; alt I SIPl.receive (REGISTER-Request-r-2) from rcv-label - value V-REGISTER-Request TWait.stop; / Catch and prepare informations to answer iutcontact := getContactAddr(V-

44、REGISTER-Request.reqHeader.contact.contactBody.contactAddress-Listll); V-CallId := V-REGISTER-Request.reqHeader.call1d; V-CSeq := V-REGISTER-Request.reqHeader.cSeq; V-From := V-REGISTER-Request.reqHeader.fromFie1d; V-To := V-REGISTER-Request.reqHeader.toFie1d; V-Via := V-REGISTER-Request.reqHeader.v

45、ia; / update sent-label according to received via header field getViaReplyAddr(VVia.viaBody) ; /Add a Tag in the TO field V-To.toParams := TAG-ID, GetAValueTagO; / Check Contact content V-ContactList := V-REG1STER-Request.reqHeader.contact.contactBody.contactAddress-List; nbelement := sizeof(V-Conta

46、ctList); for (i:=l;i=nbelement;i:=i+l) hasBeenFound:=false; / Check that parameters are present in the contact if (match (V-ContactList il , ContactAdress-r-1) ) V-GenericParamList := V-ContactListi .contactparams; nbparam := sizeof(V-GenericParamList); j :=l; /Check that at least one parameter is s

47、et to action=“proxy“ ETSI 10 ETSI TR 102 026 VI .I .I (2002-01) do if (match(V-GenericParamListjl,GenericParam-r-1) hasBeenFound:=true; I / Check that contact does not include a parameter set to action=”redirect” if (match(V-GenericParamListjl,GenericParam-r-2) hasBeenFound:=false; j := nbparam; I j

48、 :=j+l; I while (jc=nbparam) /end loop on contact parameters I if (not hasBeenFound) verdict .set (fail) ; /Answer with a 409 status message SIPl.send (Response-409-s-l(V-CallId, V-CSeq, V-From, V-To, V-Via ) to sent-label; stop I /end For on Contact list verdict. set (pass) ; /Send a 2000K Answer t

49、o the UA with an Expire header field set /to PX-DELTA-REGISTRATION and the contact list SIPl.send (Response-200-s-2 (V-CallId, V-CSeq, V-From, V-To, V-Via, V-REGISTER-Request.reqHeader.contact, PX-DELTA-REGISTRATION ) to sent-label I I SIPl.trigger from rcv-label all timer.stop; verdict.set (fail) ; stop I I Twait.timeout verdict.set(inconc); stop) I / end testcase SIP-RG-RT-V-001 5.3 Expressing SIP messages in TTCN-3 Currently many SIP test suites spec one single text string for each instance of

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 标准规范 > 国际标准 > 其他

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1