1、 ETSI TS 103 255 V1.3.1 (2017-10) 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 serve
3、r) which are, or may be, or may become, essential to the present document. Trademarks The present document may include trademarks and/or tradenames which are asserted and/or registered by their owners. ETSI claims no ownership of these except for any which are indicated as being the property of ETSI
4、, and conveys no right to use or reproduce any trademark and/or tradename. Mention of those trademarks in the present document does not constitute an endorsement by ETSI of products, services or organizations associated with those trademarks. Foreword This Technical Specification (TS) has been produ
5、ced by ETSI Technical Committee Methods for Testing and Specification (MTS). Modal verbs terminology In the present document “shall“, “shall not“, “should“, “should not“, “may“, “need not“, “will“, “will not“, “can“ and “cannot“ are to be interpreted as described in clause 3.2 of the ETSI Drafting R
6、ules (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 255 V1.3.1 (2017-10)5 1 Scope The present document specifies the Abstract Test Suite (ATS) for the conformance test suite for using X
7、ML 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 “Using XML Schema with TTCN-3“ extension 1. The conformance test suite should give a high probability of standard conformance with r
8、espect 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 the 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) a
9、nd language extension (see e.g. ETSI ES 202 781i.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 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.
10、 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 specific (identified by date of publication and/or edition number or version number) or non-specific. For specific references, only the
11、 cited version applies. For non-specific references, the latest version of the referenced document (including any amendments) 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 hyperli
12、nks 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 the application of the present document. 1 ETSI ES 201 873-9 (V4.8.1): “Methods for Testing and Specification (MTS); The Testing and
13、 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 Test Control Notation version 3; Part 10: TTCN-3 Documentation Comment Specification“. 3 ETSI TS 102 351: “Methods for Testing and Spe
14、cification (MTS); Internet Protocol Testing (IPT); IPv6 Testing: Methodology and Framework“. 4 ISO/IEC 9646-1 (1992): “Information Technology - Open Systems Interconnection - Conformance Testing Methodology and Framework - Part 1: General concepts“. 5 ISO/IEC 9646-4: “Information technology - Open S
15、ystems Interconnection - Conformance testing methodology and framework - Part 4: Test realization“. 6 ISO/IEC 9646-5: “Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 5: Requirements on test laboratories and clients for the conformance ass
16、essment process“. 7 ISO/IEC 9646-7 (1994): “Conformance testing methodology and framework - Part 7: Implementation Conformance Statements“. 8 ETSI TS 103 253: “Methods for Testing and Specification (MTS); TTCN-3 Conformance Test Suite for use of XML schema; Implementation Conformance Statement“. 9 E
17、TSI ES 201 873-1 (V4.8.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.3.1 (2017-10)6 2.2 Informative references References are either specific (identified by date of publication and/or edition
18、number or version number) or non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the referenced document (including any amendments) applies. NOTE: While any hyperlinks included in this clause were valid at the time of publication,
19、 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 Testing and Specification (MTS); The Testing and Te
20、st 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 873-7: “Methods for Testing and Specification (MTS);
21、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 202 781: “Methods for Testing and Specification (MT
22、S); 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 Language Extensions: Advanced Parameterization“. i.7 ETSI
23、 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 terms and definitions given in ISO/IEC 9646-1 4, ISO
24、/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 realization of a Means of Testing, but with enough detail to
25、enable abstract test cases to be specified for this method Abstract Test Suite (ATS): test suite composed of abstract test cases ICS pro forma: document, in the form of a questionnaire, which when completed for an implementation or system becomes an ICS Implementation Conformance Statement (ICS): st
26、atement made by the supplier of an implementation claimed to conform to a given specification, stating which capabilities have been implemented Implementation eXtra Information for Testing (IXIT): statement made by a supplier or implementor of an IUT which contains or references all of the informati
27、on 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 Implementation Under Test (IUT): implementation of one
28、 or more OSI protocols in an adjacent user/provider relationship, being part of a real open system which is to be studied by testing ETSI ETSI TS 103 255 V1.3.1 (2017-10)7 Means Of Testing (MOT): combination of equipment and procedures that can perform the derivation, selection, parameterization and
29、 execution of test cases, in conformance with a reference standardized ATS and can produce a conformance log 3.2 Abbreviations For the purposes of the present document, the following abbreviations apply: ATM Abstract Test Method ATS Abstract Test Suite BNF Backus Naur Form ETS Executable Test Suite
30、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 Test Suite Structure TSS top_level folders are creat
31、ed 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 successfully and execute without runtime errors. These test
32、cases are called positive test cases. Positive semantic tests shall be correct with respect to the TTCN-3BNF, 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. They shall produce an ETS. If an ETS is produced and if
33、 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 called negative test cases. Negative tests shall be
34、correct with respect to the TTCN-3BNF 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 if it contains a control-part or a test case, it shoul
35、d 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 test case it increases by 1 (e.g. the ordinal number
36、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. Tables 1 and 2 present test sample test case structure for clause 6.1 “Mapping of facets“ of the clause 6 “Basic types“ of ETSI ES
37、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 with the help of the ATS directory structure. Tabl
38、e 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 Maxexclusive Clause 6.1.10 Pos_060110_maxexclusive ETSI ETSI
39、TS 103 255 V1.3.1 (2017-10)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 folders contain several files with the testing code.
40、 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 declarations. Depending on a test case type, additional f
41、iles 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 scenarios and namespace tests. TTCN-3 and XML file names
42、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 name of the main XSD file, with low line and an a
43、dditional 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_xml_schemas0501_namespaces_and_document_references
44、050103_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 names are built up according to the following sch
45、ema: “_“_“ 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; ETSI ETSI TS 103 255 V1.3.1 (2017-10)11 c) is a running 3-digit decimal number, starting in each subgro
46、up path with “001“. 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_060101_length_001. 5.2.3 Naming convention insid
47、e 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 “schema:“ followed by the schema file name without
48、 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_001“ The tests that check module name transformat
49、ion 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 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, a