From 260ddd918ed081ef50a698cd9bc944dde7bbde51 Mon Sep 17 00:00:00 2001 From: Gustavo Lopes Date: Mon, 8 Mar 2021 09:34:41 +0000 Subject: [PATCH] reviewed test queries and files context --- .../Consumption/Entity/018_02.robot | 4 +- .../Consumption/Entity/018_03_02.robot | 2 +- .../Consumption/Entity/019_01_01.robot | 2 +- .../Consumption/Entity/019_01_02.robot | 1 - .../Consumption/Entity/019_01_04.robot | 6 +- .../Consumption/Entity/019_01_05.robot | 2 +- .../Consumption/Entity/019_02_01.robot | 5 +- .../Consumption/Entity/019_02_02.robot | 5 +- .../Consumption/Entity/019_02_03.robot | 5 +- .../Consumption/Entity/019_02_04.robot | 3 +- .../Consumption/Entity/019_02_05.robot | 4 +- .../Consumption/Entity/019_03_01.robot | 2 +- .../Consumption/Entity/019_03_02.robot | 2 +- .../Consumption/Entity/019_03_04.robot | 3 +- .../Consumption/Entity/019_03_05.robot | 6 +- .../Consumption/Entity/019_04.robot | 6 +- .../Consumption/Entity/019_05.robot | 5 +- .../Consumption/Entity/019_06.robot | 2 +- .../Entities/CreateEntity/001_01.robot | 5 +- .../Entities/CreateEntity/001_02.robot | 2 +- .../Entities/DeleteEntity/002_02.robot | 9 +-- .../{002_03_.robot => 002_03.robot} | 0 .../Provision/EntityAttributes/010_01.robot | 2 +- .../Provision/EntityAttributes/010_02.robot | 8 +-- .../Provision/EntityAttributes/011_01.robot | 2 +- .../Provision/EntityAttributes/012_01.robot | 11 ++- .../Provision/EntityAttributes/012_03.robot | 4 +- .../Provision/EntityAttributes/013_01.robot | 2 +- .../building-location-attribute-sample.jsonld | 3 +- data/entities/building-minimal-sample.jsonld | 3 +- ...ing-relationship-of-property-sample.jsonld | 3 +- .../building-simple-attributes-sample.jsonld | 3 +- ...attributes-query-sample-expectation.jsonld | 8 +-- ...ample-expectation-query-geoproperty.jsonld | 2 +- ...building-minimal-sample-expectation.jsonld | 2 +- ...sample-expectation-query-attributes.jsonld | 2 +- ...butes-sample-expectation-simplified.jsonld | 2 +- ...imple-attributes-sample-expectation.jsonld | 2 +- .../vehicle-parking-sample-expectation.jsonld | 72 +++++++++---------- ...gment-attribute-name-missing-sample.jsonld | 4 +- ...fragment-different-datasetid-sample.jsonld | 3 +- ...cle-fragment-empty-datasetid-sample.jsonld | 21 +++--- ...cle-fragment-equal-datasetid-sample.jsonld | 8 +-- ...e-fragment-invalid-datasetid-sample.jsonld | 6 +- ...icle-fragment-same-datasetid-sample.jsonld | 6 +- ...-two-datasetid-attributes-sample-01.jsonld | 2 +- ...-two-datasetid-attributes-sample-02.jsonld | 2 +- ...-two-datasetid-attributes-sample-03.jsonld | 2 +- ...-two-datasetid-attributes-sample-04.jsonld | 2 +- .../parking-simple-attributes-sample.jsonld | 3 +- ...vehicle-datasetid-attributes-sample.jsonld | 5 +- .../vehicle-simple-attributes-sample.jsonld | 3 +- ...cle-two-datasetid-attributes-sample.jsonld | 2 +- resources/ApiUtils.resource | 5 +- resources/AssertionUtils.resource | 4 +- 55 files changed, 131 insertions(+), 159 deletions(-) rename TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/{002_03_.robot => 002_03.robot} (100%) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_02.robot index 548f50ed..d7e6dd24 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 534477a0..024706b8 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 f43a979b..d3f04514 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 a4cbc5f3..956bbd04 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 acde9947..1fc43211 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 e50cd66c..c196f7df 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 3472bedf..597ccab9 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 228c4c84..a6d724e9 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 b911217d..3b0aeed3 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 7ffd18b7..aa46bdac 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 36952866..da47aa14 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 7b27ea33..89c08f79 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 79fb8608..22fc2947 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 2ac89ffa..5a8359c5 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 6ab42eb0..1f8048c5 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 c35101b9..5622a072 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 69db1e52..08bef2dc 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 72f7345d..fa326ffd 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 2dc442b9..16841d96 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 afcaa3c1..be92a3fe 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 758ed56a..8b83523b 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 3991a51a..721dc0af 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 17a1ceac..db4e7325 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 f7bc5eef..e2bad05c 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 442c7273..3ca99501 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 07858243..f3b4ab17 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 8b00f797..8361ea94 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 72f7b220..cba71b77 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 2af764ed..e49a2c9a 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 2cca72ea..2b21215c 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 e4394e7c..821498e6 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 332addc2..e3ffe113 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 85a97476..dae72da2 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 d29ee00f..2fe6f024 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 93f2fb86..6f8083d0 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 046ce109..014c2d53 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 35862406..3a632ab1 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 3eb294f5..51439a5b 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 1e48b1af..e5f1135d 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 f32c9912..42bb70af 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 af875bdd..54c0d1e1 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 6fdcfbda..259a93f9 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 efdff7ad..8368c5bd 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 62f3ac6c..c47ce407 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 2b414e02..8c2d18b6 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 749042fd..0ae499d3 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 d070c1b7..a1cfae90 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 b16aa20e..6794ae23 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 385f1929..982cfb89 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 c5298899..2cb1d9f1 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 556d5af4..0553c272 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 ec44774f..729dd4ef 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 342cca12..74de3e93 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 60545bf1..ba0f8ca2 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} -- GitLab