diff --git a/TS-0019-Abstract_Test_Suite_&_implementation_eXtra_Information_for_Test-V2_0_0.md b/TS-0019-Abstract_Test_Suite_&_implementation_eXtra_Information_for_Test-V2_0_0.md index 7249724f81f546dedded202186f2966fd71fef76..8c642630ec7eef1a27d236f25a39602d577dcc97 100644 --- a/TS-0019-Abstract_Test_Suite_&_implementation_eXtra_Information_for_Test-V2_0_0.md +++ b/TS-0019-Abstract_Test_Suite_&_implementation_eXtra_Information_for_Test-V2_0_0.md @@ -33,10 +33,97 @@ The copyright extends to reproduction in all media. Notice of Disclaimer & Limitation of Liability The information provided in this document is directed solely to professionals who have the appropriate degree of experience to understand and interpret its contents in accordance with generally accepted engineering or other professional standards and applicable regulations. No recommendation as to products or vendors is made or should be implied. NO REPRESENTATION OR WARRANTY IS MADE THAT THE INFORMATION IS TECHNICALLY ACCURATE OR SUFFICIENT OR CONFORMS TO ANY STATUTE, GOVERNMENTAL RULE OR REGULATION, AND FURTHER, NO REPRESENTATION OR WARRANTY IS MADE OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR AGAINST INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS. NO oneM2M PARTNER TYPE 1 SHALL BE LIABLE, BEYOND THE AMOUNT OF ANY SUM RECEIVED IN PAYMENT BY THAT PARTNER FOR THIS DOCUMENT, WITH RESPECT TO ANY CLAIM, AND IN NO EVENT SHALL oneM2M BE LIABLE FOR LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES. oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PROVIDED IN THIS DOCUMENT IS AT THE RISK OF THE USER. -<br/>Contents + +# Contents +[toc] +1 Scope 4 + +2 References 4 + +2.1 Normative references 4 + +2.2 Informative references 4 + +3 Definitions and abbreviations 5 + +3.1 Definitions 5 + +3.2 Abbreviations 5 + +4 Conventions 5 + +5 Abstract Test Method (ATM) 5 + +5.1 Abstract protocol tester 5 + +5.2 Test Configuration 6 + +5.2.1 AE Test Configuration 6 + +5.3 Test architecture 7 + +5.4 Ports and ASPs (Abstract Services Primitives) 9 + +5.4.0 Introduction 9 + +5.4.1 mcaPort, mcaPortIn, mccPort, mccPortIn 9 + +5.4.2 utPort 10 + +5.4.2.0 Introduction 10 + +5.4.2.1 Usage for Automated AE Testing 10 + +5.4.2.2 Upper Tester Control Primitives 11 + +5.4.2.2.1 Introduction 11 + +5.4.2.2.2 UtTrigger and UtTriggerAck Primitives 11 + +5.4.2.2.3 Control Communication Protocol 14 + +5.4.2.2.4 Control Message Serialization 14 + +5.4.3 acPort 14 + +5.4.4 infoPort 14 + +6 Untestable Test Purposes 14 + +7 ATS Conventions 14 + +7.0 Introduction 14 + +7.1 Testing conventions 15 + +7.1.1 Testing states 15 + +7.1.1.1 Initial state 15 + +7.1.1.2 Final state 15 + +7.2 Naming conventions 15 + +7.2.1 General guidelines 15 + +7.2.2 oneM2M specific TTCN-3 naming conventions 16 + +7.2.3 Usage of Log statements 17 + +7.2.4 Test Case (TC) identifier 17 + +7.3 IXIT 17 + +8 TTCN-3 Verifications 19 + Annex A (normative): TTCN-3 library modules 20 + +A.0 Introduction 20 + Annex B (informative): Bibliography 21 +History 22 + # <br/>1 Scope The present document contains the Abstract Test Suite (ATS) for oneM2M as defined in oneM2M TS-0001 [1] and oneM2M TS-0004 [2] in compliance with the relevant requirements and in accordance with the relevant guidance given in ISO/IEC 96467 [6]. @@ -50,11 +137,17 @@ References are either specific (identified by date of publication and/or edition The following referenced documents are necessary for the application of the present document. `[1] oneM2M TS-0001: "Functional architecture".` + `[2] oneM2M TS-0004: "Service Layer Core Protocol".` + `[3] ISO/IEC 9646-1 (1994): "Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 1: General concepts".` + `[4] ISO/IEC 9646-2 (1994): "Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 2: Abstract Test Suite specification".` + `[6] ISO/IEC 9646-7 (1995): "Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 7: Implementation Conformance Statements".` + `[7] ETSI ES 201 873-1 (V4.5.1): "Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 1: TTCN-3 Core Language".` + `[9] oneM2M TS-0018: "Test Suite Structure and Test Purposes".` ## 2.2 Informative references @@ -68,6 +161,7 @@ The following referenced documents are not necessary for the application of the > NOTE: Available at [http://www.onem2m.org/images/files/oneM2M-Drafting-Rules.pdf](http://www.onem2m.org/images/files/oneM2M-Drafting-Rules.pdf). `[i.2] oneM2M TS-0015: "Testing Framework".` + `[i.3] oneM2M TS-0025: "Product profiles".` # 3 Definitions and abbreviations @@ -80,26 +174,46 @@ For the purposes of the present document, the terms and definitions given in ISO For the purposes of the present document, the following abbreviations apply: `AE Application entity` + `APT Abstract Protocol Tester` + `ATM Abstract Test Method` + `ATS Abstract Test Suite` + `CoAP Constrained Application Protocol` + `CSE Common Service Entity` + `HTTP Hypertext Transfer Protocol` + `IP Internet Protocol` + `IUT Implementation Under Test` + `MQTT Message Queuing Telemetry Transport` + `PA Platform Adaptor` + `PICS Protocol Implementation Conformance Statement` + `PX PiXit` + `SA System Adaptor` + `SUT System Under Test` + `TC Test Case` + `TP Test Purposes` + `TSS Test Suite Structure` + `TTCN Tree and Tabular Combined Notation` + `UT Upper Tester` + # 4 Conventions The key words "Shall", "Shall not", "May", "Need not", "Should", "Should not" in this document are to be interpreted as described in the oneM2M Drafting Rules [i.1] @@ -126,7 +240,7 @@ Test configurations are defined to test different entities such as CSE and AE, e Figure X shows a AE test configuration which is mapped to CF03 in clause 6.3.3.3 in oneM2M TS-0015 [i.2] and aligns with conformance test system architecture in clause 6.3.3.2 in oneM2M TS-0015 [i.2]. The TTCN-3 Test Component in Test System sends triggering actions or behaviour to the Upper Tester Application of SUT through upper tester transport link Ut while the IUT sends/receives oneM2M service primitives through Mca to/from CSE in Test System. - + **Figure 5.2.1-1: AE test configuration** @@ -137,8 +251,9 @@ The approach for the implementation of an Abstract Protocol Tester selected in o Following this recommendation the oneM2M tester architecture comprises a non-platform dependent Test Suite, and a platform dependent part.  -NOTE: However, it can be implemented in a semi-independent manner, which will minimize the dependency to those elements. +> NOTE: However, it can be implemented in a semi-independent manner, which will minimize the dependency to those elements. +> **Figure 5.3-1: High level oneM2M Test Architecture** @@ -154,7 +269,8 @@ The test algorithms use the interfaces defined in [1] and [2] (mca, mcc) in orde 1. observe the test events received from the IUT. In TTCN-3 these two interfaces have been implemented through a set of logical TTCN-3 ports (mcaPort and mcaPortIn for mca interface, and mccPort and mccPortIn for mcc interface) which allows oneM2M message primitives exchange with the IUT. - + + **Figure 5.3-2: oneM2M Test Architecture** @@ -191,12 +307,13 @@ These ports are used to send and receive the following message sets: - Response Primitives messages in accordance with [2]. Two primitives are currently defined for these ports indicated as table 5.4.1-1: -The M2MRequestPrimitive - to send or receive oneM2M messages to/from the IUT. Depending on the IUT to be tested: + +1. The M2MRequestPrimitive - to send or receive oneM2M messages to/from the IUT. Depending on the IUT to be tested: 1. If the IUT is an AE, these messages are either received or sent by the tester which is associated with the CSE role through the mcaPortIn or the mcaPort respectively. 1. If the IUT is a CSE, these messages are either sent or received by the tester when it plays the AE role through the mcaPort or the mcaPortIn respectively, or sent or received by the tester when it plays the CSE role through the mccPort or the mccPortIn respectively. -The M2MResponsePrimitive - to send or receive oneM2M messages to/from the IUT. Depending on the IUT to be tested: +1. The M2MResponsePrimitive - to send or receive oneM2M messages to/from the IUT. Depending on the IUT to be tested: 1. If the IUT is an AE, these messages are either sent or received by the tester which is associated with the CSE role through the mcaPortIn or the mcaPort respectively. 1. If the IUT is a CSE, these messages are either sent or received by the tester when it plays the CSE role through the mccPortIn or the mccPort respectively, sent or received by the tester when it plays the AE role through the mcaPortIn or mcaPort respectively. @@ -240,7 +357,7 @@ oneM2M service Primitive defined for utPort is listed as follows: The Upper Tester Application in SUT can be implemented as an embedded source code. An example for implementation of automated AE test for Registration is shown as figure 5.4.2.1-1. - + **Figure 5.4.2.1-1: Example of automated AE test using Ut interface** @@ -265,7 +382,7 @@ The upper tester triggering message type maps to particular message formats for ##### 5.4.2.2.2 UtTrigger and UtTriggerAck Primitives The UtTrigger primitive is initialized by the Test System to send triggering message to the target IUT as depicted in figure 5.4.2.2.2-1. The IUT will send acknowledgement message back to the Test System using UtTriggerAck primitive if trigger message is successfully transported to the IUT. Then IUT starts interaction with Test System through oneM2M request and response primitives. - + **Figure 5.4.2.2.2-1: Trigger message flow** @@ -291,7 +408,12 @@ Table 5.4.2.2.2-2 defines UtTrigger and UtTriggerAck primitives including oneM2M **Table 5.4.2.2.2-2: Rules for defining UtTrigger and UtTriggerAck primitives** -|UtTrigger primitive is represented in requestPrimitive serialized in JSON format. <br>Parameters within UtTrigger are listed as following:<br>operation: (mandatory)operation type that IUT is triggered to perform.<br>resourceType: (optional)resource type of a target resource against which IUT is triggered to perform certain operation<br>to: (mandatory)target resource against which IUT is triggered to perform certain operation. <br>primitiveContent:(optional)represents the resource attributes that shall be included in the requestPrimitive. | +1. UtTrigger primitive is represented in requestPrimitive serialized in JSON format. +1. Parameters within UtTrigger are listed as following: + - operation: (mandatory)operation type that IUT is triggered to perform. + - resourceType: (optional)resource type of a target resource against which IUT is triggered to perform certain operation + - to: (mandatory)target resource against which IUT is triggered to perform certain operation. + - primitiveContent:(optional)represents the resource attributes that shall be included in the requestPrimitive. @@ -493,19 +615,23 @@ The following parameters are used by the oneM2M ATS for the correct execution of # 8 TTCN-3 Verifications The principles for Verifying the TTCN-3 test code are given in one M2M TS-0015 [i.2]. + All test cases provided with this document in Annex A which correspond to at least one of the product profiles defined in one M2M TS-0025 [i.3] have been verified at the time of publication of this document which corresponds with the TTCN-3 code gitlab tag provided in annex A. -<br/>Annex A (normative):<br/>TTCN-3 library modules + +# <br/>Annex A (normative):<br/>TTCN-3 library modules A.1 Electronic annex, zip file with TTCN-3 code This ATS has been produced using the Testing and Test Control Notation (TTCN) according to ETSI ES 201 873-1 [7]. This test suite has been compiled error-free using two different commercial TTCN-3 compilers. The TTCN-3 library modules, which form parts of the present document, are contained in the following gitLab tag: + [https://git.onem2m.org/TST/ATS/tags/TST-2018-0021-TS-0019_TTCN-3_Test_cases](https://git.onem2m.org/TST/ATS/tags/TST-2018-0021-TS-0019_TTCN-3_Test_cases). <br/> -Annex B (informative):<br/>Bibliography -ISO/IEC 9646-6 (1994): "Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 6: Protocol profile test specification". -oneM2M TS-0017: "Implementation Conformance Statement". -oneM2M TS-0031: "Feature catalogue". + +# Annex B (informative):<br/>Bibliography +- ISO/IEC 9646-6 (1994): "Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 6: Protocol profile test specification". +- oneM2M TS-0017: "Implementation Conformance Statement". +- oneM2M TS-0031: "Feature catalogue". # <br/>History diff --git a/media/image5.png b/media/image5.png new file mode 100644 index 0000000000000000000000000000000000000000..ce3b1a680a4427f260e2cfe16e26f5c2c12fdbfc Binary files /dev/null and b/media/image5.png differ diff --git a/media/image7.png b/media/image7.png new file mode 100644 index 0000000000000000000000000000000000000000..105bffbc32bf3377222b63efd2d247134484b9b7 Binary files /dev/null and b/media/image7.png differ diff --git a/media/image8.png b/media/image8.png new file mode 100644 index 0000000000000000000000000000000000000000..6fa8e0f4fa02f0aac7b7b89797f703227afdd18d Binary files /dev/null and b/media/image8.png differ diff --git a/media/image9.png b/media/image9.png new file mode 100644 index 0000000000000000000000000000000000000000..7b3c3c5839e5f1a870401d454053c24837946632 Binary files /dev/null and b/media/image9.png differ