"doc":"Check that you can query the temporal evolution of entities using a context",
"tags":[
"5_7_4",
"te-query"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-04-expectation.jsonld'\n and using the list of entity ids define in '${temporal_entities_representation_ids}' and\n Response Status Code set to 200\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' 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 query the temporal evolution of entities matching the given type(s)",
"tags":[
"5_7_4",
"te-query"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-05-expectation.jsonld'\n and using the list of entity ids define in '${temporal_entities_representation_ids}' and\n Response Status Code set to 200\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' 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 query the temporal evolution of entities matching the given identifier(s)",
"tags":[
"5_7_4",
"te-query"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-06-expectation.jsonld'\n and using the list of entity ids define in '${temporal_entities_representation_ids}' and\n Response Status Code set to 200\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: entity_ids set to '${entity_ids_to_be_retrieved}' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' 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 query the temporal evolution of entities matching the given id pattern",
"tags":[
"5_7_4",
"te-query"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-07-expectation.jsonld'\n and using the list of entity ids define in '${temporal_entities_representation_ids}' and\n Response Status Code set to 200\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: entity_id_pattern set to 'urn:ngsi-ld:Vehicle:.*' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' 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 query the temporal evolution of entities matching the given NGSI-LD query",
"tags":[
"5_7_4",
"te-query"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-08-expectation.jsonld'\n and using the list of entity ids define in '${temporal_entities_representation_ids}' and\n Response Status Code set to 200\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: ngsild_query set to 'speed>90' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' 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 query the temporal evolution of entities matching the given NGSI-LD Context Source filter",
"tags":[
"5_7_4",
"te-query"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Status Code set to 200\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: csf set to 'endpoint' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' 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 cannot query the temporal evolution of entities with an invalid request",
"tags":[
"5_7_4",
"te-query"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' 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 containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/ResourceNotFound' and\n Response body containing 'title' element and\n Response Status Code set to 404\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/types/{type}'\n method set to 'GET'\n Retrieve Entity Type, with type set to 'Building'",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/types/{type}'\n method set to 'GET'\n Retrieve Entity Type, with type set to 'Building'\n}",
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing an Entity Type Info and\n Response Status Code set to 200\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/types/{type}'\n method set to 'GET'\n Retrieve Entity Type, with type set to 'Building', with Header['Link'] containing 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/types/{type}'\n method set to 'GET'\n Retrieve Entity Type, with type set to 'Building', with Header['Link'] containing '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 containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/ResourceNotFound' and\n Response body containing 'title' element and\n Response Status Code set to 404\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/attributes/{attribute_name}'\n method set to 'GET'\n Retrieve Attribute with attributeName set to 'airQualityLevel'",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/attributes/{attribute_name}'\n method set to 'GET'\n Retrieve Attribute with attributeName set to 'airQualityLevel'\n}",
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing an array of Attributes and\n Response Status Code set to 200\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/attributes/{attribute_name}'\n method set to 'GET'\n Retrieve Attribute with attributeName set to 'airQualityLevel'",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/attributes/{attribute_name}'\n method set to 'GET'\n Retrieve Attribute with attributeName set to 'airQualityLevel'\n}",
"doc":"Check that you cannot create an entity with an existing id",
"tags":[
"5_6_1",
"e-create"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/AlreadyExists' and\n Response body containing 'title' element and\n Response Status Code set to 409\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-minimal-sample.jsonld'\n}",
"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",
"doc":"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",
"tags":[
"6_3_5",
"e-create"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body contains the attribute: 'almostFull'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}'\n method set to 'GET'\n Request Retrieve Entity by Id and\n Query Parameter: id set to '${entity_id}'\n}",
"http_verb":"GET",
"endpoint":"entities/{id}"
},
{
"name":"001_05_02 Create one entity using the default context with JSON content type and request with context",
"doc":"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",
"tags":[
"6_3_5",
"e-create"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body contains the attribute: 'ngsi-ld:default-context/almostFull'\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}'\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}",
"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",
"doc":"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",
"tags":[
"6_3_5",
"e-create"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\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-simple-attributes-sample.jsonld'\n}",
"test_objective":"Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is \"application/ld+json\" and the request payload body does not contain a @context term",
"doc":"Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is \"application/ld+json\" and the request payload body does not contain a @context term",
"tags":[
"6_3_5",
"e-create"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\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.json'\n}",
"test_objective":"Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is \"application/ld+json\" and a JSON-LD Link header is present in the incoming HTTP request",
"doc":"Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is \"application/ld+json\" and a JSON-LD Link header is present in the incoming HTTP request",
"tags":[
"6_3_5",
"e-create"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\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":"Check that you cannot delete an entity if the entity id is not known to the system",
"tags":[
"5_6_6",
"e-delete"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/ResourceNotFound' and\n Response body containing 'title' element and\n Response Status Code set to 404\n}",
"when":"when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}'\n method set to 'DELETE'\n Delete Entity Request with id set to '${entity_id}'\n}",
"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",
"doc":"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",
"tags":[
"6_3_5",
"be-create"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\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 'application/json' and\n payload set to a list of entities to be created\n}",
"test_objective":"Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is \"application/ld+json\" and the request payload body does not contain a @context term",
"doc":"Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is \"application/ld+json\" and the request payload body does not contain a @context term",
"tags":[
"6_3_5",
"be-create"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\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 'application/ld+json' and\n payload set to a list of entities to be created\n}",
"test_objective":"Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is \"application/ld+json\" and a JSON-LD Link header is present in the incoming HTTP request",
"doc":"Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is \"application/ld+json\" and a JSON-LD Link header is present in the incoming HTTP request",
"tags":[
"6_3_5",
"be-create"
],
"setup":null,
"teardown":null,
"template":null,
"then":"then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\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 'application/ld+json' and\n payload set to a list of entities to be created\n}",