ETSI ES 201 873-3-2007 Methods for Testing and Specification (MTS) The Testing and Test Control Notation version 3 Part 3 TTCN-3 Graphical presentation Format (GFT) (V3 2 1)《测试方法和规.pdf

上传人:刘芸 文档编号:730780 上传时间:2019-01-08 格式:PDF 页数:123 大小:975.70KB
下载 相关 举报
ETSI ES 201 873-3-2007 Methods for Testing and Specification (MTS) The Testing and Test Control Notation version 3 Part 3 TTCN-3 Graphical presentation Format (GFT) (V3 2 1)《测试方法和规.pdf_第1页
第1页 / 共123页
ETSI ES 201 873-3-2007 Methods for Testing and Specification (MTS) The Testing and Test Control Notation version 3 Part 3 TTCN-3 Graphical presentation Format (GFT) (V3 2 1)《测试方法和规.pdf_第2页
第2页 / 共123页
ETSI ES 201 873-3-2007 Methods for Testing and Specification (MTS) The Testing and Test Control Notation version 3 Part 3 TTCN-3 Graphical presentation Format (GFT) (V3 2 1)《测试方法和规.pdf_第3页
第3页 / 共123页
ETSI ES 201 873-3-2007 Methods for Testing and Specification (MTS) The Testing and Test Control Notation version 3 Part 3 TTCN-3 Graphical presentation Format (GFT) (V3 2 1)《测试方法和规.pdf_第4页
第4页 / 共123页
ETSI ES 201 873-3-2007 Methods for Testing and Specification (MTS) The Testing and Test Control Notation version 3 Part 3 TTCN-3 Graphical presentation Format (GFT) (V3 2 1)《测试方法和规.pdf_第5页
第5页 / 共123页
点击查看更多>>
资源描述

1、 ETSI ES 201 873-3 V3.2.1 (2007-02)ETSI Standard Methods for Testing and Specification (MTS);The Testing and Test Control Notation version 3;Part 3: TTCN-3 Graphical presentation Format (GFT)ETSI ETSI ES 201 873-3 V3.2.1 (2007-02) 2 Reference RES/MTS-00090-32 ttcn3 gft Keywords GFT, methodology, MSC

2、, MTS, testing, TTCN 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 enregistre la Sous-Prfecture de Grasse (06) N 7803/88 Important notice Individual copies of the p

3、resent document can be downloaded from: http:/www.etsi.org 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 ca

4、se of dispute, 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 a

5、nd other ETSI documents is available at http:/portal.etsi.org/tb/status/status.asp If you find errors in the present document, please send your comment to one of the following services: http:/portal.etsi.org/chaircor/ETSI_support.asp Copyright Notification No part may be reproduced except as authori

6、zed by written permission. The copyright and the foregoing restriction extend to reproduction in all media. European Telecommunications Standards Institute 2007. All rights reserved. DECTTM, PLUGTESTSTM and UMTSTM are Trade Marks of ETSI registered for the benefit of its Members. TIPHONTMand the TIP

7、HON logo are Trade Marks currently being registered by ETSI for the benefit of its Members. 3GPPTM is a Trade Mark of ETSI registered for the benefit of its Members and of the 3GPP Organizational Partners. ETSI ETSI ES 201 873-3 V3.2.1 (2007-02) 3 Contents Intellectual Property Rights6 Foreword.6 In

8、troduction 6 1 Scope 8 2 References 8 3 Abbreviations .8 4 Overview 9 5 GFT language concepts10 6 Mapping between GFT and TTCN-3 Core language.12 7 Module structure 12 8 GFT symbols14 9 GFT diagrams.17 9.1 Common properties 17 9.1.1 Diagram area.17 9.1.2 Diagram heading.17 9.1.3 Paging .17 9.2 Contr

9、ol diagram18 9.3 Test case diagram.18 9.4 Function diagram19 9.5 Altstep diagram 20 10 Instances in GFT diagrams.21 10.1 Control instance21 10.2 Test component instances.21 10.3 Port instances22 11 Elements of GFT diagrams.22 11.1 General drawing rules 22 11.1.1 Usage of semicolons .22 11.1.2 Usage

10、of action symbols .23 11.1.3 Comments.23 11.2 Invoking GFT diagrams .24 11.2.1 Execution of test cases24 11.2.2 Invocation of functions .24 11.2.3 Invocation of altsteps 25 11.3 Declarations25 11.3.1 Declaration of timers, constants and variables in action symbols.26 11.3.2 Declaration of constants

11、and variables within inline expression symbols 26 11.3.3 Declaration of constants and variables within create symbols26 11.3.4 Declaration of constants and variables within default symbols 26 11.3.5 Declaration of constants and variables within reference symbols 27 11.3.6 Declaration of constants an

12、d variables within execute test case symbols.27 11.4 Basic program statements.27 11.4.1 The Log statement 28 11.4.2 The Label statement28 11.4.3 The Goto statement.28 11.4.4 The If-else statement.29 11.4.5 The For statement .29 11.4.6 The While statement .30 11.4.7 The Do-while statement30 11.5 Beha

13、vioural Program Statements .30 ETSI ETSI ES 201 873-3 V3.2.1 (2007-02) 4 11.5.1 Sequential Behaviour30 11.5.2 Alternative Behaviour.31 11.5.2.1 Selecting/Deselecting an Alternative 32 11.5.2.2 Else branch in alternatives 33 11.5.3 The Repeat statement33 11.5.4 Interleaved Behaviour.34 11.5.5 The Ret

14、urn statement 34 11.6 Default handling.35 11.6.1 Default references.35 11.6.2 The activate operation.35 11.6.3 The deactivate operation.35 11.7 Configuration operations35 11.7.1 The Create operation.36 11.7.2 The Connect and Map operations .36 11.7.3 The Disconnect and Unmap operations 36 11.7.4 The

15、 Start test component operation 36 11.7.5 The Stop execution and Stop test component operations37 11.7.6 The Done operation 38 11.8 Communication operations.38 11.8.1 General format of the sending operations.38 11.8.2 General format of the receiving operations.39 11.8.3 Message-based communication 4

16、0 11.8.3.1 The Send operation .40 11.8.3.2 The Receive operation.41 11.8.3.2.1 Receive any message.42 11.8.3.2.2 Receive on any port.42 11.8.3.3 The Trigger operation .42 11.8.3.3.1 Trigger on any message.43 11.8.3.3.2 Trigger on any port43 11.8.4 Procedure-based communication43 11.8.4.1 The Call op

17、eration.43 11.8.4.1.1 Calling blocking procedures43 11.8.4.1.2 Calling non-blocking procedures.45 11.8.4.2 The Getcall operation45 11.8.4.2.1 Accepting any call .46 11.8.4.2.2 Getcall on any port 46 11.8.4.3 The Reply operation47 11.8.4.4 The Getreply operation .47 11.8.4.4.1 Get any reply from any

18、call .49 11.8.4.4.2 Get a reply on any port 49 11.8.4.5 The Raise operation.50 11.8.4.6 The Catch operation 50 11.8.4.6.1 The Timeout exception51 11.8.4.6.2 Catch any exception 52 11.8.4.6.3 Catch on any port.53 11.8.5 The Check operation.53 11.8.5.1 The Check any operation 54 11.8.5.2 Check on any

19、port .54 11.8.6 Controlling communication ports .55 11.8.6.1 The Clear port operation .55 11.8.6.2 The Start port operation 55 11.8.6.3 The Stop port operation.56 11.8.6.4 Use of any and all with ports.56 11.9 Timer operations 56 11.9.1 The Start timer operation 56 11.9.2 The Stop timer operation 57

20、 11.9.3 The Timeout operation57 11.9.4 The Read timer operation .58 11.9.5 Use of any and all with timers 58 11.10 Test verdict operations .58 11.11 External actions 59 11.12 Specifying attributes.59 ETSI ETSI ES 201 873-3 V3.2.1 (2007-02) 5 Annex A (normative): GFT BNF 60 A.1 Meta-Language for GFT

21、60 A.2 Conventions for the syntax description 60 A.3 The GFT grammar61 A.3.1 Diagrams 61 A.3.1.1 Control diagram61 A.3.1.2 Testcase diagram 61 A.3.1.3 Function diagram62 A.3.1.4 Altstep diagram.63 A.3.1.5 Comments.63 A.3.1.6 Diagram 63 A.3.2 Instances.64 A.3.2.1 Component instances 64 A.3.2.2 Port i

22、nstances 64 A.3.2.3 Control instances 64 A.3.2.4 Instance end 65 A.3.3 Timer 65 A.3.4 Action.67 A.3.5 Invocation.67 A.3.5.1 Function and altstep invocation on component/Control instances68 A.3.5.2 Function and altstep invocation on ports 68 A.3.5.3 Testcase execution 68 A.3.6 Activation/Deactivation

23、 of defaults69 A.3.7 Test components.69 A.3.7.1 Creation of test components69 A.3.7.2 Starting test components.69 A.3.7.3 Stopping test components .70 A.3.8 Inline expressions.70 A.3.8.1 Inline expressions on component instances 72 A.3.8.2 Inline expressions on ports .74 A.3.8.3 Inline expressions o

24、n control instances.75 A.3.9 Condition76 A.3.9.1 Condition on component instances .77 A.3.9.2 Condition on ports 78 A.3.10 Message-based communication78 A.3.10.1 Message-based communication on component instances .78 A.3.10.2 Message-based communication on port instances 79 A.3.11 Signature-based co

25、mmunication 79 A.3.11.1 Signature-based communication on component instances81 A.3.11.2 Signature-based communication on ports.82 A.3.12 Trigger and check.82 A.3.12.1 Trigger and check on component instances 82 A.3.12.2 Trigger and check on port instances .83 A.3.13 Handling of communication from an

26、y port 83 A.3.14 Labelling.84 Annex B (informative): Reference Guide for GFT85 Annex C (informative): Examples.108 C.1 The Restaurant example .108 C.2 The INRES example.117 History 123 ETSI ETSI ES 201 873-3 V3.2.1 (2007-02) 6 Intellectual Property Rights IPRs essential or potentially essential to t

27、he 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 000 314: “Intellectual Property Rights (IPRs); Essential, or potentially Essential, IPRs notified to ETS

28、I in respect of ETSI standards“, which is available from the ETSI Secretariat. Latest updates are available on the ETSI Web server (http:/webapp.etsi.org/IPR/home.asp). Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been carried out by ETSI. No guarantee can be given

29、as to the existence of other IPRs not referenced in ETSI SR 000 314 (or the updates on the ETSI Web server) which are, or may be, or may become, essential to the present document. Foreword This ETSI Standard (ES) has been produced by ETSI Technical Committee Methods for Testing and Specification (MT

30、S). The present document is part 3 of a multi-part deliverable. Full details of the entire series can be found in part 1 1. Introduction The graphical presentation format of TTCN-3 (GFT) is based on the ITU-T Recommendation Z.120 3 defining Message Sequence Charts (MSC). GFT uses a subset of MSC wit

31、h test specific extensions. The majority of extensions are textual extensions only. Graphical extensions are defined to ease the readability of GFT diagrams. Where possible, GFT is defined like MSC, so that established MSC tools with slight modifications can be used for the graphical definition of T

32、TCN-3 test cases in terms of GFT. The core language of TTCN-3 is defined in ES 201 873-1 1 and provides a full text-based syntax, static semantics and operational semantics as well as a definition for the use of the language with ASN.1. The GFT presentation format provides an alternative way of disp

33、laying the core language (see figure 1). TTCN-3 Core Language Presentation formatnTTCN-3 User ASN.1 Types the guidelines for the use of GFT; the grammar of GFT; the mapping from and to the TTCN-3 core language. Together, these characteristics form GFT-the graphical presentation format of TTCN-3. ETS

34、I ETSI ES 201 873-3 V3.2.1 (2007-02) 8 1 Scope The present document defines the graphical presentation format for the TTCN-3 core language as defined in ES 201 873-1 1. This presentation format uses a subset of Message Sequence Charts as defined in ITU-T Recommendation Z.120 3 with test specific ext

35、ensions. The present document is based on the core TTCN-3 language defined in ES 201 873-1 1. It is particularly suited to display tests as GFTs. It is not limited to any particular kind of test specification. The specification of other formats is outside the scope of the present document. 2 Referen

36、ces The following documents contain provisions which, through reference in this text, constitute provisions of the present document. References are either specific (identified by date of publication and/or edition number or version number) or non-specific. For a specific reference, subsequent revisi

37、ons do not apply. For a non-specific reference, the latest version applies. Referenced documents which are not found to be publicly available in the expected location might be found at http:/docbox.etsi.org/Reference. NOTE: While any hyperlinks included in this clause were valid at the time of publi

38、cation ETSI cannot guarantee their long term validity. 1 ETSI ES 201 873-1: “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 1: TTCN-3 Core Language“. 2 ETSI ES 201 873-2: “Methods for Testing and Specification (MTS); The Testing and Test Control No

39、tation version 3; Part 2: TTCN-3 Tabular presentation Format (TFT)“. 3 ITU-T Recommendation Z.120 (2004): “Message sequence chart (MSC)“. 4 ISO/IEC 9646-3 (1998): “Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 3: The Tree and Tabular Com

40、bined Notation (TTCN)“. 3 Abbreviations For the purposes of the present document, the following abbreviations apply: BNF Backus-Naur Form CATG Computer Aided Test Generation GFT Graphical presentation Format of TTCN-3 MSC Message Sequence Chart MTC Main Test Component PTC Parallel Test Component SUT

41、 System Under Test TFT Tabular presentation Format of TTCN-3 TTCN Testing and Test Control Notation ETSI ETSI ES 201 873-3 V3.2.1 (2007-02) 9 4 Overview According to the OSI conformance testing methodology defined in ISO/IEC 9646-3 4, testing normally starts with the identification of test purposes.

42、 A test purpose is defined as: “A prose description of a well-defined objective of testing, focusing on a single conformance requirement or a set of related conformance requirements as specified in the appropriate OSI specification“. Having identified all test purposes an abstract test suite is deve

43、loped that consists of one or more abstract test cases. An abstract test case defines the actions of the tester processes necessary to validate part (or all) of a test purpose. Applying these terms to Message Sequence Charts (MSCs) we can define two categories for their usage: 1) Using MSCs for the

44、definition of test purposes - Typically, an MSC specification that is developed as a use-case or as part of a system specification can be viewed as test purpose, i.e. it describes a requirement for the SUT in the form of a behaviour description that can be tested. For example, figure 2 presents a si

45、mple MSC describing the interaction between instances representing the SUT and its interfaces A, B and C. In a real implementation of such a system the interfaces A, B and C may map onto service access points or ports. The MSC in figure 2 only describes the interaction with the SUT and does not desc

46、ribe the actions of the test components necessary to validate the SUT behaviour, i.e. it is a test purpose description. B SUT C A a b c msc TestPurposeExample Figure 2: MSC describing the interaction of an SUT with its interfaces 2) Using MSCs for the definition of abstract test cases - An MSC speci

47、fication describing an abstract test case specifies the behaviour of the test components necessary to validate a corresponding test purpose. Figure 3 presents a simple MSC abstract test case description. It shows one Main Test Component (MTC) that exchanges the messages a, b and c with the SUT via t

48、he ports PortA, PortB and PortC in order to reach the test purpose shown in figure 2. The messages a and c are sent by the SUT via the ports A and B (figure 2) and received by the MTC (figure 3) via the same ports. The message b is sent by the MTC and received by the SUT. NOTE: The examples in figur

49、es 2 and 3 are only simple examples to illustrate the different usages of MSC for testing. The diagrams will be more complicated in case of a distributed SUT that consists of several processes or a distributed test configuration with several test components. ETSI ETSI ES 201 873-3 V3.2.1 (2007-02) 10PortB MTC PortC PortA a b c msc AbstractTestCaseExample Figure 3: MSC describing the interaction of an MTC with SUT interfaces In identifying these two categories of MSC usage two distinct areas of work can be identified (see figure 4): a) Generat

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

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

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