"doc":"Check that you can retrieve the temporal evolution of an entity with a LanguageProperty property",
"tags":[
"4_5_18",
"4_5_7",
"5_7_3",
"since_v1.4.1",
"te-retrieve"
],
"setup":null,
"teardown":null,
"template":"Retrieve Temporal Entity",
"then":"then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-language-property-normalized-temporal-representation-expectation.jsonld'\n * the id was changed to '${temporal_entity_representation_id}'\n * response body to be checked set to '${response.json()}'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to '${EMPTY}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}",
"doc":"Check that you can retrieve the temporal evolution of an entity with a LanguageProperty property",
"tags":[
"4_5_18",
"4_5_9",
"5_7_3",
"since_v1.4.1",
"te-retrieve"
],
"setup":null,
"teardown":null,
"template":"Retrieve Temporal Entity",
"then":"then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-language-property-simplified-temporal-representation-expectation.jsonld'\n * the id was changed to '${temporal_entity_representation_id}'\n * response body to be checked set to '${response.json()}'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'temporalValues' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}",
"then":"then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Header: Location containing $${entity_id} and\n Retrieve Entity by Id with Check Created Resource Set To and\n Query Parameter: 'created_resource' set to 'created_entity' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/json' and\n payload defined in file: 'building-minimal-without-context-sample.jsonld'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/json' and\n payload defined in file: 'building-minimal-sample.json'\n}",
"template":"Create Entity With Invalid Request Scenarios",
"then":"then {\n the SUT sends a valid Response for the operations:\n Create Entity From File with Response Status Code set to 400 and\n Create Entity From File with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Create Entity From File with Response body containing 'title' element\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request creation of an entity from filename 'building-minimal-without-context-sample.jsonld' and Content-Type set to 'application/ld+json'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request creation of an entity from filename 'building-minimal-sample.json' and Content-Type set to 'application/ld+json'\n}",
"doc":"Check that you can create an entity with a LanguageProperty property",
"tags":[
"4_5_18",
"5_6_1",
"e-create",
"since_v1.4.1"
],
"setup":null,
"teardown":"Delete Initial Entity",
"template":"Create Entity Scenarios",
"then":"then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Header: Location containing $${entity_id} and\n Retrieve Entity by Id with Check Created Resource Set To and\n Query Parameter: 'created_resource' set to 'created_entity' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'building-language-property-sample.jsonld'\n}",
"doc":"Check that you can create an entity with one or more scopes",
"tags":[
"4_18",
"e-create",
"since_v1.5.1"
],
"setup":null,
"teardown":"Delete Initial Entity",
"template":"Create Entity Scenarios",
"then":"then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Header: Location containing $${entity_id} and\n Retrieve Entity by Id with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/json' and\n payload defined in file: 'building-minimal-with-one-scope.json'\n}",
"doc":"Check that you can create an entity with one or more scopes",
"tags":[
"4_18",
"e-create",
"since_v1.5.1"
],
"setup":null,
"teardown":"Delete Initial Entity",
"template":"Create Entity Scenarios",
"then":"then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Header: Location containing $${entity_id} and\n Retrieve Entity by Id with Check Created Resource Set To and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/json' and\n payload defined in file: 'building-minimal-with-many-scopes.json'\n}",
"doc":"Check that you can create a batch of entities where two have the same id",
"tags":[
"5_6_7",
"be-create",
"since_v1.5.1"
],
"setup":null,
"teardown":"Delete Entities",
"template":null,
"then":"then {\n the SUT sends a valid Response for the operations:\n Batch Create Entities with Response Status Code set to 207 and\n Batch Create Entities with Response body containing batch operation result set to '${expected_batch_operation_result}'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/create'\n method set to 'POST'\n Request Header['Content-Type'] set to '' and\n payload set to a list of entities to be created\n}",
"doc":"Check that you can upsert a batch of where two have the same id",
"tags":[
"5_6_8",
"be-upsert",
"since_v1.5.1"
],
"setup":null,
"teardown":"Delete Entities",
"template":null,
"then":"then {\n the SUT sends a valid Response for the operations:\n Batch Upsert Entities with Response Status Code set to 201 and\n Batch Upsert Entities with Response Body set to an array of created entities ids\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/upsert?options=${update_option}'\n method set to 'POST'\n Request batch upsert operation over entity from filename '@{entities_to_be_upserted}' with update_option set to 'replace' and Content-Type set to 'application/ld+json'\n}",
"initial_condition":"with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}",
"test_cases":[
{
"name":"006_04_01 Delete a batch of existing entities with the same id",
"doc":"Check that you can delete a batch entities with the same id",
"tags":[
"5_6_10",
"be-delete",
"since_v1.5.1"
],
"setup":"Setup Initial Entity",
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response for the operations:\n Batch Delete Entities with Response Status Code set to 207 and\n ${response.json()} with Response body containing batch operation result set to '${response1}'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/delete'\n method set to 'POST'\n Batch Delete Entities: and\n Query Parameter: entities_ids_to_be_deleted set to '@{entities_ids_to_be_deleted}'\n}",
"initial_condition":"with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}",
"test_cases":[
{
"name":"010_06_01 Append a LanguageProperty property",
"doc":"Check that you can append a LanguageProperty property to an entity",
"tags":[
"4_5_18",
"5_6_3",
"ea-append",
"since_v1.4.1"
],
"setup":"Create Initial Entity",
"teardown":"Delete Initial Entity",
"template":"Append Attributes Without Params",
"then":"then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}/attrs'\n method set to 'POST'\n Append Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'vehicle-new-language-property-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}",
"initial_condition":"with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}",
"test_cases":[
{
"name":"010_07_01 Append scope to an entity with overwrite enabled",
"doc":"Check that scope is replaced if overwrite is enabled",
"tags":[
"4_18",
"5_6_3",
"ea-append",
"since_v1.5.1"
],
"setup":"Create Initial Entity",
"teardown":"Delete Initial Entity",
"template":null,
"then":"then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes with Response Status Code set to 204 and\n Append Entity Attributes with Updated Entity set to ${entity}\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/'\n method set to 'GET'\n Request Retrieve Entity by Id and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: accept set to 'application/json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}",
"http_verb":"GET",
"endpoint":""
},
{
"name":"010_07_01 Append scope to an entity with overwrite disabled",
"doc":"Check that scope is appended if overwrite is disabled",
"tags":[
"4_18",
"5_6_3",
"ea-append",
"since_v1.5.1"
],
"setup":"Create Initial Entity",
"teardown":"Delete Initial Entity",
"template":null,
"then":"then {\n the SUT sends a valid Response for the operations:\n Append Entity Attributes With Parameters with Response Status Code set to 204 and\n Append Entity Attributes With Parameters with Updated Entity set to ${entity}\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/'\n method set to 'GET'\n Request Retrieve Entity by Id and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: accept set to 'application/json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}",
"initial_condition":"with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}",
"test_cases":[
{
"name":"011_05_01 Update scope to an entity already having a scope",
"doc":"Check that scope is replaced if entity already has a scope",
"tags":[
"4_18",
"5_6_2",
"ea-append",
"since_v1.5.1"
],
"setup":"Create Initial Entity",
"teardown":"Delete Initial Entity",
"template":null,
"then":"then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Update Entity Attributes with Updated Entity set to ${entity}\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/'\n method set to 'GET'\n Request Retrieve Entity by Id and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: accept set to 'application/json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}",
"http_verb":"GET",
"endpoint":""
},
{
"name":"011_05_02 Update scope to an entity not having a scope",
"doc":"Check that scope is not added if entity does not already have a scope",
"tags":[
"4_18",
"5_6_2",
"ea-append",
"since_v1.5.1"
],
"setup":"Create Initial Entity",
"teardown":"Delete Initial Entity",
"template":null,
"then":"then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 207 and\n Update Entity Attributes with Updated Entity set to ${entity}\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/'\n method set to 'GET'\n Request Retrieve Entity by Id and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: accept set to 'application/json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}",
"initial_condition":"with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n and an attribute with an id set to ${atrId}\n}",
"test_cases":[
{
"name":"012_04_01 Check that you can partially update a LanguageProperty property",
"doc":"Check that you can perform a partial update on a LanguageProperty property",
"tags":[
"4_5_18",
"5_6_4",
"ea-partial-update",
"since_v1.4.1"
],
"setup":"Initiate Test Case",
"teardown":"Delete Initial Entities",
"template":"Update Attributes",
"then":"then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Updated Entity set to ${entity}\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'street' and\n Query Parameter: fragment_filename set to 'building-language-property-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}",
"initial_condition":"with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}",
"doc":"Check that you can delete a scope from an entity",
"tags":[
"4_18",
"5_6_5",
"ea-delete",
"since_v1.5.1"
],
"setup":"Create Initial Entity",
"teardown":"Delete Initial Entity",
"template":null,
"then":"then {\n the SUT sends a valid Response for the operations:\n Delete Entity Attributes with Response Status Code set to 204 and\n Delete Entity Attributes with Updated Entity set to ${entity}\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/'\n method set to 'GET'\n Request Retrieve Entity by Id and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: accept set to 'application/json'\n}",
"doc":"If a subscription defines an entity type selection query, a notification shall be sent whenever an entity matches the query.",
"tags":[
"5_8_6",
"since_v1.5.1",
"sub-notification"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the client at '${endpoint}' receives a valid Notification containing:\n Notification received After waiting '5' seconds and\n Notification received Notification data: '${notification}[subscriptionId]' equal to '${subscription_id}' and\n Notification received Notification data: '${notification}[data][0][id]' equal to '${entity_id}' and\n Notification received The dictionary `${notification}' should contain the key 'data' and\n Notification received The variable `${notification}[data]' should not be '${EMPTY}'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'building-simple-attributes-sample.jsonld'\n}",
"doc":"If a subscription defines an entity type selection query, a notification shall not be sent if the entity type does not match the query",
"tags":[
"5_8_6",
"since_v1.5.1",
"sub-notification"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the client at '${endpoint}' receives a valid Notification containing:\n Notification received Waiting for no Notification data and\n Query Parameter: timeout set to '5'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'vehicle-simple-attributes-sample.jsonld'\n}",