Context Information Management (CIM); NGSI-LD Test Purposes Descriptions

DGS/CIM-0013v111

General Information

Status
Not Published
Current Stage
12 - Completion
Due Date
04-May-2021
Completion Date
26-May-2021
Ref Project

Buy Standard

Standard
ETSI GS CIM 013 V1.1.1 (2021-05) - Context Information Management (CIM); NGSI-LD Test Purposes Descriptions
English language
187 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

ETSI GS CIM 013 V1.1.1 (2021-05)






GROUP SPECIFICATION
Context Information Management (CIM);
NGSI-LD Test Purposes Descriptions
Disclaimer
The present document has been produced and approved by the cross-cutting Context Information Management (CIM) ETSI
Industry Specification Group (ISG) and represents the views of those members who participated in this ISG.
It does not necessarily represent the views of the entire ETSI membership.

---------------------- Page: 1 ----------------------
2 ETSI GS CIM 013 V1.1.1 (2021-05)

Reference
DGS/CIM-0013v111
Keywords
API, IoT, TESTING

ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00  Fax: +33 4 93 65 47 16

Siret N° 348 623 562 00017 - APE 7112B
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° w061004871

Important notice
The present document can be downloaded from:
http://www.etsi.org/standards-search
The present document may be made available in electronic versions and/or in print. The content of any electronic and/or
print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any
existing or perceived difference in contents between such versions and/or in print, the prevailing version of an ETSI
deliverable is the one made publicly available in PDF format at www.etsi.org/deliver.
Users of the present document should be aware that the document may be subject to revision or change of status.
Information on the current status of this and other ETSI documents is available at
https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx
If you find errors in the present document, please send your comment to one of the following services:
https://portal.etsi.org/People/CommiteeSupportStaff.aspx
Notice of disclaimer & limitation of liability
The information provided in the present deliverable is directed solely to professionals who have the appropriate degree of
experience to understand and interpret its content in accordance with generally accepted engineering or
other professional standard and applicable regulations.
No recommendation as to products and services or vendors is made or should be implied.
No representation or warranty is made that this deliverable is technically accurate or sufficient or conforms to any law
and/or governmental rule and/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.
In no event shall ETSI be held liable for loss of profits or any other incidental or consequential damages.

Any software contained in this deliverable is provided "AS IS" with no warranties, express or implied, including but not
limited to, the warranties of merchantability, fitness for a particular purpose and non-infringement of intellectual property
rights and ETSI shall not be held liable in any event for any damages whatsoever (including, without limitation, damages
for loss of profits, business interruption, loss of information, or any other pecuniary loss) arising out of or related to the use
of or inability to use the software.
Copyright Notification
No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and
microfilm except as authorized by written permission of ETSI.
The content of the PDF version shall not be modified without the written authorization of ETSI.
The copyright and the foregoing restriction extend to reproduction in all media.

© ETSI 2021.
All rights reserved.

ETSI

---------------------- Page: 2 ----------------------
3 ETSI GS CIM 013 V1.1.1 (2021-05)
Contents
Intellectual Property Rights . 5
Foreword . 5
Modal verbs terminology . 5
1 Scope . 6
2 References . 6
2.1 Normative references . 6
2.2 Informative references . 6
3 Definition of terms, symbols and abbreviations . 6
3.1 Terms . 6
3.2 Symbols . 7
3.3 Abbreviations . 7
4 Test Purposes Descriptions . 7
4.1 Context Information . 7
4.1.1 Provision . 7
4.1.1.1 Entities . 7
4.1.1.1.1 Create Entity . 7
4.1.1.1.2 Delete Entity . 14
4.1.1.2 Batch Entities . 16
4.1.1.2.1 Create batch of Entities. 16
4.1.1.2.2 Upsert batch of Entities . 23
4.1.1.2.3 Update batch of Entities . 28
4.1.1.2.4 Delete batch of Entities. 31
4.1.1.3 Temporal Entity . 33
4.1.1.3.1 Create temporal representation of Entity . 33
4.1.1.3.2 Update temporal representation of Entity . 35
4.1.1.3.3 Add Attributes to Temporal Representation of an Entity . 36
4.1.1.3.4 Delete Attribute from Temporal Representation of an Entity. 38
4.1.1.3.5 Partial update Attribute instance in Temporal Representation of an Entity . 42
4.1.1.3.6 Delete Attribute instance from Temporal Representation of an Entity. 47
4.1.1.3.7 Delete temporal representation of Entity . 51
4.1.1.4 Entity Attributes . 53
4.1.1.4.1 Append Entity Attributes . 53
4.1.1.4.2 Update Entity Attributes . 56
4.1.1.4.3 Partial Update Entity Attributes. 59
4.1.1.4.4 Delete Entity Attributes . 62
4.1.2 Consumption . 64
4.1.2.1 Entity . 64
4.1.2.1.1 Retrieve Entity . 64
4.1.2.1.2 Query Entities . 69
4.1.2.2 Temporal Entity . 73
4.1.2.2.1 Retrieve temporal evolution of Entity . 73
4.1.2.2.2 Query temporal evolution of Entities . 81
4.1.2.3 Discovery . 91
4.1.2.3.1 Retrieve Available Entity Types . 91
4.1.2.3.2 Retrieve Details of Available Entity Types . 92
4.1.2.3.3 Retrieve Available Entity Type Information . 93
4.1.2.3.4 Retrieve Available Entity Type Information . 93
4.1.2.3.5 Retrieve Details of Available Attrib utes . 94
4.1.2.3.6 Retrieve Details of Available Attrib utes . 95
4.1.3 Subscription . 95
4.1.3.1 Create Subscription . 95
4.1.3.2 Update Subscription . 101
4.1.3.3 Retrieve Subscription . 110
4.1.3.4 Query Subscriptions . 112
ETSI

---------------------- Page: 3 ----------------------
4 ETSI GS CIM 013 V1.1.1 (2021-05)
4.1.3.5 Delete Subscription . 113
4.1.3.6 Notification Behaviour . 115
4.2 Context Source . 127
4.2.1 Registration . 127
4.2.1.1 Register Context Source . 127
4.2.1.2 Update Context Source Registration . 134
4.2.1.3 Delete Context Source Registration . 137
4.2.2 Registration Subscription . 139
4.2.2.1 Create Context Source Registration Subscription . 139
4.2.2.2 Update Context Source Registration Subscription . 145
4.2.2.3 Retrieve Context Source Registration Subscription . 149
4.2.2.4 Query Context Source Registration Subscriptions . 151
4.2.2.5 Delete Context Source Registration Subscription . 154
4.2.2.6 Context Source Registration Subscription Notification Behaviour . 157
4.2.3 Discovery . 168
4.2.3.1 Retrieve Context Source Registration . 168
4.2.3.2 Query context source registrations . 172
4.2.4 Common Behaviours . 180
4.2.4.1 NGSI-LD API common behaviours . 180
4.2.4.2 API HTTP binding common behaviours . 181
4.2.4.2.1 HTTP request pre-conditions . 181
4.2.4.2.2 JSON-LD @context resolution . 185
Annex A (informative): Change History . 186
History . 187


ETSI

---------------------- Page: 4 ----------------------
5 ETSI GS CIM 013 V1.1.1 (2021-05)
Intellectual Property Rights
Essential patents
IPRs essential or potentially essential to normative deliverables may have been declared to ETSI. The declarations
pertaining to these essential IPRs, if any, are publicly available for ETSI members and non-members, and can be
found in ETSI SR 000 314: "Intellectual Property Rights (IPRs); Essential, or potentially Essential, IPRs notified to
ETSI in respect of ETSI standards", which is available from the ETSI Secretariat. Latest updates are available on the
ETSI Web server (https://ipr.etsi.org/).
Pursuant to the ETSI Directives including the ETSI IPR Policy, no investigation regarding the essentiality of IPRs,
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) 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, 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.
DECT™, PLUGTESTS™, UMTS™ and the ETSI logo are trademarks of ETSI registered for the benefit of its

Members. 3GPP™ and LTE™ are trademarks of ETSI registered for the benefit of its Members and of the 3GPP
Organizational Partners. oneM2M™ logo is a trademark of ETSI registered for the benefit of its Members and of the
®
oneM2M Partners. GSM and the GSM logo are trademarks registered and owned by the GSM Association.
Foreword
This Group Specification (GS) has been produced by ETSI Industry Specification Group (ISG) cross-cutting Context
Information Management (CIM).
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 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

---------------------- Page: 5 ----------------------
6 ETSI GS CIM 013 V1.1.1 (2021-05)
1 Scope
The present document contains the description of each abstract test case using the Test Template [i.2] and using the Test
Purposes Description Language identified in ETSI GS CIM 012 [2] and ETSI GR CIM 011 [i.1]. The test cases are
described in tabular form.
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 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
https://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 the application of the present document.
[1] ETSI GS CIM 009 (V1.3.1) (08-2020): "Context Information Management (CIM); NGSI-LD
API".
[2] ETSI GS CIM 012 (V1.1.1) (03-2021): "Context Information Management (CIM); NGSI-LD Test
Suite Structure".
[3] ISO 8601: 2004: "Data elements and interchange formats -- Information interchange --
Representation of dates and times".
2.2 Informative 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 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, 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 GR CIM 011 (V1.1.1) (04-2021): "Context Information Management (CIM); NGSI-LD
Testing Framework: Test Purposes Description Language (TPDL)".
[i.2] ETSI GS CIM 016 (V1.1.1) (04-2021): "Context Information Management (CIM); NGSI-LD
Testing Framework: Test Template".
3 Definition of terms, symbols and abbreviations
3.1 Terms
For the purposes of the present document, the following terms apply:
context registry: software functional element where Context Sources register the information that they can provide
ETSI

---------------------- Page: 6 ----------------------
7 ETSI GS CIM 013 V1.1.1 (2021-05)
context source: source of context information which implements the NGSI-LD consumption and subscription (and
possibly provision) interfaces defined by the present document
entity: informational representative of something that is supposed to exist in the real world, physically or conceptually
valid: According to the specification references in the normative reference. For example a datatype needs to be
represented as stated in the specification.
3.2 Symbols
Void.
3.3 Abbreviations
For the purposes of the present document, the following abbreviations apply:
CF Config Identifier
DEL DELETE
HTTP HperText Transfer Protocol
JSON Java Script Object Notation
PICS Profile Implementation Conformance Statement
SUT System Under Test
TP Test Purpose
URI Unified Resource Identification
URL Unified Resource Location
4 Test Purposes Descriptions
4.1 Context Information
4.1.1 Provision
4.1.1.1 Entities
4.1.1.1.1 Create Entity
TP Id
TP/NGSI-LD/CI/Prov/E/001_01
Test objective
Check that you can create an entity
Reference ETSI GS CIM 009 V1.3.1 [1], clause 5.6.1
Config Id CF_01
Parent Release V1.3.1
PICS Selection PICS_5_6_1
Initial conditions with {
  the SUT being in the "initial state"
}
ETSI

---------------------- Page: 7 ----------------------
8 ETSI GS CIM 013 V1.1.1 (2021-05)
Expected Test events Direction
behaviour
when {
  the SUT receives a valid Create Entity Request from the client containing
     URL set to /ngsi-ld/v1/entities and
     method set to POST and
SUT  Client
     Header: Content-Type set to ${contentType} and
     body set to ${entity} to be created
}
then {
     the SUT sends a valid Response containing
         Response Status Code set to 201 (CREATED)
SUT  Client
         Created Entity set to ${entity}
}
Permutation on TP Id ${contentType} ${entity}
001_01_01 Application/json Minimal entity
001_01_02 Application/json+ld Simple properties
001_01_03 Application/json+ld Relationship of properties
001_01_04 Application/json+ld With a location attribute

TP Id TP/NGSI-LD/CI/Prov/E/001_02
Test objective Check that you cannot create an entity with invalid content
Reference
ETSI GS CIM 009 V1.3.1 [1], clause 5.6.1
Config Id CF_01
Parent Release
V1.3.1
PICS Selection PICS_5_6_1
Initial conditions with {
  the SUT being in the "initial state"
}
Expected Test events Direction
behaviour
when {
  the SUT receives a Create Entity Request from the client containing
     URL set to /ngsi-ld/v1/entities and
SUT Client
     method set to POST and
     Header: Content-Type set to application/ld+json and
     body set to ${invalid_body}
then {
     the SUT sends a valid Response containing
         Response Status Code set to 400 (Bad Request) and
SUT  Client
         Response Body containing
            ProblemDetails element containing
               type element set to ${problem_type} and
ETSI

---------------------- Page: 8 ----------------------
9 ETSI GS CIM 013 V1.1.1 (2021-05)
               title element containing
                    more information about the error
}
Permutation on TP Id ${invalid_body} ${problem_type}
TP/NGSI-LD/CI/Prov/E/001_02_01 invalid JSON document https://uri.etsi.org/ngsi-
ld/errors/InvalidRequest
TP/NGSI-LD/CI/Prov/E/001_02_02 empty https://uri.etsi.org/ngsi-
ld/errors/BadRequestData
TP/NGSI-LD/CI/Prov/E/001_02_03 entity with no context https://uri.etsi.org/ngsi-
ld/errors/BadRequestData

TP Id TP/NGSI-LD/CI/Prov/E/001_03
Test objective Check that you cannot create an entity with an existing id
Reference
ETSI GS CIM 009 V1.3.1 [1], clause 5.6.1
Config Id CF_01
Parent Release V1.3.1
PICS Selection
PICS_5_6_1
Initial conditions with {
  the SUT being in the "initial state" and containing an initial Entity with an id set to
${entityId}
}
Expected Test events Direction
behaviour
when {
  the SUT receives a Create Entity Request from the client containing
     URL set to /ngsi-ld/v1/entities and
     method set to POST and
SUT  Client
     Header: Content-Type set to application/ld+json and
     body containing ${entity} with the id set to ${entityId}
}
then {
     the SUT sends a valid Response containing
         Response Status Code set to 409 (Already Exists) and
         Response Body containing
            ProblemDetails element containing
SUT  Client
               type element set to https://uri.etsi.org/ngsi-
ld/errors/AlreadyExists and
               title element containing
                    more information about the error
}

ETSI

---------------------- Page: 9 ----------------------
10 ETSI GS CIM 013 V1.1.1 (2021-05)
TP Id TP/NGSI-LD/CI/Prov/E/001_04
Test objective
Check that the @context is obtained from a Link Header if the Content-Type header is
"application/json"
Reference
ETSI GS CIM 009 V1.3.1 [1], clause 6.3.5
Config Id CF_01
Parent Release
V1.3.1
PICS Selection
PICS_6_3_5
Initial conditions with {
  the SUT being in the "initial state"
}
Expected Test events Direction
behaviour
when {

  the SUT receives a valid Create Entity Request from the client
containing
     URL set to /ngsi-ld/v1/entities and
SUT  Client
     Header: Content-Type set to application/json and
     Header: Link set to a @context containing terms used by the entity to
create

     body set to entity to be created
}
then {
     the SUT sends a valid Response containing
         Response Status Code set to 201 (Created) and
SUT  Client
         Persisted Entity contains type and attributes expanded as per the
supplied @context
}

TP Id TP/NGSI-LD/CI/Prov/E/001_05
Test objective Check that the default @context is used if the Content-Type header is "application/json" and
the Link header does not contain a JSON-LD @context
Reference
ETSI GS CIM 009 V1.3.1 [1], clause 6.3.5
Config Id CF_01
Parent Release V1.3.1
PICS Selection
PICS_6_3_5
Initial conditions with {
  the SUT being in the "initial state"
}
ETSI

---------------------- Page: 10 ----------------------
11 ETSI GS CIM 013 V1.1.1 (2021-05)
Expected Test events Direction
behaviour
when {

  the SUT receives a valid Create Entity Request from the client
containing
SUT  Client
     URL set to /ngsi-ld/v1/entities and
     Header: Content-Type set to application/json and
     body set to entity to be created
}
then {
     the SUT sends a valid Response containing
         Response Status Code set to 201 (Created) and
SUT  Client
         Persisted Entity contains type and attributes expanded as per the
default @context
}

TP Id TP/NGSI-LD/CI/Prov/E/001_06
Test objective Check that an HTTP error response of type BadRequestData is raised if the Content-Type
header is "application/json" and the request payload body (as JSON) contains a "@context"
term
Reference
ETSI GS CIM 009 V1.3.1 [1], clause 6.3.5
Config Id
CF_01
Parent Release V1.3.1
PICS Selection PICS_6_3_5
Initial conditions with {
  the SUT being in the "initial state"
}
Expected Test events Direction
behaviour
when {

  the SUT receives a valid Create Entity Request from the client

containing
SUT  Client
     URL set to /ngsi-ld/v1/entities and
     Header: Content-Type set to application/json and
     body set to entity containing a @context term
}
then {
     the SUT sends a valid Response containing
         Response Status Code set to 400 (Bad Request) and
SUT  Client
         Response Body containing
            ProblemDetails element containing
ETSI

---------------------- Page: 11 ----------------------
12 ETSI GS CIM 013 V1.1.1 (2021-05)
               type element set to https://uri.etsi.org/ngsi-
ld/errors/BadRequestData and
               title element containing
                    more information about the error
}

TP Id TP/NGSI-LD/CI/Prov/E/001_07
Test objective
Check that the @context is obtained from the request payload body itself if the Content-Type
header is "application/ld+json"
Reference
ETSI GS CIM 009 V1.3.1 [1], clause 6.3.5
Config Id CF_01
Parent Release
V1.3.1
PICS Selection PICS_6_3_5
Initial conditions with {
  the SUT being in the "initial state"
}
Expected Test events Direction
behaviour
when {

  the SUT receives a valid Create Entity Request from the client
containing
SUT  Client
     URL set to /ngsi-ld/v1/entities and
     Header: Content-Type set to application/ld+json and
     body set to entity contai
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.