Skip to content
Snippets Groups Projects
Commit 3f189f68 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Conversion from v4.0.0

parent be9cb412
No related branches found
No related tags found
No related merge requests found
![~~CAPTION~~](media/image1.png)
|**oneM2M**<br />**Technical** **Specification** |**oneM2M**<br />**Technical** **Specification** |
|-|-|
|Document Number |oneM2M-TS-0019-V-4.0.0 |
|Document Name: |Abstract Test Suite and Implementation eXtra Information for Test |
|Date: |2022 May 09 |
|Abstract: |Abstract Test Suite and Implementation eXtra Information for Test consists of :<br />- Definition of the Abstract Protocol Tester (APT)<br />- Definition of TTCN-3 test architecture<br />- Development of TTCN-3 test suite, e.g. naming conventions, code documentation, test case structure.<br />- IXIT proforma;<br /> |
|Template Version:23 February 2015 (Do not modify) |Template Version:23 February 2015 (Do not modify) |
This Specification is provided for future development work within oneM2M only. The Partners accept no liability for any use of this Specification.
The present document has not been subject to any approval process by the oneM2M Partners Type 1. Published oneM2M specifications and reports for implementation should be obtained via the oneM2M Partners' Publications Offices.
<br />About oneM2M
The purpose and goal of oneM2M is to develop technical specifications which address the need for a common M2M Service Layer that can be readily embedded within various hardware and software, and relied upon to connect the myriad of devices in the field with M2M application servers worldwide.
More information about oneM2M may be found at: http//www.oneM2M.org
Copyright Notification
(c) 2019, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
All rights reserved.
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.
# Contents
[Contents](#contents)
[1 Scope](#1-scope)
[2 References](#2-references)
&nbsp;&nbsp;&nbsp;&nbsp;[2.1 Normative references](#21-normative-references)
&nbsp;&nbsp;&nbsp;&nbsp;[2.2 Informative references](#22-informative-references)
[3 Definition of terms, symbols and abbreviations](#3-definition-of-terms-symbols-and-abbreviations)
&nbsp;&nbsp;&nbsp;&nbsp;[3.1 Terms](#31-terms)
&nbsp;&nbsp;&nbsp;&nbsp;[3.2 Symbols](#32-symbols)
&nbsp;&nbsp;&nbsp;&nbsp;[3.2 Abbreviations](#32-abbreviations)
[4 Conventions](#4-conventions)
[5 Abstract Test Method (ATM)](#5-abstract-test-method-atm)
&nbsp;&nbsp;&nbsp;&nbsp;[5.1 Abstract protocol tester](#51-abstract-protocol-tester)
&nbsp;&nbsp;&nbsp;&nbsp;[5.2 Test Configuration](#52-test-configuration)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.2.1 AE Test Configuration](#521-ae-test-configuration)
&nbsp;&nbsp;&nbsp;&nbsp;[5.3 Test architecture](#53-test-architecture)
&nbsp;&nbsp;&nbsp;&nbsp;[5.4 Ports and ASPs (Abstract Services Primitives)](#54-ports-and-asps-abstract-services-primitives)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.0 Introduction](#540-introduction)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.1 mcaPort, mcaPortIn, mccPort, mccPortIn](#541-mcaport-mcaportin-mccport-mccportin)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.2 mcnPort, mcnPortIn](#542-mcnport-mcnportin)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.3 mccPortInternal](#543-mccportinternal)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.4 utPort](#544-utport)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.4.0 Introduction](#5440-introduction)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.4.1 Usage for Automated AE Testing](#5441-usage-for-automated-ae-testing)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.4.2 Upper Tester Control Primitives](#5442-upper-tester-control-primitives)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.4.2.1 Introduction](#54421-introduction)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.4.2.2 UtTrigger and UtTriggerAck Primitives](#54422-uttrigger-and-uttriggerack-primitives)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.4.2.3 Control Communication Protocol](#54423-control-communication-protocol)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.4.2.4 Control Message Serialization](#54424-control-message-serialization)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.5 acPort](#545-acport)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.4.6 infoPort](#546-infoport)
&nbsp;&nbsp;&nbsp;&nbsp;[5.5 Test components](#55-test-components)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.5.1 Tester](#551-tester)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.5.2 AeSimu](#552-aesimu)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.5.3 CseSimu](#553-csesimu)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5.5.4 ScefSimu](#554-scefsimu)
&nbsp;&nbsp;&nbsp;&nbsp;[5.6 Test strategy](#56-test-strategy)
[6 Untestable Test Purposes](#6-untestable-test-purposes)
[7 ATS Conventions](#7-ats-conventions)
&nbsp;&nbsp;&nbsp;&nbsp;[7.0 Introduction](#70-introduction)
&nbsp;&nbsp;&nbsp;&nbsp;[7.1 Testing conventions](#71-testing-conventions)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[7.1.1 Testing states](#711-testing-states)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[7.1.1.1 Initial state](#7111-initial-state)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[7.1.1.2 Final state](#7112-final-state)
&nbsp;&nbsp;&nbsp;&nbsp;[7.2 Naming conventions](#72-naming-conventions)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[7.2.1 General guidelines](#721-general-guidelines)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[7.2.2 oneM2M specific TTCN-3 naming conventions](#722-onem2m-specific-ttcn-3-naming-conventions)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[7.2.3 Usage of Log statements](#723-usage-of-log-statements)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[7.2.4 Test Case (TC) identifier](#724-test-case-tc-identifier)
&nbsp;&nbsp;&nbsp;&nbsp;[7.3 IXIT](#73-ixit)
[8 TTCN-3 Verifications](#8-ttcn-3-verifications)
[Annex A (normative): TTCN-3 library modules](#annex-a-normative-ttcn-3-library-modules)
&nbsp;&nbsp;&nbsp;&nbsp;[A.1 Electronic annex, zip file with TTCN-3 code](#a1-electronic-annex-zip-file-with-ttcn-3-code)
[Annex B (informative): Bibliography](#annex-b-informative-bibliography)
[History](#history)
1 Scope 5
2 References 5
2.1 Normative references 5
2.2 Informative references 5
3 Definition of terms, symbols and abbreviations 6
3.1 Terms 6
3.2 Symbols 6
3.2 Abbreviations 6
4 Conventions 6
5 Abstract Test Method (ATM) 7
5.1 Abstract protocol tester 7
5.2 Test Configuration 7
5.2.1 AE Test Configuration 7
5.3 Test architecture 8
5.4 Ports and ASPs (Abstract Services Primitives) 12
5.4.0 Introduction 12
5.4.1 mcaPort, mcaPortIn, mccPort, mccPortIn 12
5.4.2 mcnPort, mcnPortIn 13
5.4.3 mccPortInternal 13
5.4.4 utPort 13
5.4.4.0 Introduction 13
5.4.4.1 Usage for Automated AE Testing 13
5.4.4.2 Upper Tester Control Primitives 14
5.4.4.2.1 Introduction 14
5.4.4.2.2 UtTrigger and UtTriggerAck Primitives 14
5.4.4.2.3 Control Communication Protocol 19
5.4.4.2.4 Control Message Serialization 19
5.4.5 acPort 19
5.4.6 infoPort 19
5.5 Test components 20
5.5.1 Tester 20
5.5.2 AeSimu 20
5.5.3 CseSimu 21
5.5.4 ScefSimu 21
5.6 Test strategy 22
6 Untestable Test Purposes 23
7 ATS Conventions 23
7.0 Introduction 23
7.1 Testing conventions 23
7.1.1 Testing states 23
7.1.1.1 Initial state 23
7.1.1.2 Final state 23
7.2 Naming conventions 24
7.2.1 General guidelines 24
7.2.2 oneM2M specific TTCN-3 naming conventions 25
7.2.3 Usage of Log statements 25
7.2.4 Test Case (TC) identifier 26
7.3 IXIT 26
8 TTCN-3 Verifications 28
Annex A (normative): TTCN-3 library modules 29
A.1 Electronic annex, zip file with TTCN-3 code 29
Annex B (informative): Bibliography 30
History 31
# 1 Scope
The present document contains the Abstract Test Suite (ATS) for oneM2M as defined in oneM2M TS-0001 <a href="#_ref_1">[1]</a> and oneM2M TS-0004 <a href="#_ref_2">[2]</a> in compliance with the relevant requirements and in accordance with the relevant guidance given in ISO/IEC 96467 <a href="#_ref_5">[5]</a>.
The objective of the present document is to provide a basis for conformance tests for oneM2M products giving a high probability of interoperability between different manufacturers' equipment.
The ISO standard for the methodology of conformance testing (ISO/IEC 96461 <a href="#_ref_3">[3]</a> and ISO/IEC 96462 <a href="#_ref_4">[4]</a>) as well as oneM2M TS-0015 Testing Framework <a href="#_ref_i.2">[i.2]</a> are used as a basis for the test methodology.
# 2 References
## 2.1 Normative references
References are either specific (identified by date of publication and/or edition number or version number) or nonspecific. For specific references, only the cited version applies. For non-specific references, the latest version of the referenced document (including any amendments) applies.
The following referenced documents are necessary for the application of the present document.
- <a name="_ref_1">[1]</a> oneM2M TS-0001: "Functional Architecture".
- <a name="_ref_2">[2]</a> oneM2M TS-0004: "Service Layer Core Protocol".
- <a name="_ref_3">[3]</a> ISO/IEC 9646-1 (1994): "Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 1: General concepts".
- <a name="_ref_4">[4]</a> ISO/IEC 9646-2 (1994): "Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 2: Abstract Test Suite specification".
- <a name="_ref_5">[5]</a> ISO/IEC 9646-7 (1995): "Information technology - Open Systems Interconnection - Conformance testing methodology and framework - Part 7: Implementation Conformance Statements".
- <a name="_ref_6">[6]</a> 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".
- <a name="_ref_7">[7]</a> oneM2M TS-0018: "Test Suite Structure and Test Purposes".
- <a name="_ref_8">[8]</a> 3GPP TS 29.122; T8 reference point for Northbound APIs (Release 15)
## 2.2 Informative references
References are either specific (identified by date of publication and/or edition number or version number) or nonspecific. For specific references, only the cited version applies. For non-specific references, the latest version of the referenced document (including any amendments) applies.
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.
- <a name="_ref_i.1">[i.1]</a> oneM2M Drafting Rules.
> NOTE: Available at [http://www.onem2m.org/images/files/oneM2M-Drafting-Rules.pdf](http://www.onem2m.org/images/files/oneM2M-Drafting-Rules.pdf).
- <a name="_ref_i.2">[i.2]</a> oneM2M TS-0015: "Testing Framework".
- <a name="_ref_i.3">[i.3]</a> oneM2M TS-0025: "Product profiles".
# 3 Definition of terms, symbols and abbreviations
## 3.1 Terms
For the purposes of the present document, the terms given in ISO/IEC 96461 <a href="#_ref_3">[3]</a>, ISO/IEC 96467 <a href="#_ref_5">[5]</a> and oneM2M TS-0015 <a href="#_ref_i.2">[i.2]</a> apply.
## 3.2 Symbols
Void.
## 3.2 Abbreviations
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`
`IXIT Implementation eXtra Information for Test`
`JSON JavaScript Object Notation`
`MQTT Message Queuing Telemetry Transport`
`MTC Main Test Component`
`PA Platform Adaptor`
`PICS Protocol Implementation Conformance Statement`
`PTC Paralell Test Component`
`PX PiXit`
`SA System Adaptor`
`SUT System Under Test`
`TC Test Case`
`TCP Transmission Control Protocol`
`TP Test Purposes`
`TS Test System`
`TSS Test Suite Structure`
`TTCN Tree and Tabular Combined Notation`
`UDP User Datagram Protocol`
`UT Upper Tester`
`XML eXtensible Markup Language`
# 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 <a href="#_ref_i.1">[i.1]</a>.
# 5 Abstract Test Method (ATM)
## 5.1 Abstract protocol tester
An abstract protocol tester (APT) is a process that provides behaviours for testing an IUT by emulating a peer IUT at the same layer, and enabling to address a single test objective.
APTs used by the oneM2M test suite are described in figure 5.1-1. The test system will simulate valid and invalid protocol behaviour, and will analyse the reaction of the IUT.
![Figure 5.1-1: Abstract protocol testers - oneM2M](media/image2.png) ![Figure 5.1-1: Abstract protocol testers - oneM2M](media/image3.png)
![Figure 5.1-1: Abstract protocol testers - oneM2M](media/image4.png) ![Figure 5.1-1: Abstract protocol testers - oneM2M](media/image5.png)
**Figure 5.1-1: Abstract protocol testers - oneM2M**
As figure 5.1-1 illustrates, the corresponding ATS needs to use lower layers to establish a proper connection to the system under test (SUT) over a physical link (Lower layers link). Four different lower layers have been specified corresponding to the binding protocols considered in oneM2M: HTTP, CoAP, WebSocket and MQTT.
## 5.2 Test Configuration
### 5.2.1 AE Test Configuration
Test configurations are defined to test different entities such as CSE and AE, etc.
Figure 5.2.1-1 shows a AE test configuration which is mapped to CF03 in clause 6.3.3.3 in oneM2M TS0015 <a href="#_ref_i.2">[i.2]</a> and aligns with conformance test system architecture in clause 6.3.3.2 in oneM2M TS-0015 <a href="#_ref_i.2">[i.2]</a>.
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](media/image6.png)
**Figure 5.2.1-1: AE test configuration**
## 5.3 Test architecture
The approach for the implementation of an Abstract Protocol Tester selected in oneM2M follows the recommendation of the oneM2M Testing Framework oneM2M TS-0015 <a href="#_ref_i.2">[i.2]</a> where the TTCN-3 language and its architecture are recommended.
Following this recommendation the oneM2M tester architecture comprises a non-platform dependent Test Suite, and a platform dependent part.
![Figure 5.3-1: High level oneM2M Test Architecture](media/image7.png)
> 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**
- **oneM2M** **TTCN** **-3** **Abstract** **Test Suite:** the test suite is platform independent, and it is the cornerstone of the architecture. It allows a complete decoupling between the test suite and the rest of the test system. The test suite is composed of a complete set of test cases covering oneM2M requirements specified by oneM2M TS0001 <a href="#_ref_1">[1]</a> and oneM2M TS-0004 <a href="#_ref_2">[2]</a>.
- **oneM2M System Adaptor** **:** this is the platform dependent part that includes adaptors and codecs (out of the scope of the present document). This part of the architecture definition depends on the specific platform (e.g. Windows or Linux) and test tool on which the tester is going to run.
Figure 5.3-2 shows the oneM2M TTCN-3 test architecture design used for the oneM2M ATS. The Test Suite needs to interact with the System Adaptor to implement the collection of TTCN-3 test cases that are intended to be used to test the oneM2M IUTs.
The oneM2M TTCN-3 test cases implement the test algorithms specified in the TSS&TP document oneM2M TS0018 <a href="#_ref_7">[7]</a>, including verdict logic that allows pass/fail diagnosis.
The test algorithms use the interfaces defined in <a href="#_ref_1">[1]</a> and <a href="#_ref_2">[2]</a> (mca, mcc) in order to:
1. control the test event to be sent towards the IUT; and
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](media/image8.png)
**Figure 5.3-2: oneM2M Test Architecture**
The oneM2M primitive messages have been mapped into TTCN-3 structure. Through this mapping, the TTCN-3 is able to build and send these messages, as well as receive them via the ports defined above.
Additionally, the test cases are able to control and configure the test platform through a dedicated port called acPort while port utPort enables oneM2M TTCN-3 Test Component module to trigger specific action or behaviour on IUT. TTCN3 Test Components can also exchange information through a dedicated port called infoPort.
To build up a tester, the test platform needs to be also developed (out of scope). This test platform is composed of three adaptation layers:
- PA (Platform Adaptor) layer functionality implements the communication between the TTCN-3 modules and external elements that constitute the test tool such as timers and external functions. The External functions are a powerful resources supported by TTCN-3 language. An External function is a function declared at the TTCN-3 level but implemented at the native level.
- SA (System Adaptor) layer functionality is divided into two modules:
- oneM2M lower layers stack module implements the communication with the IUT and carries out the oneM2M primitives messages sent to or received from the IUT. This module is based on TCP or UDP depending on the binding supported by the IUT. The binding is a system adaptor parameter.
- Upper Tester Transport module implements functions that enable triggering specific actions or behaviour on the IUT.
- CODECS layer is the part of the tester to encode and decode messages between the TTCN-3 abstract internal data representation and the format required by the related base standard which the IUT understands. Several CODECS are required in oneM2M tester to cope with the bindings considered in oneM2M (HTTP, CoAP, MQTT) and the serialization methods (xml, json).
## 5.4 Ports and ASPs (Abstract Services Primitives)
### 5.4.0 Introduction
The oneM2M ATS implements the following ports:
- The mcaPort and mcaPortIn
- The mccPort and mccPortIn
- The acPort
- The utPort
- The InfoPort
### 5.4.1 mcaPort, mcaPortIn, mccPort, mccPortIn
These ports are used to send and receive the following message sets:
- Request Primitives messages in accordance with oneM2M TS-0004 <a href="#_ref_2">[2]</a>.
- Response Primitives messages in accordance with oneM2M TS-0004 <a href="#_ref_2">[2]</a>.
Two primitives are currently defined for these ports indicated as table 5.4.1-1:
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.
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.
Both primitives contain another parameters that permits to dynamically configure the test adaptor for every single sending. These parameters are:
- Host: IP address of the IUT
- XML Namespace
- Protocol binding
- Serialization
- ForceFields: used to force invalid or empty values to certain attributes. This behaviour shall be implemented by the System Adaptor.
**Table 5.4.1-1: Mapping of TTCN-3 Primitives to oneM2M Service Primitives**<a name="table_5.4.1-1"></a>
|TTCN-3 Primitive |oneM2M Message |Direction |IUT |
|-|-|-|-|
|M2MRequestPrimitive |Request Primitive |<=<br />=> |AE |
|M2MRequestPrimitive |Request Primitive |=><br /><= |CSE |
|M2MResponsePrimitive |Response Primitive |=><br /><= |AE |
|M2MResponsePrimitive |Response Primitive |=><br /><= |CSE |
### 5.4.2 mcnPort, mcnPortIn
These ports are used to send and receive the following message sets:
- Request Primitives messages in accordance with oneM2M TS-0004 <a href="#_ref_2">[2]</a>.
- Response Primitives messages in accordance with oneM2M TS-0004 <a href="#_ref_2">[2]</a>.
Two primitives are currently defined for these ports indicated:
1. The T8Request - to send T8 request messages to/from the IUT according to 3GPP TS 29.122 <a href="#_ref_8">[8]</a>.
- The T8Response - to receive T8 response messages to/from the IUT according to 3GPP TS 29.122 <a href="#_ref_8">[8]</a>.
Further primitives might be defined to support other underlying networks.
### 5.4.3 mccPortInternal
This port is used to send and receive the following message sets between TTCN-3 components:
- Request Primitives messages in accordance with oneM2M TS-0004 <a href="#_ref_2">[2]</a>.
- Response Primitives messages in accordance with oneM2M TS-0004 <a href="#_ref_2">[2]</a>.
### 5.4.4 utPort
#### 5.4.4.0 Introduction
The utPort is included in the oneM2M ATS in order to be able to stimulate the IUT and receive extra information from IUT upper layers. For instance, the utPort can be applied to automate AE testing shown as clause 5.4.4.1.
#### 5.4.4.1 Usage for Automated AE Testing
The utPort is in charge of the communication between TTCN-3 Test Component module in Test System and the Upper Tester Application in SUT.
Functionalities that TTCN-3 Test Component module and the Upper Tester Application are required to implement are listed as follows:
- TTCN-3 Test Component is able to configure the Test System and send standardized triggering commands to the SUT (Upper Tester Application).
- Upper Tester Application can process the triggering command messages received from Test System (TTCN-3 Test Component) and stimulates IUT to act following the corresponding triggering command (i.e. sending oneM2M service primitives to Test System through Mca port).
oneM2M service Primitive defined for utPort is listed as follows:
- The UtTrigger primitive is used to trigger upper layer events in IUT (i.e. sending oneM2M service primitives to Test System through Mca port).
- The UtTriggerAck primitive is used by IUT to send acknowledgement back to the Test System.
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.4.1-1.
![Figure 5.4.4.1-1: Example of automated AE test using Ut interface](media/image9.png)
**Figure 5.4.4.1-1: Example of automated AE test using Ut interface**
#### 5.4.4.2 Upper Tester Control Primitives
##### 5.4.4.2.1 Introduction
The upper tester triggering message is used to transport control commands between Test System and the Upper Tester Application. The control command will contain essential parameters that are required for certain test case.
The upper tester triggering message type maps to particular message formats for exchanging data and those message formats are defined by TTCN-3 primitive as shown at table 5.4.4.2.1-1, _U_ _tTrigger_ and _U_ _tTriggerAck_ primitive.
**Table 5.4.4.2.1-1: Mapping of TTCN-3 Primitives to oneM2M Service Primitives**<a name="table_5.4.4.2.1-1"></a>
|Upper Tester Control Message Type |TTCN-3 Primitives |Direction |Direction |
|-|-|-|-|
|Upper Tester Control Message Type |TTCN-3 Primitives |TS |UT |
|Trigger |UtTrigger Primitive |=> |=> |
|Trigger Acknowledgement |UtTriggerAck Primitive |<= |<= |
##### 5.4.4.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.4.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.4.2.2-1: Trigger message flow**
Table 5.4.4.2.2-1 defines UtTrigger and UtTriggerAck primitives including oneM2M data types to which are mapped as well as examples to show how to implement UtTrigger and UtTriggerAck primitives.
**Table 5.4.4.2.2-1: UtTrigger and UtTriggerAck Primitive**<a name="table_5.4.4.2.2-1"></a>
|Ut Control Primitive |Mapping to oneM2M data types |Description |Reference |Triggering Message |HTTP message |
|-|-|-|-|-|-|
|_UtTrigger_ _Primitive_ |_requestPrimitive_ |ONLY essential parameters included for certain test case<br /><br />See note 1 |oneM2M<br />TS-0004 <a href="#_ref_2">[2]</a> |**EXAMPLE** **1:**<br />If the test objective is to test **_"Test System triggers_** **_IUT_** **_to execute a test case for creation of &lt;_** **_AE_** **_> with labels attribute under a_** **_CSEBase_** **_resource_** ", then the triggering message would be serialized as following. |**EXAMPLE** **1:**<br />If the test objective is to test **_"Test System triggers_** **_IUT_** **_to execute a test case for creation of &lt;_** **_AE_** **_> with labels attribute under a_** **_CSEBase_** **_resource_** ", then the triggering message would be serialized as following. |
|_UtTrigger_ _Primitive_ |_requestPrimitive_ |ONLY essential parameters included for certain test case<br /><br />See note 1 |oneM2M<br />TS-0004 <a href="#_ref_2">[2]</a> |**Request**<br />{<br />"m2m:rqp" :{<br /> "op": 1, //indicate CREATE operation<br /> "ty": 2, //indicate AE resource type<br /> "to": {TEST\_SYSTEM\_ADDRESS},<br /> "pc": {<br /> "m2m:ae": {<br /> "lbl":"UNINITIALIZED" //indicate that attribute labels needs to be included<br /> },<br /> }<br /> "rvi": "2a"<br />}<br />} |**Request**<br />**POST** /{SUT\_UT\_APPLICATION\_URL} HTTP/1.1<br />**Host** : {SUT\_IP\_ADDRESS:PORT}<br />**Content-Length** : {PAYLOAD\_LENGTH}<br />**Content-Type** : **application/** **json**<br /><br />{<br />"m2m:rqp" :{<br /> "op": 1, //indicate CREATE operation<br /> "ty": 2, //indicate AE resource type<br /> "to": {TEST\_SYSTEM\_ADDRESS},<br /> "pc": {<br /> "m2m:ae": {<br /> "lbl":"UNINITIALIZED" //indicate that attribute labels needs to be included<br /> }<br /> },<br /> "rvi": "2a"<br />}<br />} |
|_UtTrigger_ _Primitive_ |_requestPrimitive_ |ONLY essential parameters included for certain test case<br /><br />See note 1 |oneM2M<br />TS-0004 <a href="#_ref_2">[2]</a> |**EXAMPLE** **2:** <br />If the test objective is to test "**_Test System triggers_** **_IUT_** **_to execute a test case for delete of a &lt;_** **_AE_** **_> resource._** ", then the triggering message would be serialized as following. |**EXAMPLE** **2:** <br />If the test objective is to test "**_Test System triggers_** **_IUT_** **_to execute a test case for delete of a &lt;_** **_AE_** **_> resource._** ", then the triggering message would be serialized as following. |
|_UtTrigger_ _Primitive_ |_requestPrimitive_ |ONLY essential parameters included for certain test case<br /><br />See note 1 |oneM2M<br />TS-0004 <a href="#_ref_2">[2]</a> |**Request**<br />{<br />"m2m:rqp" :{<br /> "op": 4, //indicate DELETE operation<br /> "to": {TARGET\_AE\_RESOURCE\_ADDRESS}, //indicate Target AE resource address<br /> "rvi": "2a"<br />}<br />} |**Request**<br />**POST** /{SUT\_UT\_APPLICATION\_URL} HTTP/1.1<br />**Host** : {SUT\_IP\_ADDRESS:PORT}<br />**Content-Length** : {PAYLOAD\_LENGTH}<br />**Content-Type** : **application/** **json**<br /><br />{<br />"m2m:rqp" :{<br /> "op": 4, //indicate DELETE operation<br /> "to": {TARGET\_AE\_RESOURCE\_ADDRESS}, //indicate Target AE resource address<br /> "rvi": "2a"<br />}<br />} |
|_UtTriggerPrimitive_ |_N/A_ |Special upper tester commands |N/A |**"RESET"** |**Request**<br />**POST** /{SUT\_UT\_APPLICATION\_URL} HTTP/1.1<br />**Host** : {SUT\_IP\_ADDRESS:PORT}<br />**X-M2M-UTCMD: Reset**<br /> |
|_UtTrigger_ _Ack_ _Primitive_ |_responsePrimitive_ |ONLY responseStatusCode attribute included<br /><br />See note 2 |oneM2M TS-0004 <a href="#_ref_2">[2]</a> |**Response**<br />{<br /> "m2m:rsp": {<br /> "rsc": 2000<br /> }<br /><br />}<br />For any triggering response, it only contains a response status code, and the response status code for the triggering operation can only be set to either 2000 (OK) or 4000 (BAD\_REQUEST) according to the rules for triggering operations. |**Response**<br />HTTP/1.1 200 OK<br />X-M2M-RSC: 2000 |
|NOTE 1: Additional rules defined in table 5.4.4.2.2-3 are also applied.<br />NOTE 2: Attribute response status code is defined at table 5.4.4.2.2-3. |NOTE 1: Additional rules defined in table 5.4.4.2.2-3 are also applied.<br />NOTE 2: Attribute response status code is defined at table 5.4.4.2.2-3. |NOTE 1: Additional rules defined in table 5.4.4.2.2-3 are also applied.<br />NOTE 2: Attribute response status code is defined at table 5.4.4.2.2-3. |NOTE 1: Additional rules defined in table 5.4.4.2.2-3 are also applied.<br />NOTE 2: Attribute response status code is defined at table 5.4.4.2.2-3. |NOTE 1: Additional rules defined in table 5.4.4.2.2-3 are also applied.<br />NOTE 2: Attribute response status code is defined at table 5.4.4.2.2-3. |NOTE 1: Additional rules defined in table 5.4.4.2.2-3 are also applied.<br />NOTE 2: Attribute response status code is defined at table 5.4.4.2.2-3. |
**Table 5.4.4.2.2-2: Definition of special Upper Tester commands**<a name="table_5.4.4.2.2-2"></a>
|Value |Interpretation |
|-|-|
|Reset |Inidicates that the IUT should reset |
**Table 5.4.4.2.2-3: Rules for defining UtTrigger and UtTriggerAck primitives**<a name="table_5.4.4.2.2-3"></a>
|**UtTrigger** **primitive** **is** **represented** **in** **requestPrimitive** **serialized** **in** **JSON** **format.** <br />**UtTrigger** **primitive** **shall** **be** **interpreted** **as** **follows:**<br />Any attribute/parameter containing a value shall be present and equal in the triggered request primitive.<br />Any attribute/parameter containing "UNINITIALIZED" value shall be present in the triggered request primitive.<br />Any other attribute/parameter shall comply with oneM2M TS-0004 <a href="#_ref_2">[2]</a>.<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. |
**Table 5.4.4.2.2-4: Definition of ResponseStatusCode for UtTriggerAck primitive**<a name="table_5.4.4.2.2-4"></a>
|Response Status Code Description |Response Status Code Value |Interpretation |
|-|-|-|
|OK |2000 |The SUT receives successfully the triggering message from Test System |
|BAD\_REQUEST |4000 |The SUT does not interpret correctly the UtTrigger primitive |
|NOTE: Only above two response status codes are allowed to use in UtTriggerAck primitive. |NOTE: Only above two response status codes are allowed to use in UtTriggerAck primitive. |NOTE: Only above two response status codes are allowed to use in UtTriggerAck primitive. |
##### 5.4.4.2.3 Control Communication Protocol
Protocol used for proceeding communications between Test System and Upper Tester Application is designated to the Hypertext Transfer Protocol (HTTP) protocol owning it is an application protocol that is widely supported by most all IoT devices and various intrinsic features such as persistent connection, ease of programming, flexibility, etc.
##### 5.4.4.2.4 Control Message Serialization
Control commands that are wrapped within a request body of HTTP message shall be serialized into JavaScript Object Notation (JSON) because it is very lightweight and easy to parse and generate for machines.
### 5.4.5 acPort
The acPort is included in the oneM2M ATS in order to be able to control and configure the test adaptor for specific cases.
### 5.4.6 infoPort
The infoPort is included in the oneM2M ATS in order for the TTCN-3 test components to be able to exchange information such as last response primitives or request primitives received by a component, retrieved primitive contents.
## 5.5 Test components
### 5.5.1 Tester
The Tester test component includes a set of ports, timers and variables that are common to the other defined components which are described in table 5.5.1-1.
**Table 5.5.1-1: Tester component elements**<a name="table_5.5.1-1"></a>
|Name |Instance type |Element type |Description |
|-|-|-|-|
|acPort |port |AdapterControlPort |Port that communicates with the adapter for sending configuration parameters |
|infoPort |port |InfoPort |Port between test components for exchanging information |
|utPort |port |UpperTesterPort |Port that communicates with the UT Application for triggering actions on the IUT |
|tc\_ac |timer |N/A |Timer for the reception of a message |
|tc\_wait |timer |N/A |Timer for the reaction of the IUT to an upper tester primitive |
|tc\_done |Timer |N/A |Timer for waiting completion of a component behaviour |
|vc\_config |variable |Configurations |Configuration being used for the given test case |
|vc\_testSystemRole |variable |TestSystemRole |Role of the test component |
|vc\_componentRegistered |variable |boolean |Flag to indicate when a component has registered to the IUT |
|vc\_resetRequired |variable |Boolean |Flag to indicate whether a reset of the IUT is necessary |
|vc\_resourcesList |variable |MyResourcesList |List of all resources created by the test system on the IUT |
|vc\_resourcesIndexToBeDeleted |variable |IntegerList |List of indexes of resources created by the test system on the IUT that need to be deleted |
|vc\_acpIndex |variable |integer |Index of accessControlPolicy resource used by the test system by default (when required) |
|vc\_request |variable |MsgIn |Latest request primitive received/sent |
|vc\_response |variable |MsgIn |Latest response primitive received/sent |
|vc\_aeSimu |variable |default |Reference to the default behaviour for an AeSimu component |
|vc\_cseSimu |variable |default |Reference to the default behaviour for an CseSimu component |
|vc\_primitiveContentRetrievedResource |variable |PrimitiveContent |Latest content of a RETRIEVE operation |
|vc\_myInterfaces |variable |Interfaces |Parameters for the ports of the given component:<br />Port (mcaPort, mcaPortIn, mccPort, mccPortIn)<br />Host (SUT IP address :port)<br />Protocol binding<br />Serialization |
Note that vc\_aeSimu and vc\_cseSimu are not common to the other defined test components, but those variables are required in Tester for the correct activation/deactivation of default behaviours.
### 5.5.2 AeSimu
The AeSimu test component extends the Tester component by adding elements specific to an AE entity. Table 5.5.2-1 summarizes those elements.
**Table 5.5.2-1: AeSimu component elements**<a name="table_5.5.2-1"></a>
|Name |Instance type |Element type |Description |
|-|-|-|-|
|mcaPort |port |OneM2MPort |Port that implements the mca interface when test system is the client (sending requests) |
|mcaPortIn |port |OneM2MPort |Port that implements the mca interface when test system is the server (receiving requests) |
|vc\_ae2 |test component |AeSimu |Reference to the AE2 component when required |
|vc\_cse1 |test component |CseSimu |Reference to the CSE1 component when CF02 is used |
|vc\_ae1 |test component |AeSimu |Reference to the AE1 component when required |
|vc\_das |test component |AeSimu |Reference to the DAS component when required |
|vc\_aeSimuDesc |variable |AeSimuComponentDesc |Component configuration extracted from required (AE1 or AE2) tester pixit |
|vc\_dasSimuDesc |variable |AeSimuComponentDesc |Component configuration extracted from DAS tester pixit |
|vc\_auxiliaryAe2Up |variable |boolean |Flag to indicate that AE2 component has been started |
|vc\_aeIndex |variable |integer |Index of the AE resource in vc\_resourcesList created by AeSimu component |
### 5.5.3 CseSimu
The CseSimu test component extends the Tester component by adding elements specific to an CSE entity. Table 5.5.3-1 summarizes those elements.
**Table 5.5.3-1: CseSimu component elements**<a name="table_5.5.3-1"></a>
|Name |Instance type |Element type |Description |
|-|-|-|-|
|mcaPort |port |OneM2MPort |Port that implements the mca interface when test system is the client (sending requests) |
|mcaPortIn |port |OneM2MPort |Port that implements the mca interface when test system is the server (receiving requests) |
|mccPort |port |OneM2MPort |Port that implements the mcc interface when test system is the client (sending requests) |
|mccPortIn |port |OneM2MPort |Port that implements the mcc interface when test system is the server (receiving requests) |
|mccPortInternal |port |OneM2MPortInternal |Port that implements the mcc and mcc' interfaces between TTCN-3 components |
|vc\_ae1 |test component |AeSimu |Reference to the AE1 component when CF02 (CseSimu as master) is used |
|vc\_cse2 |test component |CseSimu |Reference to the CSE1 component when required |
|vc\_cseSimuDesc |variable |CseSimuComponentDesc |Component configuration extracted from required (CSE1 or CSE2) tester pixit |
|vc\_localResourcesList |variable |MyResourcesList |List of all resources created by the IUT on the test system |
|vc\_localCSEBaseAnncIndex |variable |integer |Index of the CSEBaseAnnc resource corresponding to the IUT |
|vc\_localRemoteCseIndex |variable |integer |Index of the remoteCSE resource in vc\_localResourcesList representing the IUT (CSE) |
|vc\_remoteCseIndex |variable |integer |Index of the remoteCSE resource in vc\_resourcesList representing the CseSimu component |
|vc\_cSEBaseIndex |variable |integer |Index of the CSEBase resource in vc\_localResourcesList of the CseSimu component |
|vc\_cseType |variable |CseTypeID |CSE type of the test system (default is MN) |
|vc\_auxiliaryCse2Up |variable |boolean |Flag to indicate that CSE2 component has been started |
### 5.5.4 ScefSimu
The ScefSimu test component extends the Tester component by adding elements specific to an SCEF entity. Table 5.5.4-1 summarizes those elements.
**Table 5.5.4-1: ScefSimu component elements**<a name="table_5.5.4-1"></a>
|Name |Instance type |Element type |Description |
|-|-|-|-|
|mcnPort |port |OneM2MPort |Port that implements the mcn interface when test system is the client (sending requests) |
|mcnPortIn |port |OneM2MPort |Port that implements the mcn interface when test system is the server (receiving requests) |
|vc\_ae1 |test component |AeSimu |Reference to the AE1 component when required |
|vc\_cse2 |test component |CseSimu |Reference to the CSE1 component when required |
|vc\_aeSimuDesc |variable |AeSimuComponentDesc |Component configuration extracted from required (AE1) tester pixit |
|vc\_cseSimuDesc |variable |CseSimuComponentDesc |Component configuration extracted from required (CSE1) tester pixit |
|vc\_cseType |variable |CseTypeID |CSE type of the test system (default is MN) |
|vc\_scefSimuDesc |variable |ScefSimuComponentDesc |Component configuration extracted from required (SCEF) tester pixit |
|vc\_configurations |variable |NiddConfigurations |NIDD configurations of SCEF component |
## 5.6 Test strategy
This clause introduces the test strategy being used for the TTCN-3 test cases. The chosen strategy permits to have a clear structure of the code that facilitates an easy navigation throw the different test steps.
The use of the TTCN-3 MTC and PTC(s) is as depicted in figure 5.6-1.
**Figure 5.6-1: Use of TTCN-3 components**
At the start of the test case execution, the MTC is created. Then, the MTC executes the following steps:
- Step 1) initialization of the master PTC.
- Step 2) initialization of some parameters if required for the permutation test cases.
- Step 3) running of the appropriate function on the master PTC. The function run on the master PTC implements a given Test Purpose. Such function follows a code structure as indicated here below:
- Local Variables, declaration of local variables.
- Test Control, checking IUT capability parameters required for the proper execution of the test.
- Test Component Configuration, that initializes the given test component and other test components acting as slave PTC(s) as required by a given configuration.
- Test adapter configuration, that configures the test adapter throw the acPort if required.
- Preamble, that implements the necessary test steps as described in the Initial conditions of a Test Purpose. It may also implement additional test steps which are required for the correct execution of the test.
- Test body, that implements the test steps as described in the Expected behaviour of a Test Purpose.
- Postamble, that implements the necessary test steps to bring the IUT back to the initial state.
- Tear down, that finalizes properly the TTCN-3 ports used by the different test components depending on the configuration.
While master PTC follows the test structure described above, slave PTC(s) run only certain procedures, usually one by one, as mandated by the master PTC.
A procedure usually implements a oneM2M request-response exchange between a given PTC and the IUT, although it can implement any other specific action (sending or reception of a message, several request-response exchanges, etc.).
- Step 4) checking of some parameters if required for the permutation test cases.
This test strategy may slightly vary for certain cases where specific requirements need to be fulfilled.
# 6 Untestable Test Purposes
Void.
# 7 ATS Conventions
## 7.0 Introduction
The ATS conventions are intended to give a better understanding of the ATS but they also describe the conventions made for the development of the ATS. These conventions shall be considered during any later maintenance or further development of the ATS.
The ATS conventions contain two clauses, the naming conventions and the implementation conventions. The naming conventions describe the structure of the naming of all ATS elements. The implementation conventions describe the functional structure of the ATS.
To define the ATS, the guidelines of oneM2M TS-0015 <a href="#_ref_i.2">[i.2]</a> were considered.
## 7.1 Testing conventions
### 7.1.1 Testing states
#### 7.1.1.1 Initial state
All test cases start with the function f\_preamble\_XYZ. This function brings the IUT in an "initialized" state by performing some actions such as registration of AE, creation of auxiliary access control policy resource, creation of additional needed resources.
#### 7.1.1.2 Final state
All test cases end with the function f\_postamble\_XYZ. This function brings the IUT back in an "idle" state which means deletion of all created resources being used by the test case so that next test case execution is not disturbed.
As necessary, further actions may be included in the f\_postamble functions.
## 7.2 Naming conventions
### 7.2.1 General guidelines
This test suite follows the naming convention guidelines provided in oneM2M TS-0015 <a href="#_ref_i.2">[i.2]</a>.
The naming convention is based on the following underlying principles:
- in most cases, identifiers should be prefixed with a short alphabetic string (specified in table 7.2.1-1) indicating the type of TTCN3 element it represents;
- suffixes should not be used except in those specific cases identified in table 7.2.1-1;
- prefixes and suffixes should be separated from the body of the identifier with an underscore ("\_");
`EXAMPLE 1: c\_sixteen, t\_wait.`
- only module names, data type names and module parameters should begin with an uppercase letter. All other names (i.e. the part of the identifier following the prefix) should begin with a lowercase letter;
- the start of second and subsequent words in an identifier should be indicated by capitalizing the first character. Underscores should not be used for this purpose.
`EXAMPLE 2: f\_initialState.`
Table 7.2.1-1 specifies the naming guidelines for each element of the TTCN3 language indicating the recommended prefix, suffixes (if any) and capitalization.
**Table 7.2.1-1: TTCN-3 generic naming conventions**<a name="table_7.2.1-1"></a>
|Language element |Naming convention |Prefix |Example identifier |
|-|-|-|-|
|Module |Use upper-case initial letter |none |OneM2M\_Templates |
|Group within a module |Use lower-case initial letter |none |messageGroup |
|Data type |Use upper-case initial letter |none |SetupContents |
|Message template |Use lower-case initial letter |m\_ |m\_setupInit |
|Message template with wildcard or matching expression |Use lower-case initial letters |mw\_ |mw\_anyUserReply |
|Signature template |Use lower-case initial letter |s\_ |s\_callSignature |
|Port instance |Use lower-case initial letter |none |signallingPort |
|Test component instance |Use lower-case initial letter |none |userTerminal |
|Constant |Use lower-case initial letter |c\_ |c\_maxRetransmission |
|Constant (defined within component type) |Use lower-case initial letter |cc\_ |cc\_minDuration |
|External constant |Use lower-case initial letter |cx\_ |cx\_macId |
|Function |Use lower-case initial letter |f\_ |f\_authentication() |
|External function |Use lower-case initial letter |fx\_ |fx\_calculateLength() |
|Altstep (incl. Default) |Use lower-case initial letter |a\_ |a\_receiveSetup() |
|Test case |Use ETSI numbering |TC\_ |TC\_COR\_0009\_47\_ND |
|Variable (local) |Use lower-case initial letter |v\_ |v\_macId |
|Variable (defined within a component type) |Use lower-case initial letters |vc\_ |vc\_systemName |
|Timer (local) |Use lower-case initial letter |t\_ |t\_wait |
|Timer (defined within a component) |Use lower-case initial letters |tc\_ |tc\_authMin |
|Module parameters for PICS |Use all upper case letters |PICS\_ |PICS\_DOOROPEN |
|Module parameters for other parameters |Use all upper case letters |PX\_ |PX\_TESTER\_STATION\_ID |
|Formal Parameters |Use lower-case initial letter |p\_ |p\_macId |
|Enumerated Values |Use lower-case initial letter |e\_ |e\_syncOk |
### 7.2.2 oneM2M specific TTCN-3 naming conventions
Next to such general naming conventions, table 7.2.2-1 shows specific naming conventions that apply to the oneM2M TTCN-3 ATS.
**Table 7.2.2-1: oneM2M specific TTCN-3 naming conventions**
|Language element |Naming convention |Prefix |Example identifier |
|-|-|-|-|
|oneM2M Module |Use upper-case initial letter |OneM2M\_ |OneM2M\_Testcases\_ |
|Module containing oneM2M types |Use upper-case initial letter |OneM2M\_Types |OneM2M\_Types |
|Module containing types and values |Use upper-case initial letter |OneM2M\_TypesAndValues |OneM2M\_TypesAndValues |
|Module containing Templates |Use upper-case initial letter |OneM2M\_Templates |OneM2M\_Templates |
|Module containing test cases |Use upper-case initial letter |OneM2M\_Testcases |OneM2M\_Testcases |
|Module containing functions |Use upper-case initial letter |OneM2M\_Functions |OneM2M\_Functions |
|Module containing external functions |Use upper-case initial letter |OneM2M\_ExternalFunctions |OneM2M\_ExternalFunctions |
|Module containing components, ports and message definitions |Use upper-case initial letter |OneM2M\_TestSystem |OneM2M\_TestSystem |
|Module containing module parameters |Use upper-case initial letter |OneM2M\_Pixits |OneM2M\_Pixits |
### 7.2.3 Usage of Log statements
All TTCN-3 log statements use the following format using the same order:
- The TTCN-3 test case or function identifier in which the log statement is defined.
- One of the categories of log: INFO, WARNING, ERROR, TIMEOUT, NONE.
- Free text.
`EXAMPLE 1: **log** ("f\_utInitializeIut: INFO: IUT initialized");`
Furthermore, the following rules are applied too:
- All TTCN-3 setverdict statements are combined (as defined in TTCN-3 - ETSI ES 201 873-1 <a href="#_ref_6">[6]</a>) with a log statement following the same above rules (see example 2).
`EXAMPLE 2: **setverdict** (**pass** , "TC\_ONEM2M\_CSE\_DMR\_CRE\_001: Received correct message");`
### 7.2.4 Test Case (TC) identifier
**Table 7.2.4-1: TC naming convention**<a name="table_7.2.4-1"></a>
|Identifier: |TC\_&lt;root>\_&lt;gr>\_&lt;sgr>\_&lt;nn>\_&lt;per> | | |
|-|-|-|-|
| |&lt;root> = root |ONEM2M |oneM2M |
| |&lt;gr> = group |CSE |CSE testing |
| | |AE |AE testing |
| |&lt;sgr> = subgroup |REG |Registration |
| | |DMR |Data Management and Repository |
| | |SUB |Subscription and Notification |
| | |GMG |Group Management |
| | |DIS |Discovery |
| | |LOC |Location |
| | |DMG |Device Management |
| | |CMDH |Communication Management and Delivery Handling |
| | |SEC |Security |
| |&lt;nn> = sequential number | |001 to 999 |
| |&lt;per> = permutation |P1\_P2\_..PN |Permutation parameters |
`EXAMPLE: TP identifier: TP/oneM2M/CSE/DMR/CRE/001`
`TC identifier: TC\_ONEM2M\_CSE\_DMR\_CRE\_001.`
## 7.3 IXIT
The following parameters are used by the oneM2M ATS for the correct execution of the test cases.
**Table 7.3-1: oneM2M ATS IXITs**<a name="table_7.3-1"></a>
|GROUP |IXIT NAME |DESCRIPTION |DEFAULT VALUE |
|-|-|-|-|
|IutParameters |PX\_IN\_CSE |MN-CSE |True |
|IutParameters |PX\_MN\_CSE |IN-CSE |False |
|IutParameters |PX\_ASN\_CSE |ASN-CSE |False |
|IutParameters |PX\_SUT\_ADDRESS |SUT address |"127.0.0.1:8080" |
|IutParameters |PX\_UT\_IMPLEMENTED |Upper Tester implemented |False |
|IutParameters |PX\_CSE\_NAME |IUT CSE Name |"cseName" |
|IutParameters |PX\_CSE\_ID |IUT CSE-ID with SP-relative-CSE-ID format (relative) according to oneM2M TS-0001 <a href="#_ref_1">[1]</a>, table 7.2-1 |"/cseId" |
|IutParameters |PX\_CSE\_RESOURCE\_ID |IUT CSE resource ID with Unstructured-CSE-relative-Resource-ID (relative) format according to oneM2M<br />TS-0001 <a href="#_ref_1">[1]</a>, table 7.2-1 |"cseResourceId" |
|IutParameters |PX\_SP\_ID |IUT M2M-SP-ID with M2M-SP-ID format (absolute) according to oneM2M TS-0001 <a href="#_ref_1">[1]</a>, table 7.2-1 Unstructured-CSE-relative -Resource-ID |"//om2m.org" |
|IutParameters |PX\_SUPER\_AE\_ID |AE-ID with privileges to CREATE at the IUT CSEBase with AE-ID-Stem format (relative) according to oneM2M TS-0001 <a href="#_ref_1">[1]</a>, table 7.2-1 |"admin:admin" |
|IutParameters |PX\_SUPER\_CSE\_ID |CSE-ID with privileges to CREATE at the IUT CSEBase with SPrelative-CSE-ID format (relative) according to oneM2M TS-0001 <a href="#_ref_1">[1]</a>, table 7.2-1 |"/admin:admin" |
|IutParameters |PX\_ALLOWED\_C\_AE\_IDS | |{"C-AllowedAeId"} |
|IutParameters |PX\_NOT\_ALLOWED\_C\_AE\_IDS | |{"C-NotAllowedAeId"} |
|IutParameters |PX\_ALLOWED\_S\_AE\_IDS | |{"S-AllowedAeId"} |
|IutParameters |PX\_NOT\_ALLOWED\_S\_AE\_IDS | |{"S-NotAllowedAeId"} |
|IutParameters |PX\_NOT\_ALLOWED\_APP\_ID | |"NotAllowedAppId" |
|IutParameters |PX\_ADDRESSING\_METHOD |Addressing method |e\_hierarchical |
|IutParameters |PX\_PRIMITIVE\_SCOPE |Primitive scope |e\_cseRelative |
|IutParameters |PX\_WS\_PROTOCOL |WebSocket protocol |"oneM2M.R2.0.xml" |
|IutParameters |PX\_REQUEST\_URI |WebSocket context |"/" |
|IutParameters |PX\_HOSTING\_CSE\_ID |Hosting CSE-ID for MQTT |"CSE-ID" |
|IutParameters |PX\_CREDENTIAL\_ID |Credential-ID for MQTT |"admin:admin" |
|IutParameters |PX\_XML\_NAMESPACE |XML Namespace |"m2m=""http://www.onem2m.org/xml/protocols""" |
|IutParameters |PX\_ACOR |AccessControlOriginators |{"all"} |
|IutParameters |PX\_TCONFIG\_IUT |Time to configure IUT after a requested action |10.0 |
|TesterParameters |PX\_TS\_AE1 |AE1 component settings |aeIdStem = ""<br />appId = "NMyApp1Id"<br />mcaPort and mcaPortIn settings which include per port the following info:<br />Binding:<br /> - bindingProtocol<br /> - bindingDesc:<br /> - tsAddress<br /> - localPort<br /> - sutAddress<br /> - remotePort<br />Serialization |
|TesterParameters |PX\_TS\_AE2 |AE2 component settings |aeIdStem = ""<br />appId = "NMyApp2Id"<br />mcaPort and mcaPortIn settings which include per port the following info:<br />Binding:<br /> - bindingProtocol<br /> - bindingDesc:<br /> - tsAddress<br /> - localPort<br /> - sutAddress<br /> - remotePort<br />Serialization |
|TesterParameters |PX\_TS\_CSE1 |CSE1 component settings |cseName = "CSE1\_NAME"<br />cseId = "/CSE1\_ID"<br />cseResourceId = "CSE1\_RESOURCE\_ID"<br />spId = "//onem2m.org"<br />supportedResourceType = {int1, int2, int3, int16}<br />mcaPort, mcaPortIn, mccPort and mccPortIn settings which include per port the following info:<br />Binding:<br /> - bindingProtocol<br /> - bindingDesc:<br /> - tsAddress<br /> - localPort<br /> - sutAddress<br /> - remotePort<br />Serialization |
|TesterParameters |PX\_TS\_CSE2 |CSE2 component settings |cseName = "CSE2\_NAME"<br />cseId = "/CSE2\_ID"<br />cseResourceId = "CSE2\_RESOURCE\_ID"<br />spId = "//onem2m.org"<br />supportedResourceType = {int1, int2, int3, int16}<br />mcaPort, mcaPortIn, mccPort and mccPortIn settings which include per port the following info:<br />Binding:<br /> - bindingProtocol<br /> - bindingDesc:<br /> - tsAddress<br /> - localPort<br /> - sutAddress<br /> - remotePort<br />Serialization |
| |PX\_TS\_DAS |DAS1 component settings |aeIdStem = ""<br />appId = ""<br />mcaPort and mcaPortIn settings which include per port the following info:<br />Binding:<br /> - bindingProtocol<br /> - bindingDesc:<br /> - tsAddress<br /> - localPort<br /> - sutAddress<br /> - remotePort<br />Serialization |
| |PX\_TS\_UT |UpperTester settings |url = "http://127.0.0.1:43000/" |
|ExecutionParameters |PX\_RESOURCES\_TO\_BE\_DELETED |(For debugging purposes) |{"MyAe", "MyAccessControlPolicyResource", "SubscriptionVerificationAcp", "MyAcp", "MyRemoteCSEResource"} |
|ExecutionParameters |PX\_RUN\_POSTAMBLE |(For debugging purposes) |true |
|ExecutionParameters |PX\_CERTIFICATE\_PATH |charstring |"" |
|ExecutionParameters |PX\_CERTIFICATE\_NAME |charstring |"" |
|ExecutionParameters |PX\_PAIRWISEKEY\_METHOD |PairwiseKeyMethod |e\_establish |
|ExecutionParameters |PX\_KEY\_PROVISION |Provisioned |e\_preProvisioning |
# 8 TTCN-3 Verifications
The principles for Verifying the TTCN-3 test code are given in oneM2M TS-0015 <a href="#_ref_i.2">[i.2]</a>.
All test cases provided with the present document in annex A which correspond to at least one of the product profiles defined in oneM2M TS-0025 <a href="#_ref_i.3">[i.3]</a> have been verified at the time of publication of the present document which corresponds with the TTCN-3 code gitlab tag provided in annex A.
# Annex A (normative): 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 <a href="#_ref_6">[6]</a>.
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/TS-0019-baseline-v4\_0\_0](https://git.onem2m.org/TST/ATS/-/tags/TS-0019-baseline-v4\_0\_0)
<br />
# Annex B (informative): 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".
# History
|**Publication history** |**Publication history** |**Publication history** |
|-|-|-|
|V4.0.0 |2022-05-09 |Base document from TS-0019 v3.3.1 |
| | | |
media/image1.png

4.71 KiB

media/image2.png

50.6 KiB

media/image3.png

52 KiB

media/image4.png

51.6 KiB

media/image5.png

36.5 KiB

media/image6.png

50.7 KiB

media/image7.png

117 KiB

media/image8.png

62.1 KiB

media/image9.png

118 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment