1、 ETSI TS 103 255 V1.2.1 (2016-02) Methods for Testing and Specification (MTS); TTCN-3 Conformance Test Suite for use of XML schema; Abstract Test Suite Essential, or potentially Essential, IPRs notified to ETSI in respect of ETSI standards“, which is available from the ETSI Secretariat. Latest updat
2、es are available on the ETSI Web server (https:/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
3、) which are, or may be, or may become, essential to the present document. Foreword This Technical Specification (TS) has been produced by ETSI Technical Committee Methods for Testing and Specification (MTS). Modal verbs terminology In the present document “shall“, “shall not“, “should“, “should not“
4、, “may“, “need not“, “will“, “will not“, “can“ and “cannot“ are to be interpreted as described in clause 3.2 of the ETSI Drafting Rules (Verbal forms for the expression of provisions). “must“ and “must not“ are NOT allowed in ETSI deliverables except when used in direct citation. ETSI ETSI TS 103 25
5、5 V1.2.1 (2016-02)5 1 Scope The present document specifies the Abstract Test Suite (ATS) for the conformance test suite for using XML Schema with TTCN-3, as defined in ETSI ES 201 873-9 1. The objective of the present document is to provide a basis for conformance tests for TTCN-3 tools supporting “
6、Using XML Schema with TTCN-3“ extension 1. The conformance test suite should give a high probability of standard conformance with respect to TTCN-3 tools from different vendors. In the present document only using XML Schema with TTCN-3, specified in ETSI ES 201 873-9 1 have been considered but not t
7、he core language 9, tool implementation (see ETSI ES 201 873-5 i.1 and ETSI ES 201 873-6 i.2), language mapping (see i.3 and i.4) and language extension (see e.g. ETSI ES 202 781 i.5, ETSI ES 202 784 i.6 and ETSI ES 202 785 i.7) aspects. The test notation used in the ATS attached in a zipped file is
8、 in TTCN-3 and it is part of the present document. Annex A provides the Tree and Tabular Combined Notation (TTCN-3) part of the ATS. Annex B provides the Partial Implementation Extra Information for Testing (PIXIT) Pro forma of the ATS. 2 References 2.1 Normative references References are either spe
9、cific (identified by date of publication and/or edition number or version number) 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
10、 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 publication, ETSI cannot guarantee their long term validity. The following referenced documents are necessary for t
11、he application of the present document. 1 ETSI ES 201 873-9 (V4.6.1): “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 9: Using XML schema with TTCN-3“. 2 ETSI ES 201 873-10 (V4.4.1): “Methods for Testing and Specification (MTS); The Testing and Tes
12、t Control Notation version 3; Part 10: TTCN-3 Documentation Comment Specification“. 3 ETSI TS 102 351: “Methods for Testing and Specification (MTS); Internet Protocol Testing (IPT); IPv6 Testing: Methodology and Framework“. 4 ISO/IEC 9646-1 (1992): “Information Technology - Open Systems Interconnect
13、ion - Conformance Testing Methodology and Framework - Part 1: General concepts“. 5 ISO/IEC 9646-4: “Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 4: Test realization“. 6 ISO/IEC 9646-5: “Information technology - Open Systems Interconnect
14、ion - Conformance testing methodology and framework - Part 5: Requirements on test laboratories and clients for the conformance assessment process“. 7 ISO/IEC 9646-7 (1994): “Conformance testing methodology and framework - Part 7: Implementation Conformance Statement“. 8 ETSI TS 103 253: “Methods fo
15、r Testing Implementation Conformance Statement“. 9 ETSI ES 201 873-1 (V4.7.1): “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 1: TTCN-3 Core Language“. ETSI ETSI TS 103 255 V1.2.1 (2016-02)6 2.2 Informative references References are either specifi
16、c (identified by date of publication and/or edition number or version number) 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. NOTE: While any hyperlinks included in
17、 this clause were valid at the time of publication, ETSI cannot guarantee their long term validity. 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 ES 201 873-5: “Methods for
18、Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 5: TTCN-3 Runtime Interface (TRI)“. i.2 ETSI ES 201 873-6: “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 6: TTCN-3 Control Interface (TCI)“. i.3 ETSI ES 201 87
19、3-7: “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 7: Using ASN.1 with TTCN-3“. i.4 ETSI ES 201 873-8: “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 8: The IDL to TTCN-3 Mapping“. i.5 ETSI ES
20、202 781: “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; TTCN-3 Language Extensions: Configuration and Deployment Support“. i.6 ETSI ES 202 784: “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; TTCN-3 Langua
21、ge Extensions: Advanced Parameterization“. i.7 ETSI ES 202 785: “Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; TTCN-3 Language Extensions: Behaviour Types“. 3 Definitions and abbreviations 3.1 Definitions For the purposes of the present document, the t
22、erms and definitions given in ISO/IEC 9646-1 4, ISO/IEC 9646-7 7, ETSI ES 201 873-1 9 (TTCN-3) and the following apply: Abstract Test Method (ATM): description of how an IUT is to be tested, given at an appropriate level of abstraction to make the description independent of any particular realizatio
23、n of a Means of Testing, but with enough detail to enable abstract test cases to be specified for this method Abstract Test Suite (ATS): test suite composed of abstract test cases Implementation Conformance Statement (ICS): statement made by the supplier of an implementation claimed to conform to a
24、given specification, stating which capabilities have been implemented ICS pro forma: document, in the form of a questionnaire, which when completed for an implementation or system becomes an ICS Implementation eXtra Information for Testing (IXIT): statement made by a supplier or implementor of an IU
25、T which contains or references all of the information related to the IUT and its testing environment, which will enable the test laboratory to run an appropriate test suite against the IUT IXIT pro forma: document, in the form of a questionnaire, which when completed for the IUT becomes the IXIT Imp
26、lementation Under Test (IUT): implementation of one or more OSI protocols in an adjacent user/provider relationship, being part of a real open system which is to be studied by testing Means Of Testing (MOT): combination of equipment and procedures that can perform the derivation, selection, paramete
27、rization and execution of test cases, in conformance with a reference standardized ATS and can produce a conformance log ETSI ETSI TS 103 255 V1.2.1 (2016-02)7 3.2 Abbreviations For the purposes of the present document, the following abbreviations apply: ATM Abstract Test Method ATS Abstract Test Su
28、ite BNF Backus Naur Form ETS Executable Test Suite ICS Implementation Conformance Statement IUT Implementation under Test IXIT Implementation eXtra Information for Testing MOT Means Of Testing TC Test Case TCI TTCN-3 Control Interface TP Test Purpose TRI TTCN-3 Runtime Interface TS Test System TSS T
29、est Suite Structure TSS top_level folders are created for testing requirements of clauses that include numbered subclauses. Test case folder name is derived from the clause folder name in the following way: 1) The clause name is prefixed with “Pos_“ in case of test cases that shall compile successfu
30、lly and execute without runtime errors. These test cases are called positive test cases. Positive semantic tests shall be correct with respect to the TTCN-3 BNF, the static semantics of TTCN-3, should include correct XML schema inputs, and meet the respective text clauses of ETSI ES 201 873-9 1. The
31、y shall produce an ETS. If an ETS is produced and if it contains a control-part or a test case, it should be executed. 2) The clause name is prefixed with “Neg_“ in case of test cases that either shall produce compilation errors or whose execution shall lead to a runtime error. These test cases are
32、called negative test cases. Negative tests shall be correct with respect to the TTCN-3 BNF and the static semantics of TTCN-3, and should include correct XML schema inputs, but violate the semantics one specific text clause of ETSI ES 201 873-9 1. They may produce an ETS. If an ETS is produced and i
33、f it contains a control-part or a test case, it should be executed. 3) The clause name shall be suffixed with the low line character followed by a three-digit ordinal number of the test case. The ordinal number of the first test case defined inside a (sub)clause folder is 001 and for each following
34、test case it increases by 1 (e.g. the ordinal number of the 4thtest case is 004). 4) Positive and negative test cases are numbered separately, so there can be positive and negative test cases with the same ordinal number. Table 1 presents test sample test case structure for subclause 6.1 “Mapping of
35、 facets“ of the clause 6 “Basic types“ of ETSI ES 201 873-9 1. The test cases shall conform to the following correctness rules: The test case identifiers and their group index do not imply the correct execution order of a TTCN-3 tool conformance test. Grouping and subgrouping in the ATS is realized
36、with the help of the ATS directory structure. Table 1: Example ATS structure of positive tests Group Subgroup Group Index Mapping of facets Clause 6.1 Length Clause 6.1.1 Pos_060101_length Mininclusive Clause 6.1.7 Pos_060107_mininclusive Maxinclusive Clause 6.1.8 Pos_060108_maxinclusive Maxexclusiv
37、e Clause 6.1.10 Pos_060110_maxexclusive ETSI ETSI TS 103 255 V1.2.1 (2016-02)10 Table 2: Example ATS structure of negative tests Group Subgroup Group Index Mapping of facets Clause 6.1 Mininclusive Clause 6.1.1 Neg_060101_length_001 Maxexclusive Clause 6.1.10 Neg_060110_maxexclusive_001 Test case fo
38、lders contain several files with the testing code. Two of these files are mandatory: XSD file: specifies the schema with declarations that are the subject of testing. TTCN-3 file: contains test description, expected result declaration and TTCN-3 module used for validation of the imported XSD declara
39、tions. Depending on a test case type, additional files can be present as well: XML file: used for validation of messages generated from XSD declarations; it contains the expected encoding result and it is mandatory for positive test cases. Additional XSD files: used in case of various import scenari
40、os and namespace tests. TTCN-3 and XML file names and names of the mandatory XSD file consist of the name of the enclosing test case folder and a mandatory extension: .ttcn (for TTCN-3 files) .xml (for XML files) .xsd (for XSD files) In case of additional XSD files, the file name is derived from the
41、 name of the main XSD file, with low line and an additional single-digit ordinal number inserted between the test case name and the file extension: _1.xml (for extra XML file) _1.xsd (for extra XSD file) EXAMPLE: Folder structure for a test case Pos_050103_imports_001: Containing folder: 05_mapping_
42、xml_schemas0501_namespaces_and_document_references050103_imports - Folder: Pos_050103_imports_001; contains files square4 Pos_050103_imports_001.ttcn square4 Pos_050103_imports_001.xsd square4 Pos_050103_imports_001_1.xsd square4 Pos_050103_imports_001.xml 5.2.2 Test case identifiers The test case n
43、ames are built up according to the following schema: “_“_“ where: a) double quotes (“) are used to enclose literal strings; b) containing positive and negative syntactic and semantic test, refers to ETSI ES 201 873-1 9 clause numbers and names; c) is a running 3-digit decimal number, starting in eac
44、h subgroup path with “001“. ETSI ETSI TS 103 255 V1.2.1 (2016-02)11 EXAMPLE: TC_Pos_060101_length_001 i) The example refers to a positive test case for string with length restriction. ii) It is the first test case of this group/subgroup. NOTE: The TP identifier of TC_Pos_060101_length_001 is TP_Pos_
45、060101_length_001. 5.2.3 Naming convention inside XSD files The XSD files shall define a target namespace unless it contains a dedicated test for rules connected with handling no target namespace in which case the target namespace shall be omitted. The target namespace shall consist of the string “s
46、chema:“ followed by the schema file name without extension: “_“ where: a) double quotes (“) are used to enclose literal strings; b) XSD_file_name is the name of the XSD file name without extension. EXAMPLE: XSD file Pos_050103_imports_001.xsd defines the target namespace “schema:Pos_050103_imports_0
47、01“ The tests that check module name transformation are the only exception to this rule. These tests might define a different namespace name according to the test case purpose. In the XSD file, the default unprefixed namespace shall be the schema namespace http:/www.w3.org/2001/XMLSchema. The target
48、 namespace shall be prefixed; preferable prefix is “ns“. Only test cases testing encoding of namespace prefixes are allowed to use different namespace prefixing strategy. 5.3 ATS specification framework 5.3.1 Use of TTCN-3 5.3.1.1 General TTCN-3, as defined in ETSI ES 201 873-1 9, is used as the ATS
49、 specification language. A number of requirements have been identified for the development and production of the TTCN-3 specification for the ATS: 1) Top-down design. 2) A uniquely defined testing architecture and test method. 3) Uniform TTCN-3 style and naming conventions. 4) Human-readability. 5) The TTCN-3 specification shall be feasible, implementable, compilable, and maintainable. 6) Test cases shall be designed in a way to be easily adaptable, upwards compatible with the evolution of the