diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_02.robot index 548f50ed276672ad79d6a33bf9ee9cf4fa05ffe1..d7e6dd24f20bf15741c1664267234a7094fd1ab9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_02.robot @@ -6,8 +6,8 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Test Template Get Entity With Invalid/Missing Id *** Test Cases *** ENTITY_ID EXPECTED_STATUS_CODE PROBLEM_TYPE -018_02_01_Get an entity if the Entity Id is not present ${EMPTY} 400 ${ERROR_TYPE_BAD_REQUEST_DATA} -018_02_02_Get an entity if the Entity Id is not a valid URI thisisaninvaliduri 400 ${ERROR_TYPE_BAD_REQUEST_DATA} +018_02_01_Get an entity if the Entity Id is not present ${EMPTY} 400 ${ERROR_TYPE_BAD_REQUEST_DATA} +018_02_02_Get an entity if the Entity Id is not a valid URI thisisaninvaliduri 400 ${ERROR_TYPE_BAD_REQUEST_DATA} *** Keywords *** Get Entity With Invalid/Missing Id diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_03_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_03_02.robot index 534477a0b542c0597cec9542ed0ce16a421e1d7d..024706b8e4f397b6c63fd773ff564ac21ca40311 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_03_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_03_02.robot @@ -10,7 +10,7 @@ ${filename}= building-simple-attributes-sample.jsonld ${attribute_not_known}= property_not_found *** Test Cases *** -Get an entity if an atris not known to the system +Get an entity if an attribute is not known to the system [Documentation] Check that you cannot get an entity if an attribute is not known to the system [Tags] mandatory diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_01.robot index f43a979b7e577163b77cd8e551bda34cb37f00c3..d3f045146a3e3546fdd810f7421adfcb5f6c0c0c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_01.robot @@ -29,7 +29,7 @@ Query several entities based on ids ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} @{entity_types_to_be_retrieved}= Create List ${entity_type} - ${response}= Query Entities entity_ids=${entities_ids_to_be_retrieved} entity_types=${entity_types_to_be_retrieved} + ${response}= Query Entities entity_ids=${entities_ids_to_be_retrieved} entity_types=@{entity_types_to_be_retrieved} Check Response Status Code 200 ${response['status']} Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_compared} ${response['body']} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_02.robot index a4cbc5f3550d73d14ac3fd64b90eb948b817a804..956bbd045b37f89e2e3a7dfdd951ac1afc94942d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_02.robot @@ -32,7 +32,6 @@ Query several entities based on the entities types ${request} ${response}= Create Entity Selecting Content Type ${parking_filename} ${parking_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - #@{entity_types_to_be_retrieved}= Create List ${vehicle_entity_type} ${parking_entity_type} ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${vehicle_entity_type} ${parking_entity_type} ${response}= Query Entities entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response['status']} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_04.robot index acde9947c31db6086cde063c7ab57a8d5c7e0989..1fc43211deef7ed9ff4ccffe685fdcebc411c476 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_04.robot @@ -9,9 +9,9 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-simple-attributes-sample.jsonld ${filename2}= building-minimal-sample.jsonld ${expectation_filename}= building-attributes-query-sample-expectation.jsonld -${entity_type}= https://uri.fiware.org/ns/data-models#Building -${attribute_airqualitylevel}= https://uri.fiware.org/ns/data-models#airQualityLevel -${attribute_subcategory}= https://uri.fiware.org/ns/data-models#subCategory +${entity_type}= https://ngsi-ld-test-suite/context#Building +${attribute_airqualitylevel}= https://ngsi-ld-test-suite/context#airQualityLevel +${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCategory *** Test Cases *** Query several entities based on attribute names diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_05.robot index e50cd66c1470ca87e49a166fe1b8aed8b263a073..c196f7dfbaf957db20e4ea44c3028dd323d38cb3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_05.robot @@ -8,7 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-location-attribute-sample.jsonld ${expectation_filename}= building-location-attribute-sample-expectation-query-geoproperty.jsonld -${entity_type}= https://uri.fiware.org/ns/data-models#Building +${entity_type}= https://ngsi-ld-test-suite/context#Building ${geometry_property}= location *** Test Cases *** diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_01.robot index 3472bedf777a24da0caccf4310133a96e86a863e..597ccab9e94638e42e8024ec702727ab03613308 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_01.robot @@ -25,11 +25,12 @@ Query several entities via POST Interaction based on ids ${request} ${response}= Create Entity Selecting Content Type ${filename} ${third_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{entities_ids_to_be_retrieved}= Create List ${first_entity_id} ${second_entity_id} + @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} + ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} @{entity_types_to_be_retrieved}= Create List ${entity_type} ${response}= Query Entities Via POST entity_ids=${entities_ids_to_be_retrieved} entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response['status']} - Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_retrieved} ${response['body']} + Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_compared} ${response['body']} [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} ${third_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_02.robot index 228c4c846e8425158f19e7fd5a8ca4afaea82702..a6d724e90c93681cca5daef37f30ff16f366857f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_02.robot @@ -32,11 +32,12 @@ Query several entities via POST Interaction based on the entities types ${request} ${response}= Create Entity Selecting Content Type ${parking_filename} ${parking_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{entity_types_to_be_retrieved}= Create List ${vehicle_entity_type} ${parking_entity_type} + @{entity_types_to_be_compared}= Create List ${vehicle_entity_type} ${parking_entity_type} + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${vehicle_entity_type} ${parking_entity_type} ${response}= Query Entities Via POST entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response['status']} @{entities_ids_to_be_retrieved}= Create List ${building_entity_id} ${vehicle_entity_id} - Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_retrieved} ${response['body']} + Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entity_types_to_be_compared} ${response['body']} [Teardown] Delete Entities ${building_entity_id} ${vehicle_entity_id} ${parking_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_03.robot index b911217d79720a08b4aa00b18a618761ac4d8cc6..3b0aeed32b5a3a8fb54ecffbb2fdc98c519005fb 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_03.robot @@ -23,11 +23,12 @@ Query several entities via POST Interaction based on the given id pattern ${request} ${response}= Create Entity Selecting Content Type ${filename} ${second_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{entities_ids_to_be_retrieved}= Create List ${first_entity_id} ${second_entity_id} + @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} + ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} @{entity_types_to_be_retrieved}= Create List ${entity_type} ${response}= Query Entities Via POST entity_id_pattern=${entity_id_pattern} entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response['status']} - Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_retrieved} ${response['body']} + Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_compared} ${response['body']} [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_04.robot index 7ffd18b766f8f6c29b20e6e9f95d879328ef2d92..aa46bdacfb4cb58bc5e11ed8dba270921eea8e5e 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_04.robot @@ -8,7 +8,6 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal-sample.jsonld ${expectation_filename}= building-minimal-sample-expectation.jsonld -${entity_type}= https://ngsi-ld-test-suite/context#Building ${attribute_airqualitylevel}= https://ngsi-ld-test-suite/context#airQualityLevel ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCategory @@ -24,7 +23,7 @@ Query several entities via POST Interaction based on attribute names ${request} ${response}= Create Entity Selecting Content Type ${filename} ${second_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{attributes_to_be_retrieved}= Create List ${attribute_airqualitylevel} ${attribute_subcategory} + ${attributes_to_be_retrieved}= Catenate SEPARATOR=, ${attribute_airqualitylevel} ${attribute_subcategory} @{entities_ids_to_be_retrieved}= Create List ${first_entity_id} ${second_entity_id} ${response}= Query Entities Via POST attrs=${attributes_to_be_retrieved} Check Response Status Code 200 ${response['status']} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_05.robot index 36952866e33448939d64a53d7aad6367025afd95..da47aa14891133ee40401937e37fed2d979b283f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_05.robot @@ -23,11 +23,11 @@ Query several entities via POST Interaction based on a list of properties ${request} ${response}= Create Entity Selecting Content Type ${filename} ${second_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{entities_ids_to_be_retrieved}= Create List ${first_entity_id} ${second_entity_id} + @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} @{entity_types_to_be_retrieved}= Create List ${entity_type} ${response}= Query Entities Via POST entity_types=${entity_types_to_be_retrieved} geoproperty=${geometry_property} Check Response Status Code 200 ${response['status']} - Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_retrieved} ${response['body']} + Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_compared} ${response['body']} [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_01.robot index 7b27ea33e1baffe65af76c76a5203580c44fcba7..89c08f793e77b778bad65654e3dfb786b767f36b 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_01.robot @@ -23,7 +23,7 @@ Query entities based on incorrect ids ${request} ${response}= Create Entity Selecting Content Type ${filename} ${second_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{entities_ids_to_be_retrieved}= Create List ${entity_invalid_id_one} ${entity_invalid_id_two} + ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${entity_invalid_id_one} ${entity_invalid_id_two} @{entity_types_to_be_retrieved}= Create List ${entity_type} ${response}= Query Entities entity_ids=${entities_ids_to_be_retrieved} entity_types=${entity_types_to_be_retrieved} Check Response Status Code 400 ${response['status']} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_02.robot index 79fb860898b640b50bec12e817dc4b1e88681a58..22fc2947e1bca791087b2fa6e78afa9249e5c74b 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_02.robot @@ -25,7 +25,7 @@ Query entities based on incorrect entity types ${request} ${response}= Create Entity Selecting Content Type ${vehicle_filename} ${vehicle_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{entity_types_to_be_retrieved}= Create List ${invalid_entity_type_one} ${invalid_entity_type_two} + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${invalid_entity_type_one} ${invalid_entity_type_two} ${response}= Query Entities entity_types=${entity_types_to_be_retrieved} Check Response Status Code 400 ${response['status']} Check Response Body Containing ProblemDetails Element Containing Type Element set to ${response} ${ERROR_TYPE_BAD_REQUEST_DATA} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_04.robot index 2ac89ffa7415610bec7d6858df693bfa84b0b284..5a8359c56e3dc6443cbe5afaf032f47aa7e90725 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_04.robot @@ -23,8 +23,7 @@ Query several entities based on incorrect attribute names ${request} ${response}= Create Entity Selecting Content Type ${filename} ${second_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{attributes_to_be_retrieved}= Create List ${invalid_attribute_one} ${invalid_attribute_two} - @{entities_ids_to_be_retrieved}= Create List ${first_entity_id} ${second_entity_id} + ${attributes_to_be_retrieved}= Catenate SEPARATOR=, ${invalid_attribute_one} ${invalid_attribute_two} ${response}= Query Entities attrs=${attributes_to_be_retrieved} Check Response Status Code 400 ${response['status']} Check Response Body Containing ProblemDetails Element Containing Type Element set to ${response} ${ERROR_TYPE_BAD_REQUEST_DATA} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_05.robot index 6ab42eb077c4bb6a3f8a1f24210c76b63f64b7cd..1f8048c5b613583f5614621f2726c358dc40c36f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_05.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check that you can query entitites based on a list of properties +Documentation Check that you cannot query entitites if the request has a wrong geometryProperty Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,8 +11,8 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building ${invalid_geometry_property}= invalid_geometry_property *** Test Cases *** -Query several entities based on a list of properties - [Documentation] Check that you can query entitites based on a list of properties +Query entitites when the request has a wrong geometryProperty + [Documentation] Check that you cannot query entitites if the request has a wrong geometryProperty [Tags] mandatory ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_04.robot index c35101b960c52515abfef852ad1e3ef64e5ee357..5622a0728cbb53072f6151c7da1c71c7e5e225fa 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_04.robot @@ -26,12 +26,12 @@ Query entities in a simplified representation ${request} ${response}= Create Entity Selecting Content Type ${filename} ${third_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - - @{entities_ids_to_be_retrieved}= Create List ${first_entity_id} ${second_entity_id} + @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} + ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} @{entity_types_to_be_retrieved}= Create List ${entity_type} ${response}= Query Entities entity_ids=${entities_ids_to_be_retrieved} entity_types=${entity_types_to_be_retrieved} options=${options_parameter} Check Response Status Code 200 ${response['status']} - Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_retrieved} ${response['body']} + Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_compared} ${response['body']} [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} ${third_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_05.robot index 69db1e525e8f4c10cfa97157f4b32ad4f61e5ba2..08bef2dc169d5a095ec133797e3c40ffb560071c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_05.robot @@ -26,11 +26,12 @@ Get an entity by id that can be returned in a geoJSON format ${request} ${response}= Create Entity Selecting Content Type ${filename} ${third_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{entities_ids_to_be_retrieved}= Create List ${first_entity_id} ${second_entity_id} + @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} + ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} @{entity_types_to_be_retrieved}= Create List ${entity_type} ${response}= Query Entities entity_ids=${entities_ids_to_be_retrieved} entity_types=${entity_types_to_be_retrieved} accept=${accept_header} Check Response Status Code 200 ${response['status']} - Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_retrieved} ${response['body']} + Check Response Body Containing List Containing Entity elements ${expectation_filename} ${entities_ids_to_be_compared} ${response['body']} [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} ${third_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_06.robot index 72f7345df0e83eab3c8927fd26ceed498fefd2b7..fa326ffd7482f1a120b434c3c2e8970fa0208ce4 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_06.robot @@ -26,7 +26,7 @@ Query entities specifying a maximum number of results ${request} ${response}= Create Entity Selecting Content Type ${filename} ${third_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - @{entities_ids_to_be_retrieved}= Create List ${first_entity_id} ${second_entity_id} ${third_entity_id} + ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} ${third_entity_id} @{entity_types_to_be_retrieved}= Create List ${entity_type} ${response}= Query Entities entity_ids=${entities_ids_to_be_retrieved} entity_types=${entity_types_to_be_retrieved} limit=${limit} Check Response Status Code 200 ${response['status']} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot index 2dc442b966549ec8dc7e5d7d8ab97550c17eef4c..16841d9624b8b68135830bdf157c424398796aba 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot @@ -9,12 +9,11 @@ Test Template Create Entity Scenarios *** Variable *** ${building_id_prefix}= urn:ngsi-ld:Building: -*** Test Cases *** FILENAME CONTENT_TYPE +*** Test Cases *** FILENAME CONTENT_TYPE 001_01_01_MinimalEntity building-minimal-without-context-sample.jsonld application/json 001_01_02_EntityWithSimpleProperties building-simple-attributes-sample.jsonld application/ld+json 001_01_03_EntityWithRelationshipsProperties building-relationship-of-property-sample.jsonld application/ld+json -001_01_04_EntityWithNoContext building-minimal-without-context-sample.jsonld application/ld+json -001_01_05_EntityWithLocationAttribute building-location-attribute.jsonld application/ld+json +001_01_04_EntityWithLocationAttribute building-location-attribute-sample.jsonld application/ld+json *** Keywords *** Create Entity Scenarios diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_02.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_02.robot index afcaa3c1446f96a4ba40a4e000bc7facec5727dd..be92a3fe8da741aed86da02e9bd4e2fdf34d9d0a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_02.robot @@ -5,7 +5,7 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Test Template Create Entity With Invalid Request Scenarios -*** Test Cases *** FILENAME +*** Test Cases *** FILENAME 001_02_01_InvalidJson invalid-json-sample.jsonld 001_02_02_EmptyJson empty-sample.jsonld 001_02_03_EntityWithNoContext building-minimal-without-context-sample.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_02.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_02.robot index 758ed56af95dcdd052fbeefe77128acf51485adb..8b83523b0181472b2e87c449d3581bb0e38b5bbe 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_02.robot @@ -6,13 +6,10 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Test Template Delete Entity Scenarios -*** Variable *** -${entity_id_empty}= -${entity_id_not_valid}= thisisaninvaliduri -*** Test Cases *** ENTITY_ID EXPECTED_STATUS_CODE PROBLEM_TYPE -002_02_01_Delete an entity if the Entity Id is not present ${entity_id_empty} 400 ${ERROR_TYPE_BAD_REQUEST_DATA} -002_02_02_Delete an entity if the Entity Id is not a valid URI ${entity_id_not_valid} 400 ${ERROR_TYPE_BAD_REQUEST_DATA} +*** Test Cases *** ENTITY_ID EXPECTED_STATUS_CODE PROBLEM_TYPE +002_02_01_Delete an entity if the Entity Id is not present ${EMPTY} 400 ${ERROR_TYPE_BAD_REQUEST_DATA} +002_02_02_Delete an entity if the Entity Id is not a valid URI thisisaninvaliduri 400 ${ERROR_TYPE_BAD_REQUEST_DATA} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03_.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03.robot similarity index 100% rename from TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03_.robot rename to TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03.robot diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot index 3991a51a6728aae21c0fb5280927643e98afb582..721dc0af8b5702b7e1fad02130c6c6e6ede79831 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot @@ -10,7 +10,7 @@ Test Template Append Attributes ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-datasetid-attributes-sample.jsonld -*** Test Cases *** STATUS_CODE OVERWRITE FRAGMENT_FILENAME EXPECTATION_FILENAME +*** Test Cases *** STATUS_CODE OVERWRITE FRAGMENT_FILENAME EXPECTATION_FILENAME 010_01_01_Append entity attributes 204 ${EMPTY} vehicle-fragment-same-datasetid-sample.jsonld ${EMPTY} 010_01_02_Append entity attributes 207 noOverwrite vehicle-fragment-same-datasetid-sample.jsonld vehicle-attributes-sample-append-expectation-02.jsonld 010_01_03_Append entity attributes 204 ${EMPTY} vehicle-fragment-different-datasetid-sample.jsonld ${EMPTY} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_02.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_02.robot index 17a1ceac36123ce012266571dc271a5591327636..db4e7325fee89423c4192ee36e18487609cf906a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_02.robot @@ -12,10 +12,10 @@ ${status_code}= 400 ${invalid_fragment_filename}= invalid-vehicle-fragment-datasetid-sample.jsonld *** Test Cases *** -010_02_01_Append entity attributes if the entity Id is not present - Append Attributes ${EMPTY} -010_02_02_Append entity attributes if the Entity Id is not a valid URI - Append Attributes thisisaninvaliduri +#010_02_01_Append entity attributes if the entity Id is not present +# Append Attributes ${EMPTY} +#010_02_02_Append entity attributes if the Entity Id is not a valid URI +# Append Attributes thisisaninvaliduri 010_02_03_Append entity attributes with invalid entity fragments Append entity attributes with invalid entity fragments diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot index f7bc5eef860ded47be6fa5a78aa212c044af9530..e2bad05cc3ec2b625fce5181631ffa77dc4be74d 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot @@ -10,7 +10,7 @@ Test Template Update Attributes ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-two-datasetid-attributes-sample.jsonld -*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME +*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME 011_01_01_Check that you can update existing attributes with no datasetId 204 vehicle-two-datasetid-attributes-sample-01.jsonld ${EMPTY} 011_01_02_Check that you can update existing attributes with the datasetId 204 vehicle-two-datasetid-attributes-sample-02.jsonld ${EMPTY} 011_01_03_Check that you can update only some attributes while others failed 207 vehicle-two-datasetid-attributes-sample-03.jsonld vehicle-two-datasetid-attributes-sample-expectation-03.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot index 442c727328c513493caf58deabec1cd831baf49c..3ca9950148cbb402f6f73d377eb951009d5224c9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot @@ -9,16 +9,15 @@ Test Template Update Attributes *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-datasetid-attributes-sample.jsonld -${attribute_id}= speed ${status_code}= 204 -*** Test Cases *** FRAGMENT_FILENAME -012_01_01_Check that you can partially update an attribute vehicle-fragment-empty-datasetid-sample.jsonld -012_01_02_Check that you can partially update an attribute by specifying the datasetId vehicle-fragment-equal-datasetid-sample.jsonld +*** Test Cases *** FRAGMENT_FILENAME ATTRIBUTE_ID +012_01_01_Check that you can partially update an attribute vehicle-fragment-empty-datasetid-sample.jsonld isParked +012_01_02_Check that you can partially update an attribute by specifying the datasetId vehicle-fragment-equal-datasetid-sample.jsonld speed *** Keywords *** Update Attributes - [Arguments] ${fragment_filename} + [Arguments] ${fragment_filename} ${attribute_id} [Documentation] Check that you can perform a partial update on an entity attribute [Tags] mandatory @@ -26,7 +25,7 @@ Update Attributes ${request} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} + ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_JSON} Check Response Status Code ${status_code} ${response['status']} #TODO: check body response is empty diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot index 078582435e5c91231c44a7c6b43dc2fffcf69472..f3b4ab17b07558974eac3e682d60d1a485a3659d 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot @@ -28,9 +28,9 @@ Partial Update Attributes ${request} ${response}= Create Entity Selecting Content Type ${filename} ${valid_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} + ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_JSON} Check Response Status Code ${status_code} ${response['status']} - Check Response Body Containing ProblemDetails Element Containing Type Element set to ${response} ${ERROR_TYPE_BAD_REQUEST_DATA} + Check Response Body Containing ProblemDetails Element Containing Type Element set to ${response} ${ERROR_TYPE_RESOURCE_NOT_FOUND} Check Response Body Containing ProblemDetails Element Containing Title Element ${response} [Teardown] Delete Entity by Id Returning Response ${valid_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot index 8b00f79797cb862e8dc6f843a4078a1ff4bde26c..8361ea941c9d4afe31ba078a12dcb3217f88a4a8 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot @@ -12,7 +12,7 @@ ${status_code}= 204 ${filename}= vehicle-two-datasetid-attributes-sample.jsonld ${attribute_id}= speed -*** Test Cases *** DATASETID DELETEALL +*** Test Cases *** DATASETID DELETEALL 013_01_01_delete an attribute with the id ${EMPTY} false 013_01_02_delete an attribute with the datasetId urn:ngsi-ld:Property:gpsBxyz123-speed false 013_01_03_delete all target attribute instances with a datasetId urn:ngsi-ld:Property:gpsBxyz123-speed true diff --git a/data/entities/building-location-attribute-sample.jsonld b/data/entities/building-location-attribute-sample.jsonld index 72f7b220ce2ca63c5797a4f6c0341b81ec6aff5a..cba71b772f45289e8035d51b6656aa3d7faa9594 100644 --- a/data/entities/building-location-attribute-sample.jsonld +++ b/data/entities/building-location-attribute-sample.jsonld @@ -17,7 +17,6 @@ } }, "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/building-minimal-sample.jsonld b/data/entities/building-minimal-sample.jsonld index 2af764edcba2358db79da620f81feb5ffb3e3347..e49a2c9acb6b98e059b49ae2663b52d930617f16 100644 --- a/data/entities/building-minimal-sample.jsonld +++ b/data/entities/building-minimal-sample.jsonld @@ -2,7 +2,6 @@ "id": "urn:ngsi-ld:Building:randomUUID", "type": "Building", "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/building-relationship-of-property-sample.jsonld b/data/entities/building-relationship-of-property-sample.jsonld index 2cca72ea0008978e26cac169038145b40269ab43..2b21215c3fbc0d3d274970607316b9f4641803e0 100644 --- a/data/entities/building-relationship-of-property-sample.jsonld +++ b/data/entities/building-relationship-of-property-sample.jsonld @@ -24,7 +24,6 @@ "value": false }, "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/building-simple-attributes-sample.jsonld b/data/entities/building-simple-attributes-sample.jsonld index e4394e7c1461bd5e23f731655975f81e77cb3c69..821498e6d93d2258b6b62de2fd49497c4be517a5 100644 --- a/data/entities/building-simple-attributes-sample.jsonld +++ b/data/entities/building-simple-attributes-sample.jsonld @@ -20,7 +20,6 @@ "value": false }, "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/expectations/building-attributes-query-sample-expectation.jsonld b/data/entities/expectations/building-attributes-query-sample-expectation.jsonld index 332addc2011dd28e62f20e8e41d2cd8756e8a655..e3ffe113fc65c337bb20c694050da631e892d296 100644 --- a/data/entities/expectations/building-attributes-query-sample-expectation.jsonld +++ b/data/entities/expectations/building-attributes-query-sample-expectation.jsonld @@ -1,14 +1,14 @@ { - "id": "urn:ngsi-ld:Building:randomUUID", - "type": "https://uri.fiware.org/ns/data-models#Building", - "https://uri.fiware.org/ns/data-models#airQualityLevel": { + "id": "urn:ngsi-ld:Building:4279250905792670", + "type": "https://ngsi-ld-test-suite/context#Building", + "https://ngsi-ld-test-suite/context#airQualityLevel": { "type": "Property", "value": 4, "observedAt": "2020-09-09T16:40:00.000Z", "unitCode": "C62" }, - "https://uri.fiware.org/ns/data-models#subCategory": { + "https://ngsi-ld-test-suite/context#subCategory": { "type": "Property", "value": "tourism" }, diff --git a/data/entities/expectations/building-location-attribute-sample-expectation-query-geoproperty.jsonld b/data/entities/expectations/building-location-attribute-sample-expectation-query-geoproperty.jsonld index 85a97476a11d8799f81ba95a500d736d225a8d08..dae72da254bbfa0cab9b9cecfca794b1ac4c8a26 100644 --- a/data/entities/expectations/building-location-attribute-sample-expectation-query-geoproperty.jsonld +++ b/data/entities/expectations/building-location-attribute-sample-expectation-query-geoproperty.jsonld @@ -20,6 +20,6 @@ "value": "tourism" }, "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/expectations/building-minimal-sample-expectation.jsonld b/data/entities/expectations/building-minimal-sample-expectation.jsonld index d29ee00f7e52790671193036f764e7a1f4c361ca..2fe6f024fc4246a1369da4a21255c2feee02889b 100644 --- a/data/entities/expectations/building-minimal-sample-expectation.jsonld +++ b/data/entities/expectations/building-minimal-sample-expectation.jsonld @@ -2,6 +2,6 @@ "id": "urn:ngsi-ld:Building:randomUUID", "type": "https://ngsi-ld-test-suite/context#Building", "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/expectations/building-simple-attributes-sample-expectation-query-attributes.jsonld b/data/entities/expectations/building-simple-attributes-sample-expectation-query-attributes.jsonld index 93f2fb86842a57edacef4493aa6bad8bbf77ff02..6f8083d0444bc4a52bcf5348f2bc0883e446315b 100644 --- a/data/entities/expectations/building-simple-attributes-sample-expectation-query-attributes.jsonld +++ b/data/entities/expectations/building-simple-attributes-sample-expectation-query-attributes.jsonld @@ -12,6 +12,6 @@ "value": "tourism" }, "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/expectations/building-simple-attributes-sample-expectation-simplified.jsonld b/data/entities/expectations/building-simple-attributes-sample-expectation-simplified.jsonld index 046ce109db7f1e106e03f9e8393b88e2bf2b318f..014c2d531ef5ecf992f7798a131a46a348e8f3b3 100644 --- a/data/entities/expectations/building-simple-attributes-sample-expectation-simplified.jsonld +++ b/data/entities/expectations/building-simple-attributes-sample-expectation-simplified.jsonld @@ -6,6 +6,6 @@ "https://ngsi-ld-test-suite/context#almostFull": false, "https://ngsi-ld-test-suite/context#subCategory": "tourism", "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/expectations/building-simple-attributes-sample-expectation.jsonld b/data/entities/expectations/building-simple-attributes-sample-expectation.jsonld index 35862406564ccef5bdd38fdebb5b2376afccc24f..3a632ab1501f1d1c711359453a8911ab78603aff 100644 --- a/data/entities/expectations/building-simple-attributes-sample-expectation.jsonld +++ b/data/entities/expectations/building-simple-attributes-sample-expectation.jsonld @@ -20,6 +20,6 @@ "value": "tourism" }, "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/expectations/vehicle-parking-sample-expectation.jsonld b/data/entities/expectations/vehicle-parking-sample-expectation.jsonld index 3eb294f50c5e0eefa486ebda4370ec5fd2e6cc9f..51439a5b047a277df8f5fdf2b3d9465be72b348e 100644 --- a/data/entities/expectations/vehicle-parking-sample-expectation.jsonld +++ b/data/entities/expectations/vehicle-parking-sample-expectation.jsonld @@ -1,57 +1,57 @@ [ { - "id": "urn:ngsi-ld:OffStreetParking:1149507078845158", - "type": "https://uri.fiware.org/ns/data-models#OffStreetParking", - "location": { - "type": "GeoProperty", - "value": { - "type": "Point", - "coordinates": [ - -8.5, - 41.2 - ] - } - }, - "name": { + "id": "urn:ngsi-ld:Vehicle:8012188779712372", + "type": "https://ngsi-ld-test-suite/context#Vehicle", + "https://ngsi-ld-test-suite/context#brandName": { "type": "Property", - "value": "Downtown One" + "value": "Mercedes" }, - "https://uri.fiware.org/ns/data-models#availableSpotNumber": { - "type": "Property", + "isParked": { + "type": "Relationship", "providedBy": { "type": "Relationship", - "object": "urn:ngsi-ld:Camera:C1" + "object": "urn:ngsi-ld:Person:Bob" }, - "value": 121, - "observedAt": "2017-07-29T12:05:02Z", - "https://uri.fiware.org/ns/data-models#reliability": { - "type": "Property", - "value": 0.7 - } - }, - "https://uri.fiware.org/ns/data-models#totalSpotNumber": { - "type": "Property", - "value": 200 + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z" }, "@context": [ "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] }, { - "id": "urn:ngsi-ld:Vehicle:8601152883544931", - "type": "https://uri.fiware.org/ns/data-models#Vehicle", - "isParked": { - "type": "Relationship", + "id": "urn:ngsi-ld:OffStreetParking:8309214349077321", + "type": "https://ngsi-ld-test-suite/context#OffStreetParking", + "availableSpotNumber": { + "type": "Property", "providedBy": { "type": "Relationship", - "object": "urn:ngsi-ld:Person:Bob" + "object": "urn:ngsi-ld:Camera:C1" }, - "object": "urn:ngsi-ld:OffStreetParking:Downtown1", - "observedAt": "2017-07-29T12:00:04Z" + "reliability": { + "type": "Property", + "value": 0.7 + }, + "value": 121, + "observedAt": "2017-07-29T12:05:02Z" }, - "https://uri.fiware.org/ns/data-models#brandName": { + "totalSpotNumber": { "type": "Property", - "value": "Mercedes" + "value": 200 + }, + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.5, + 41.2 + ] + } + }, + "name": { + "type": "Property", + "value": "Downtown One" }, "@context": [ "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" diff --git a/data/entities/fragmentEntities/vehicle-fragment-attribute-name-missing-sample.jsonld b/data/entities/fragmentEntities/vehicle-fragment-attribute-name-missing-sample.jsonld index 1e48b1af0f13ecf29a1126c38b168e485b100fbf..e5f1135dbd58309301b0265acb54f3fea2f1c82a 100644 --- a/data/entities/fragmentEntities/vehicle-fragment-attribute-name-missing-sample.jsonld +++ b/data/entities/fragmentEntities/vehicle-fragment-attribute-name-missing-sample.jsonld @@ -11,7 +11,5 @@ "brandName": { "type": "Property", "value": "BMW" - }, - "@context": - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + } } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-fragment-different-datasetid-sample.jsonld b/data/entities/fragmentEntities/vehicle-fragment-different-datasetid-sample.jsonld index f32c9912c3803bdc21db5deb510ade0df8397b43..42bb70af5bb54f6dcc273f46932569cc8b0f474e 100644 --- a/data/entities/fragmentEntities/vehicle-fragment-different-datasetid-sample.jsonld +++ b/data/entities/fragmentEntities/vehicle-fragment-different-datasetid-sample.jsonld @@ -13,7 +13,6 @@ "value": 23 }, "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-fragment-empty-datasetid-sample.jsonld b/data/entities/fragmentEntities/vehicle-fragment-empty-datasetid-sample.jsonld index af875bdd9c241b0475c2cdb15b185ca8adb9a3f9..54c0d1e17018110fbe7dd63e9e283816ddfa820f 100644 --- a/data/entities/fragmentEntities/vehicle-fragment-empty-datasetid-sample.jsonld +++ b/data/entities/fragmentEntities/vehicle-fragment-empty-datasetid-sample.jsonld @@ -1,14 +1,11 @@ { - "speed": { - "type": "Property", - "value": 56, - "source": { - "type": "Property", - "value": "Speedometer" + "https://ngsi-ld-test-suite/context#isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:JohnDoe" } - }, - "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" - ] -} \ No newline at end of file + } +} diff --git a/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-sample.jsonld b/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-sample.jsonld index 6fdcfbda89aa9225684460fa0c498092ee3f2452..259a93f9279e4c1bb649956d0fd06b43f3b85d40 100644 --- a/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-sample.jsonld +++ b/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-sample.jsonld @@ -1,13 +1,11 @@ { - "speed": { + "https://ngsi-ld-test-suite/context#speed": { "type": "Property", "value": 56, "source": { "type": "Property", "value": "Speedometer" }, - "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" - }, - "@context": - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "datasetId": "12345" + } } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-fragment-invalid-datasetid-sample.jsonld b/data/entities/fragmentEntities/vehicle-fragment-invalid-datasetid-sample.jsonld index efdff7ad94370f921efc402bf473f4d8db7618c1..8368c5bd9981e64cdf7a162fff9ac39620076827 100644 --- a/data/entities/fragmentEntities/vehicle-fragment-invalid-datasetid-sample.jsonld +++ b/data/entities/fragmentEntities/vehicle-fragment-invalid-datasetid-sample.jsonld @@ -7,9 +7,5 @@ "value": "Speedometer" }, "datasetId": "" - }, - "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" - ] + } } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-fragment-same-datasetid-sample.jsonld b/data/entities/fragmentEntities/vehicle-fragment-same-datasetid-sample.jsonld index 62f3ac6c64bacb9f5b17d7c42fadbd99227269a8..c47ce407cdcc90891766bc511b55d744f743b2fb 100644 --- a/data/entities/fragmentEntities/vehicle-fragment-same-datasetid-sample.jsonld +++ b/data/entities/fragmentEntities/vehicle-fragment-same-datasetid-sample.jsonld @@ -11,9 +11,5 @@ "attribute_to_be_added": { "type": "Property", "value": 23 - }, - "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" - ] + } } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-01.jsonld b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-01.jsonld index 2b414e0284996f6f5238f6791b13acdf388dfd38..8c2d18b6499c8f381053092dd3a74739156f1748 100644 --- a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-01.jsonld +++ b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-01.jsonld @@ -17,6 +17,6 @@ } }, "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-02.jsonld b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-02.jsonld index 749042fda885b6852dd184e4404c5930d988e875..0ae499d377f85576332816f80eb87baeccd3ddce 100644 --- a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-02.jsonld +++ b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-02.jsonld @@ -19,6 +19,6 @@ "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" }, "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-03.jsonld b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-03.jsonld index d070c1b78ca12b2c205ae50e847a7414413328e7..a1cfae904943e779c292a8786bc57ff1056cb6f7 100644 --- a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-03.jsonld +++ b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-03.jsonld @@ -19,6 +19,6 @@ "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" }, "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-04.jsonld b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-04.jsonld index b16aa20e29f8d06e02de0c2468d19a116c523268..6794ae23c1f19347959c540dfb78906ba36265cb 100644 --- a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-04.jsonld +++ b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-04.jsonld @@ -19,6 +19,6 @@ "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" }, "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/parking-simple-attributes-sample.jsonld b/data/entities/parking-simple-attributes-sample.jsonld index 385f1929daac07053053b6ec69dbdf2bcb122bb9..982cfb89fa0f0a61036947ee7aee3767e6f307ed 100644 --- a/data/entities/parking-simple-attributes-sample.jsonld +++ b/data/entities/parking-simple-attributes-sample.jsonld @@ -30,7 +30,6 @@ } }, "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/vehicle-datasetid-attributes-sample.jsonld b/data/entities/vehicle-datasetid-attributes-sample.jsonld index c529889988d27e452524042fcfbc5b7b941cb7ef..2cb1d9f15583387c5d1bde9632facb2ce3655a60 100644 --- a/data/entities/vehicle-datasetid-attributes-sample.jsonld +++ b/data/entities/vehicle-datasetid-attributes-sample.jsonld @@ -21,7 +21,7 @@ "type": "Property", "value": "Speedometer" }, - "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" + "datasetId": "12345" }, { "type": "Property", @@ -33,7 +33,6 @@ "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" }], "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/vehicle-simple-attributes-sample.jsonld b/data/entities/vehicle-simple-attributes-sample.jsonld index 556d5af4c7a927f2f3d6dbc3145241bfa3778175..0553c272a3d2d5a750e60e4da70f144b757c1b6e 100644 --- a/data/entities/vehicle-simple-attributes-sample.jsonld +++ b/data/entities/vehicle-simple-attributes-sample.jsonld @@ -15,7 +15,6 @@ } }, "@context": [ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/entities/vehicle-two-datasetid-attributes-sample.jsonld b/data/entities/vehicle-two-datasetid-attributes-sample.jsonld index ec44774f75cd559445d1e0721c629be41c1f3337..729dd4efd1231813ee6cef8a6a562a827d3f5466 100644 --- a/data/entities/vehicle-two-datasetid-attributes-sample.jsonld +++ b/data/entities/vehicle-two-datasetid-attributes-sample.jsonld @@ -33,6 +33,6 @@ "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" }], "@context": [ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 342cca12099c9a144ef012be0fc31025a2a904d8..74de3e93eaccb5aad36edfb00c130ab2dc523e48 100755 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -98,7 +98,7 @@ Query Entities Via POST Run Keyword If ${attrs_length}>0 Set To Dictionary ${params} attrs=${attrs} Run Keyword If '${entity_id_pattern}'!='' Set To Dictionary ${params} idPattern=${entity_id_pattern} Run Keyword If '${geoproperty}'!='' Set To Dictionary ${params} geoproperty=${geoproperty} - ${response}= POST ${ENTITY_OPERATIONS_QUERY_ENDPOINT_PATH} query=${params} headers=${headers} + ${response}= POST ${ENTITY_OPERATIONS_QUERY_ENDPOINT_PATH} body=${params} headers=${headers} Output request Output response [return] ${response} @@ -135,11 +135,10 @@ Append Entity Attributes Append Entity Attributes Using Session [Arguments] ${id} ${filename} ${content_type} ${options} - ${file_content}= Get File ${EXECDIR}/data/entities/fragmentEntities/${fragment_filename} + ${file_content}= Get File ${EXECDIR}/data/entities/fragmentEntities/${filename} Create Session OneRequest ${url} &{headers}= Create Dictionary Content-Type=${content_type} ${response}= POST On Session OneRequest ${ENTITIES_ENDPOINT_PATH}${id}/attrs/ params=options=${options} data=${file_content} headers=${headers} expected_status=any - Output ${response.json()} [return] ${response} Update Entity Attributes Using Session diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 60545bf1faa8975d078b10a887c8990e92a57b60..ba0f8ca248d6bef5bede60a228aaa441323230b7 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -101,10 +101,10 @@ Check Response Body Containing List Containing Entity Elements Check Response Body Containing List Containing Entity Elements With Different Types [Arguments] ${filename} ${entities_representation_ids} ${response_body} ${entities_representation_payload}= Load Json From File ${EXECDIR}/data/entities/expectations/${filename} - ${index}= Set Variable 1 + ${index}= Set Variable 0 FOR ${entity_representation_id} IN @{entities_representation_ids} ${entities_representation_payload}= Update Value To Json ${entities_representation_payload} $.[${index}]..id ${entity_representation_id} - ${index}= Evaluate ${index} - 1 + ${index}= Evaluate ${index} + 1 END Log ${response_body} Log ${entities_representation_payload}