1、 ETSI ES 202 951 V1.1.1 (2011-07)ETSI Standard Methods for Testing and Specification (MTS);Model-Based Testing (MBT);Requirements for Modelling NotationsETSI ETSI ES 202 951 V1.1.1 (2011-07) 2Reference DES/MTS-00128 MBTmodConcept Keywords testing, TTCN ETSI 650 Route des Lucioles F-06921 Sophia Anti
2、polis 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 present document can be downloaded from: http:/www.etsi.org The prese
3、nt 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 dispute, the reference shall be the printing on ETSI printers
4、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 ETSI documents is available at http:/portal.etsi.org/tb/sta
5、tus/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 authorized by written permission. The copyright and the foregoing restricti
6、on extend to reproduction in all media. European Telecommunications Standards Institute 2011. All rights reserved. DECTTM, PLUGTESTSTM, UMTSTMand the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members. 3GPPTM and LTE are Trade Marks of ETSI registered for the benefit of its
7、Members and of the 3GPP Organizational Partners. GSM and the GSM logo are Trade Marks registered and owned by the GSM Association. ETSI ETSI ES 202 951 V1.1.1 (2011-07) 3Contents Intellectual Property Rights 4g3Foreword . 4g3Introduction 4g31 Scope 5g32 References 5g32.1 Normative references . 5g32.
8、2 Informative references 5g33 Definitions and abbreviations . 6g33.1 Definitions 6g33.2 Abbreviations . 7g34 Model-based test development . 7g35 General modelling notation requirements 8g35.1 Modularization . 8g35.2 Algorithms 9g35.3 Documentation . 9g36 Modelling the system interface 10g36.1 Action
9、s . 10g36.2 Operations 10g36.3 Ports 11g36.4 Configurations 11g37 Modelling the system behaviour 11g37.1 System state 11g37.2 System state transitions 12g37.3 Non-determinism 13g3Annex A (informative): Examples of modelling notation styles . 14g3A.1 Rule-Based Notation 14g3A.2 State Chart Notation .
10、 14g3A.3 Process-oriented notation . 15g3History 16g3ETSI ETSI ES 202 951 V1.1.1 (2011-07) 4Intellectual Property Rights IPRs essential or potentially essential to the present document may have been declared to ETSI. The information pertaining to these essential IPRs, if any, is publicly available f
11、or 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 ETSI in respect of ETSI standards“, which is available from the ETSI Secretariat. Latest updates are available on the ETSI Web server (htt
12、p:/ipr.etsi.org). 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 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, essent
13、ial to the present document. Foreword This ETSI Standard (ES) has been produced by ETSI Technical Committee Methods for Testing and Specification (MTS). Introduction Based on the recent success and deployment of automated test design by use of models in industry, TC MTS investigated work on model-ba
14、sed testing specifically in the context of standardized test specification development i.1. Contrary to other methods and approaches, which focus mainly on automation of test execution, the present document considers the use of model-based testing for the automation of test design. Model-based testi
15、ng facilitates a more thorough and earlier validation of standards as well as the efficient automatic generation of test case artefacts, e.g. in a textual or tabular descriptions, scripts or programs, which perform testing of the external behaviour of a system. Due to its independence of the output
16、format and its higher level of abstraction, model-based testing enables a more direct review of the requirements imposed by a standard compared to test case artefacts. In addition, automation of test design allows ETSI as well as other organizations to more efficiently create test suites, coping wit
17、h the ever-growing demand for interoperability and conformance testing in standardization. The motivations for the development of the present document were: to collect in one document agreed terminology and concepts required for the specification of models specifically for testing for all interest g
18、roups that are exposed to model-based testing technology such as product vendors, makers of model-based testing tools, test service providers, test engineers, software developers, government agencies, procurement personnel and researchers to support the specification of models for derivation of stan
19、dardized conformance and interoperability test cases to facilitate the use of model-based testing for product certification to create a basis for an open, competitive model-based testing tool market which process such models and where such models can be exchanged between different tools to enable co
20、nsumer accountability (including also legal issues) To ensure its success and quality, the present document has been developed by a group of experts from all types of stakeholders involved in test specification development, i.e. researchers, tool makers, industrial users, as well as testing experts
21、of ETSIs Centre for Testing and Interoperability. The present document lays the foundation for the deployment of model-based testing in standardization since it specifies requirements for modelling notations to be suitable for the generation of tests in the context of standardization. Such tests nee
22、d to adhere to well established concepts defined and used in manual test specification i.2. In addition, the present document defines the criteria that need to be fulfilled by a model in order to be included in a standardized ETSI test specification, and the relation that models have to the generate
23、d tests. ETSI ETSI ES 202 951 V1.1.1 (2011-07) 51 Scope The present document identifies and collects all concepts of a modelling notation required for specifying models in particular but not limited to the purpose of functional testing of communicating systems. Such models form the basis for generat
24、ing abstract test cases which follow the principles of ISO/IEC 9646-1 i.2 as, for example, put forward in the TTCN-3 test suites i.3. Model-based testing presents an alternative to manual test design, but does not eliminate the need for test systems i.4, i.5 which complement and execute generated te
25、st cases automatically. Model-based testing tools that use a modelling notation that complies with the requirements stated in the present document can be used to automatically generate abstract test cases suitable for standardization. The concepts and requirements described in the present document h
26、ave been developed mainly from the recommendations collected in TR 102 840 i.1, complement the theoretic foundation of modelling standard specifications specified in ITU-T Recommendation Z.500 i.6, and considered the meta-object facility of OMG formal/05-07-07 i.10. They are specified independent of
27、 a specific modelling notation or tool. Mapping of concepts to concrete modelling notations is intentionally not treated in the present document and preserved for future standards. 2 References References are either specific (identified by date of publication and/or edition number or version number)
28、 or non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the reference document (including any amendments) applies. Referenced documents which are not found to be publicly available in the expected location might be found at http:/
29、docbox.etsi.org/Reference. NOTE: While any hyperlinks included in this clause were valid at the time of publication ETSI cannot guarantee their long term validity. 2.1 Normative references The following referenced documents are necessary for the application of the present document. 1 ISO/IEC 11404:
30、“Information technology - General- Purpose Datatypes (GPD)“. 2.2 Informative references The following referenced documents are not necessary for the application of the present document but they assist the user with regard to a particular subject area. i.1 ETSI TR 102 840: “Methods for Testing and Sp
31、ecifications (MTS); Model-based testing in standardisation“. i.2 ISO/IEC 9646-1: “Information technology - Open Systems; Interconnection - Conformance testing methodology and framework - Part 1: General concepts“. i.3 ETSI ES 201 873-1: “Methods for Testing and Specification (MTS); The Testing and T
32、est Control Notation version 3; Part 1: TTCN-3 Core Language“. i.4 ETSI ES 201 873-5: “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 5: TTCN-3 Runtime Interface (TRI)“. NOTE: Also published as ITU-T Recommendation series Z.140. i.5 ETSI ES 201 873
33、-6: “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 6: TTCN-3 Control Interface (TCI)“. NOTE: Also published as ITU-T Recommendation series Z.140. i.6 ITU-T Recommendation Z.500: “Framework on formal methods in conformance testing“. ETSI ETSI ES 20
34、2 951 V1.1.1 (2011-07) 6i.7 Y. Gurevich, “Evolving Algebras 1993: Lipari Guide“, Specification and Validation Methods, Oxford University Press, 1995. i.8 Object Management Group: “Unified Modeling Language (UML), Infrastructure“. i.9 Object Management Group: “Unified Modeling Language (UML), Superst
35、ructure“. i.10 Object Management Group formal/05-07-07: “UML Testing Profile“, Version 1.0, 2005. i.11 ITU-T Recommendation Z.120: “Message Sequence Chart (MSC)“. i.12 “Extended Finite State Machines“. NOTE: Available at http:/en.wikipedia.org/wiki/Extended_finite_state_machine, retrieved 2011-01-25
36、. 3 Definitions and abbreviations 3.1 Definitions For the purposes of the present document, the following terms and definitions apply: abstract test case: See ISO/IEC 9646-1 i.2. NOTE: A complete and independent specification of the actions required to achieve a specific test purpose. An abstract te
37、st case may be represented as a set of informal instructions or a formal specification like a TTCN-3 test case. abstract test suite: See ISO/IEC 9646-1 i.2. NOTE: A test suite composed of abstract test cases. action: atomic activity of the system triggered or observed via the system interface, consi
38、sting of an action name and a set of data parameters NOTE: Actions are partitioned into input and output actions. (functional) behaviour: functional behaviour of a system as specified by a set of requirements in a specification and given as a set of action sequences, where each sequence represents a
39、 legal scenario, and every sequence not in this set represents an illegal scenario deterministic behaviour: behaviour of a system in which for each input action sequence there exist no more than one possible output action sequence input action: action stimulated by the environment representing a mes
40、sage, operation, or other kind of communication means NOTE: An input action may carry parameters. model-based testing: umbrella of approaches that generate tests from models modelling notation: formal language used for the specification of models non-deterministic behaviour: behaviour of a system wh
41、ere for one input action sequence more than one possible output action sequences exist offline test generation: test generation from a model ahead of test execution time online test generation: dynamic test generation from a model during test execution output action: action issued by the system or S
42、UT on the environment as a reaction on input actions, or spontaneously NOTE: An output action may carry parameters. requirement: documented need of what a system should be or perform ETSI ETSI ES 202 951 V1.1.1 (2011-07) 7(system) model: computer-readable behavioural model that describes the intende
43、d external operational characteristics of a system, i.e. how the system being modelled interacts with its environment, in terms of the system interface NOTE: Depending on the purpose, a system model may only capture aspects of real system behaviour, as determined by the abstraction level chosen by t
44、he system interface. system interface: model element that defines the input and output actions of the system on the level of abstraction selected for the given modelling and testing problem (system) state: modality in which the SUT accepts certain input actions and/or issues certain output actions (
45、system state) transition: transition in the SUT from one system state to the next, usually associated with an input or output action which causes the transition system under test (SUT): See ISO/IEC 9646-1 i.2. NOTE: The real open system in which the implementation under test resides. test generation
46、: automatic derivation of abstract test cases in one or more different formats from a model based on user defined test selection criteria test purpose: See ISO/IEC 9646-1 i.2. NOTE: A prose description of a well defined objective of testing. test selection: process or the result of choosing a subset
47、 of tests during test generation from a larger or infinite set of tests which can be derived from a model test selection criterion: property that is satisfied by a set of test cases generated from a model 3.2 Abbreviations For the purposes of the present document, the following abbreviations apply:
48、ASM Abstract State Machine EFSM Extended Finite State Machine MBT Model-Based Testing MSC Message Sequence Chart SUT System Under Test TTCN-3 Testing and Test Control Notation UML Unified Modeling Language 4 Model-based test development In model-based test development, an engineer starts from a set
49、of requirements of a system to be tested, usually given in a specification written in natural language. The engineer authors a model using a modelling notation which fulfils the requirements stated in the present document. The model encodes these requirements and describes the aspects of the functional behaviour as well as the interfaces via which these are to be tested. The model is then instrumented for the purpose of test generation by adding or selecting test selection criteria, i.e. coverage goals or test pu