CoAP Test Suite

CoAP Protocol

CoAP is a specialized Internet Application Protocol for constrained devices, as defined in RFC 7252
The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained (e.g., low-power, lossy) networks. The nodes often have 8-bit microcontrollers with small amounts of ROM and RAM, while constrained networks such as IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs) often have high packet error rates and a typical throughput of 10s of kbit/s. The protocol is designed for machine- to-machine (M2M) applications such as smart energy and building automation.

Note

We provide an annotated version of the official RFC which can be directly referenced (e.g. [CoAP-3.0-3] or [CoAP-3.0-4])

Test Configurations

The concrete CoAP test configurations are listed below:

ID: CoAP_Conf_01
Description: The CoAP Server is the IUT and the TS takes the role of a CoAP Client
CoAP Test Configuration 01
ID: CoAP_Conf_02
Description: The CoAP Server is the IUT and the TS takes the role of multiple CoAP Clients.
CoAP Test Configuration 02
ID: CoAP_Conf_03
Description: The CoAP Client is the IUT and the TS takes the role of a CoAP Server. For this configuration an optional UT might be required.
CoAP Test Configuration 03
ID: CoAP_Conf_04
Description: As well the CoAP Server as the CoAP Client, each is a IUT in this configuration. The part of the UT from the previous configuration is here replaced by a concrete application.
CoAP Test Configuration 04

Test Purposes

TODO: link to .tplan2 from GitHub and .pdf from ETSI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  Test Purpose {
     TP Id TP_CoAP_MessageFormat_Header_Version_001

     Test objective
     "The IUT is responding on a correctly set version number."

     Reference
     "RFC7252#section-3", "https://tools.ietf.org/html/rfc7252#section-3",
     "RFC7252#section-4.1", "https://tools.ietf.org/html/rfc7252#section-4.1",
     "RFC7252#section-4.2 (b)", "https://tools.ietf.org/html/rfc7252#section-4.2"

     PICS Selection PIC_Server

     Expected behaviour
     ensure that {
        when {
           the IUT entity receives a request message containing
              version indicating value 1,
              msg_type indicating value 0, //Confirmable
              token_length indicating value 0,
              code indicating value 0.00, //Empty Message
              msg_id corresponding to MSG_ID1;
        } then {
           the IUT entity sends a response message containing
              version indicating value 1,
              msg_type indicating value 3, //Reset
              token_length indicating value 0,
              code indicating value 0.00, //Empty Message
              msg_id corresponding to MSG_ID1;
           or the client entity times_out //from section 4.2 (b)
        }
     }
  }

Test System

TODO: describe Test System -> TTCN-3 code

Test Cases

You can find all CoAP Tests on GitHub.

testcase TC_COAP_SERVER_001() runs on MTC_CT
{
  map(self:p, system:p);
  f_TC_COAP_SERVER_001();
  unmap(self:p, system:p);
}

Test Case Functions

TODO: describe a CoAP Test Case Function

function f_TC_COAP_SERVER_001() runs on MTC_CT
{
  f_sendMessage(m_coapPingMessage);
  f_receiveMessage(m_coapEmptyMessage);
}

Translation Port

TODO: Explain translation port

Generic Functions

TODO: describe MQTT_Functions module

Test Templates

TODO: describe templates

Default Behaviours

TODO: describe the default behaviours

See also

CoAP Plugtests 1: Guide
ETSI CTI Plugtests Guide (First Draft V0.0.16 2012-03) for achieving interoperability
CoAP Plugtests 1: Report
The 1st CoAP Plugtest was held from 24 to 25 March 2012 in Paris, France and was co-located with IETF#83. This event was jointly organized by ETSI, IPSO Alliance and the FP7 Probe-IT project1.