From 6dea859890f912886752b675bbf0ac0f627e3b6c Mon Sep 17 00:00:00 2001 From: Gustavo Lopes Date: Fri, 29 Jan 2021 12:38:46 +0000 Subject: [PATCH 1/2] fixed some tests --- .../Provision/EntityAttributes/001.robot | 10 ++-- .../Provision/EntityAttributes/004.robot | 8 ++-- .../Provision/EntityAttributes/010.robot | 12 ++--- .../Provision/EntityAttributes/011.robot | 4 +- .../Provision/EntityAttributes/012.robot | 4 +- .../Provision/TemporalEntity/001.robot | 27 +++++++++++ .../001_01.robot | 2 +- .../001_02.robot | 2 +- .../001_03.robot | 2 +- .../CreateContextSourceRegistration/002.robot | 2 +- .../CreateContextSourceRegistration/003.robot | 4 +- .../DeleteContextSourceRegistration/007.robot | 4 +- .../DeleteContextSourceRegistration/008.robot | 4 +- .../DeleteContextSourceRegistration/009.robot | 2 +- .../UpdateContextSourceRegistration/004.robot | 4 +- .../UpdateContextSourceRegistration/005.robot | 4 +- .../005_05.robot | 2 +- .../UpdateContextSourceRegistration/006.robot | 2 +- ...ibutes-sample-append-expectation-01.jsonld | 3 -- ...tes-sample-append-expectation-03-04.jsonld | 30 ------------ ...id-attributes-sample-expectation-01.jsonld | 0 ...gment-attribute-name-missing-sample.jsonld | 4 +- ...ual-datasetid-different-type-sample.jsonld | 4 +- ...cle-fragment-equal-datasetid-sample.jsonld | 4 +- ...fied-temporal-representation-sample.jsonld | 22 +++++++++ ...icle-temporal-representation-sample.jsonld | 48 +++++++++++++++++++ ...epresentation-withou-context-sample.jsonld | 44 +++++++++++++++++ resources/ApiUtils.resource | 19 ++++++-- resources/AssertionUtils.resource | 2 + 29 files changed, 197 insertions(+), 82 deletions(-) create mode 100644 TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/001.robot delete mode 100644 data/entities/expectations/vehicle-attributes-sample-append-expectation-01.jsonld delete mode 100644 data/entities/expectations/vehicle-attributes-sample-append-expectation-03-04.jsonld delete mode 100644 data/entities/expectations/vehicle-two-datasetid-attributes-sample-expectation-01.jsonld create mode 100644 data/temporalEntities/vehicle-simplified-temporal-representation-sample.jsonld create mode 100644 data/temporalEntities/vehicle-temporal-representation-sample.jsonld create mode 100644 data/temporalEntities/vehicle-temporal-representation-withou-context-sample.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/001.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/001.robot index 12d0fb6d..d6c2eaff 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/001.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/001.robot @@ -11,16 +11,16 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-datasetid-attributes-sample.jsonld *** Test Cases *** STATUS_CODE OVERWRITE FRAGMENT_FILENAME EXPECTATION_FILENAME -001_01_Append entity attributes 204 ${EMPTY} vehicle-fragment-same-datasetid-sample.jsonld vehicle-attributes-sample-append-expectation-01.jsonld +001_01_Append entity attributes 204 ${EMPTY} vehicle-fragment-same-datasetid-sample.jsonld ${EMPTY} 001_02_Append entity attributes 207 noOverwrite vehicle-fragment-same-datasetid-sample.jsonld vehicle-attributes-sample-append-expectation-02.jsonld -001_03_Append entity attributes 204 ${EMPTY} vehicle-fragment-different-datasetid-sample.jsonld vehicle-attributes-sample-append-expectation-03-04.jsonld -001_04_Append entity attributes 204 noOverwrite vehicle-fragment-different-datasetid-sample.jsonld vehicle-attributes-sample-append-expectation-03-04.jsonld +001_03_Append entity attributes 204 ${EMPTY} vehicle-fragment-different-datasetid-sample.jsonld ${EMPTY} +001_04_Append entity attributes 204 noOverwrite vehicle-fragment-different-datasetid-sample.jsonld ${EMPTY} *** Keywords *** Append Attributes [Arguments] ${status_code} ${overwrite} ${fragment_filename} ${expectation_filename} [Documentation] Check that you can append entity attributes - [Tags] mandatory failing + [Tags] mandatory ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} ${request} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} @@ -28,6 +28,6 @@ Append Attributes ${response}= Append Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} ${overwrite} Check Response Status Code ${status_code} ${response['status']} - Check Response Body Content ${expectation_filename} ${response['body']} + Run Keyword If "${expectation_filename}"!="${EMPTY}" Check Response Body Content ${expectation_filename} ${response['body']} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/004.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/004.robot index 4a2dc46d..196c26bc 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/004.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/004.robot @@ -11,10 +11,10 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-two-datasetid-attributes-sample.jsonld *** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME -004_01_Check that you can update existing attributes with no datasetId 204 vehicle-two-datasetid-attributes-sample-01.jsonld vehicle-two-datasetid-attributes-sample-expectation-01.jsonld -004_02_Check that you can update existing attributes with the datasetId 204 vehicle-two-datasetid-attributes-sample-02.jsonld vehicle-two-datasetid-attributes-sample-expectation-01.jsonld +004_01_Check that you can update existing attributes with no datasetId 204 vehicle-two-datasetid-attributes-sample-01.jsonld ${EMPTY} +004_02_Check that you can update existing attributes with the datasetId 204 vehicle-two-datasetid-attributes-sample-02.jsonld ${EMPTY} 004_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 -004_04_Check that you cannot change the type of the attribute 204 vehicle-two-datasetid-attributes-sample-04.jsonld vehicle-two-datasetid-attributes-sample-expectation-04.jsonld +004_04_Check that you cannot change the type of the attribute 204 vehicle-two-datasetid-attributes-sample-04.jsonld ${EMPTY} *** Keywords *** Update Attributes @@ -28,6 +28,6 @@ Update Attributes ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response['status']} - Check Response Body Content ${expectation_filename} ${response['body']} + Run Keyword If "${expectation_filename}"!="${EMPTY}" Check Response Body Content ${expectation_filename} ${response['body']} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010.robot index 83c959c5..069230f5 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010.robot @@ -4,21 +4,21 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Test Template Append Attributes +Test Template Delete Attributes *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${status_code}= 204 ${filename}= vehicle-two-datasetid-attributes-sample.jsonld -${attribute_id}= speed +${attribute_id}= 'https://uri.fiware.org/ns/data-models#speed' *** Test Cases *** DATASETID DELETEALL -010_01_delete an attribute with the id ${EMPTY} ${EMPTY} -010_02_delete an attribute with the datasetId urn:ngsi-ld:Property:gpsBxyz123-speed ${EMPTY} +010_01_delete an attribute with the id ${EMPTY} False +010_02_delete an attribute with the datasetId urn:ngsi-ld:Property:gpsBxyz123-speed False 010_03_delete all target attribute instances with a datasetId urn:ngsi-ld:Property:gpsBxyz123-speed True *** Keywords *** -Append Attributes +Delete Attributes [Arguments] ${datasetId} ${deleteAll} [Documentation] Check that you can delete an attribute from an entity [Tags] mandatory failing @@ -26,7 +26,7 @@ Append Attributes ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} ${request} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - + Query Entity ${entity_id} ${CONTENT_TYPE_LD_JSON} ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${CONTENT_TYPE_LD_JSON} ${datasetId} ${deleteAll} Check Response Status Code ${status_code} ${response['status']} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011.robot index ebdd033b..0fe427c1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011.robot @@ -5,7 +5,7 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities -Test Template Append Attributes +Test Template Delete Attributes *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -18,7 +18,7 @@ ${filename}= vehicle-two-datasetid-attributes-sample.jsonld 011_03_delete an attribute if the Attribute Name is not present ${valid_entity_id} ${EMPTY} *** Keywords *** -Append Attributes +Delete Attributes [Arguments] ${entity_id} ${attribute_id} [Documentation] Check that you cannot delete an attribute from an entity with invalid/missing ids [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012.robot index 1b64141a..de8dde45 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012.robot @@ -5,7 +5,7 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities -Test Template Append Attributes +Test Template Delete Attributes *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -18,7 +18,7 @@ ${filename}= vehicle-two-datasetid-attributes-sample.jsonld 012_03_delete an attribute when the Entity does not contain the target attribute with same datasetId ${valid_entity_id} speed urn:ngsi-ld:Property:notFound *** Keywords *** -Append Attributes +Delete Attributes [Arguments] ${entity_id} ${attribute_id} ${datasetId} [Documentation] Check that you cannot delete an attribute from an entity with invalid/missing ids [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/001.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/001.robot new file mode 100644 index 00000000..b0743d7f --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/001.robot @@ -0,0 +1,27 @@ +*** Settings *** +Documentation Check that you can create a temporal representation of an entity +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Template Create Temporal Entity + +*** Variable *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: + +*** Test Cases *** FILENAME CONTENT_TYPE +001_01_Create a temporal representation of an entity with simplified temporal representation of an Entity vehicle-simplified-temporal-representation-sample.jsonld application/json +001_02_Create a temporal representation of an entity with simple temporal properties vehicle-temporal-representation-sample.jsonld application/ld+json +001_03_Create an temporal entity with no context vehicle-temporal-representation-withou-context-sample.jsonld application/ld+json + +*** Keywords *** +Create Temporal Entity + [Arguments] ${filename} ${content_type} + [Documentation] Check that you can create a temporal representation of an entity + [Tags] mandatory + + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${response}= Create Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${filename} ${content_type} + Check Response Status Code 201 ${response['status']} + + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_01.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_01.robot index b416b584..48beab75 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_01.robot @@ -17,7 +17,7 @@ Create Context Source Registration With Specific Date Expiration Date ${payload}= Load Json From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 201 ${response['status']} Check Response Headers Containing URI set to ${request['path']}/ ${registration_id} ${response} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_02.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_02.robot index 61fed06c..a45c6ec9 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_02.robot @@ -17,7 +17,7 @@ Create Context Source Registration That Never Expires ${payload}= Load Json From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 201 ${response['status']} Check Response Headers Containing URI set to ${request['path']}/ ${registration_id} ${response} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_03.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_03.robot index bafec59a..32d8e4f0 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_03.robot @@ -15,7 +15,7 @@ Create Context Source Registration Without A Sprecified ID [Tags] mandatory ${payload}= Load Json From File ${EXECDIR}/data/${registration_payload_file_path} - ${request} ${response}= Create Context Source Registration ${payload} + ${request} ${response}= Create Context Source Registration With Return ${payload} Check Response Status Code 201 ${response['status']} ${registration_id}= Check Response Headers ID Not Empty ${response} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/002.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/002.robot index 78b751ee..a5d629f6 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/002.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/002.robot @@ -23,7 +23,7 @@ Create Context Source With Invalid Content ${payload}= Load Json From File ${EXECDIR}/data/${filename} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 400 ${response['status']} Check Response Headers Containing URI set to ${request['path']}/ ${registration_id} ${response} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/003.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/003.robot index 8eabac9e..4274214e 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/003.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/003.robot @@ -16,10 +16,10 @@ Create a context source registration that already exists ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/${filename} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 201 ${response['status']} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 409 ${response['status']} Check Response Body Containing ProblemDetails Element Containing Title Element ${response} diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/007.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/007.robot index 210db5b9..59485637 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/007.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/007.robot @@ -16,8 +16,8 @@ Delete a context source registration by id ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${registration_payload_file_path} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 201 ${response['status']} - ${response}= Delete Context Source Registration ${registration_id} + ${response}= Delete Context Source Registration With Return ${registration_id} Check Response Status Code 204 ${response['status']} diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/008.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/008.robot index b76f552f..e6ec0f24 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/008.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/008.robot @@ -22,10 +22,10 @@ Delete Context Source ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${filename} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 201 ${response['status']} - ${response}= Delete Context Source Registration ${invalid_registration_id} + ${response}= Delete Context Source Registration With Return ${invalid_registration_id} Check Response Status Code 400 ${response['status']} Check Response Body Containing ProblemDetails Element Containing Title Element ${response} diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/009.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/009.robot index 33768c9d..b9406805 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/009.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/009.robot @@ -15,6 +15,6 @@ Delete a context source registration by id [Tags] mandatory ${registration_id}= Generate Random Entity Id ${registration_id_prefix} - ${response}= Delete Context Source Registration ${registration_id} + ${response}= Delete Context Source Registration With Return ${registration_id} Check Response Status Code 404 ${response['status']} Check Response Body Containing ProblemDetails Element Containing Title Element ${response} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/004.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/004.robot index a7aa85cd..e78cef49 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/004.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/004.robot @@ -21,12 +21,12 @@ Update Context Source ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${filename} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 201 ${response['status']} ${fragment}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${update_filename} ${fragment_with_id}= Update Value To Json ${fragment} $..id ${registration_id} - ${response}= Update Context Source Registration ${registration_id} ${fragment_with_id} + ${response}= Update Context Source Registration With Return ${registration_id} ${fragment_with_id} Check Response Status Code 204 ${response['status']} [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005.robot index 265f1d82..d6c7cc0b 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005.robot @@ -24,12 +24,12 @@ Update Context Source [Tags] mandatory ${payload}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${filename} ${updated_payload}= Update Value To Json ${payload} $..id ${valid_registration_id} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 201 ${response['status']} ${fragment}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${fragment_filename} ${fragment_with_id}= Update Value To Json ${fragment} $..id ${registration_id} - ${response}= Update Context Source Registration ${registration_id} ${fragment_with_id} + ${response}= Update Context Source Registration With Return ${registration_id} ${fragment_with_id} Check Response Status Code 400 ${response['status']} Check Response Body Containing ProblemDetails Element Containing Title Element ${response} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005_05.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005_05.robot index 9ba06b7b..21cfb6f6 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005_05.robot @@ -16,7 +16,7 @@ ${registration_payload_file_path}= registration-invalid-sample.jsonld ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${filename} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration ${updated_payload} + ${request} ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 201 ${response['status']} ${response}= Update Context Source Registration Using Session ${registration_id} ${registration_payload_file_path} ${CONTENT_TYPE_LD_JSON} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/006.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/006.robot index 61b079cf..87ba775a 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/006.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/006.robot @@ -15,7 +15,7 @@ ${filename}= registration-sample.jsonld ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${fragment}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${filename} ${fragment_with_id}= Update Value To Json ${fragment} $..id ${registration_id} - ${response}= Update Context Source Registration ${registration_id} ${fragment_with_id} + ${response}= Update Context Source Registration With Return ${registration_id} ${fragment_with_id} Check Response Status Code 404 ${response['status']} Check Response Body Containing ProblemDetails Element Containing Title Element ${response} diff --git a/data/entities/expectations/vehicle-attributes-sample-append-expectation-01.jsonld b/data/entities/expectations/vehicle-attributes-sample-append-expectation-01.jsonld deleted file mode 100644 index 544b7b4d..00000000 --- a/data/entities/expectations/vehicle-attributes-sample-append-expectation-01.jsonld +++ /dev/null @@ -1,3 +0,0 @@ -{ - -} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-attributes-sample-append-expectation-03-04.jsonld b/data/entities/expectations/vehicle-attributes-sample-append-expectation-03-04.jsonld deleted file mode 100644 index e29f4875..00000000 --- a/data/entities/expectations/vehicle-attributes-sample-append-expectation-03-04.jsonld +++ /dev/null @@ -1,30 +0,0 @@ -{ - "id": "urn:ngsi-ld:Vehicle:randomUUID", - "type": "Vehicle", - "brandName": { - "type": "Property", - "value": "Mercedes" - }, - "isParked": { - "type": "Relationship", - "object": "urn:ngsi-ld:OffStreetParking:Downtown1", - "observedAt": "2017-07-29T12:00:04Z", - "providedBy": { - "type": "Relationship", - "object": "urn:ngsi-ld:Person:Bob" - } - }, - "speed": { - "type": "Property", - "value": 56, - "source": { - "type": "Property", - "value": "Speedometer" - }, - "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" - }, - "@context": [ - "https://fiware.github.io/data-models/context.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-two-datasetid-attributes-sample-expectation-01.jsonld b/data/entities/expectations/vehicle-two-datasetid-attributes-sample-expectation-01.jsonld deleted file mode 100644 index e69de29b..00000000 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 10e3efd8..76037606 100644 --- a/data/entities/fragmentEntities/vehicle-fragment-attribute-name-missing-sample.jsonld +++ b/data/entities/fragmentEntities/vehicle-fragment-attribute-name-missing-sample.jsonld @@ -12,8 +12,6 @@ "type": "Property", "value": "BMW" }, - "@context": [ - "https://fiware.github.io/data-models/context.jsonld", + "@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" - ] } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-different-type-sample.jsonld b/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-different-type-sample.jsonld index 05e676e6..bb28f7b3 100644 --- a/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-different-type-sample.jsonld +++ b/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-different-type-sample.jsonld @@ -8,8 +8,6 @@ }, "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" }, - "@context": [ - "https://fiware.github.io/data-models/context.jsonld", + "@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.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 6a85b902..9b220bf4 100644 --- a/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-sample.jsonld +++ b/data/entities/fragmentEntities/vehicle-fragment-equal-datasetid-sample.jsonld @@ -8,8 +8,6 @@ }, "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" }, - "@context": [ - "https://fiware.github.io/data-models/context.jsonld", + "@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" - ] } \ No newline at end of file diff --git a/data/temporalEntities/vehicle-simplified-temporal-representation-sample.jsonld b/data/temporalEntities/vehicle-simplified-temporal-representation-sample.jsonld new file mode 100644 index 00000000..a0f6fe04 --- /dev/null +++ b/data/temporalEntities/vehicle-simplified-temporal-representation-sample.jsonld @@ -0,0 +1,22 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "values": [ + ["Volvo",""] + ] + }, + "speed": { + "type": "Property", + "values": [ + [120,"2018-08-01T12:03:00Z"], + [80,"2018-08-01T12:05:00Z"], + [100,"2018-08-01T12:07:00Z"] + ] + }, + "@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.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/vehicle-temporal-representation-sample.jsonld b/data/temporalEntities/vehicle-temporal-representation-sample.jsonld new file mode 100644 index 00000000..4f095bf1 --- /dev/null +++ b/data/temporalEntities/vehicle-temporal-representation-sample.jsonld @@ -0,0 +1,48 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z" + } + ], + "@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.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/vehicle-temporal-representation-withou-context-sample.jsonld b/data/temporalEntities/vehicle-temporal-representation-withou-context-sample.jsonld new file mode 100644 index 00000000..e3dba459 --- /dev/null +++ b/data/temporalEntities/vehicle-temporal-representation-withou-context-sample.jsonld @@ -0,0 +1,44 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z" + } + ] +} \ No newline at end of file diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 1256b7b1..d3fdfa44 100755 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -163,7 +163,7 @@ Delete Entity Attributes &{params}= Create Dictionary Run Keyword If '${datasetId}'!='' Set To Dictionary ${params} datasetId=${datasetId} Run Keyword If '${deleteAll}'!='' Set To Dictionary ${params} deletelAll=${deleteAll} - ${response}= DELETE ${ENTITIES_ENDPOINT_PATH}${entityId}/attrs/${attributeId} headers=${headers} parameter=${params} + ${response}= DELETE ${ENTITIES_ENDPOINT_PATH}${entityId}/attrs/${attributeId}/?datasetId='${datasetId}' headers=${headers} Output request Output response [return] ${response} @@ -177,7 +177,7 @@ Partial Update Entity Attributes Output response [return] ${response} -Create Context Source Registration +Create Context Source Registration With Return [Arguments] ${payload} &{headers}= Create Dictionary Content-Type=application/ld+json ${response}= POST ${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH} body=${payload} headers=${headers} @@ -194,7 +194,7 @@ Create Context Source Registration Using Session Output ${response.json()} [return] ${response} -Update Context Source Registration +Update Context Source Registration With Return [Arguments] ${registration_id} ${fragment} &{headers}= Create Dictionary Content-Type=application/ld+json ${response}= PATCH ${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${registration_id} body=${fragment} headers=${headers} @@ -212,7 +212,7 @@ Update Context Source Registration Using Session Output response [return] ${response} -Delete Context Source Registration +Delete Context Source Registration With Return [Arguments] ${registration_id} ${response}= DELETE ${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${registration_id} Output request @@ -228,6 +228,17 @@ Create Entity Output request Output response +Create Temporal Representation Of Entity Selecting Content Type + [Arguments] ${temporal_entity_representation_id} ${filename} ${content_type} + ${temporal_entity_representation_payload}= Load Json From File ${EXECDIR}/data/temporalEntities/${filename} + ${temporal_entity_representation}= Update Value To Json ${temporal_entity_representation_payload} $..id ${temporal_entity_representation_id} + + &{headers}= Create Dictionary Content-Type=${content_type} + ${response}= POST ${TEMPORAL_ENTITIES_ENDPOINT_PATH} body=${temporal_entity_representation} headers=${headers} + Output request + Output response + [return] ${response} + Batch Create Entities [Arguments] @{entities_to_be_created} ${content_type}=${CONTENT_TYPE_LD_JSON} ${context}=${EMPTY} ${headers}= Create Dictionary diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 89ca3ddb..415a2d02 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -31,6 +31,8 @@ Check Response Body Containing Array Of URIs set to Check Response Body Content [Arguments] ${expectation_filename} ${response_body} ${entity_payload}= Load Json From File ${EXECDIR}/data/entities/expectations/${expectation_filename} + Output ${response_body} + Output ${entity_payload} ${comparaison_result}= Compare Dictionaries Ignoring Keys ${response_body} ${entity_payload} ${instance_id_regex_expr} Should Be True ${comparaison_result} msg=Entity Comparaison Failed -- GitLab From 456872aa1e4b3d56f6e743c2757e5c76a10387cc Mon Sep 17 00:00:00 2001 From: Gustavo Lopes Date: Tue, 2 Feb 2021 16:34:21 +0000 Subject: [PATCH 2/2] tests renumbering and some fixes --- .../Entity/{001_01.robot => 018_01_01.robot} | 2 +- .../Entity/{001_02.robot => 018_01_02.robot} | 2 +- .../Entity/{001_03.robot => 018_01_03.robot} | 2 +- .../Consumption/Entity/{002.robot => 018_02.robot} | 4 ++-- .../Entity/{003_01.robot => 018_03_01.robot} | 2 +- .../Entity/{003_02.robot => 018_03_02.robot} | 2 +- .../Consumption/Entity/{004.robot => 018_04.robot} | 2 +- .../Consumption/Entity/{005.robot => 018_05.robot} | 2 +- .../Entity/{006_01.robot => 019_01_01.robot} | 2 +- .../Entity/{006_02.robot => 019_01_02.robot} | 2 +- .../Entity/{006_03.robot => 019_01_03.robot} | 2 +- .../Entity/{006_04.robot => 019_01_04.robot} | 2 +- .../Entity/{006_05.robot => 019_01_05.robot} | 2 +- .../Entity/{007_01.robot => 019_02_01.robot} | 2 +- .../Entity/{007_02.robot => 019_02_02.robot} | 2 +- .../Entity/{007_03.robot => 019_02_03.robot} | 2 +- .../Entity/{007_04.robot => 019_02_04.robot} | 2 +- .../Entity/{007_05.robot => 019_02_05.robot} | 2 +- .../Entity/{008_01.robot => 019_03_01.robot} | 2 +- .../Entity/{008_02.robot => 019_03_02.robot} | 2 +- .../Entity/{008_03.robot => 019_03_03.robot} | 2 +- .../Entity/{008_04.robot => 019_03_04.robot} | 2 +- .../Entity/{008_05.robot => 019_03_05.robot} | 2 +- .../Consumption/Entity/{009.robot => 019_04.robot} | 2 +- .../Consumption/Entity/{010.robot => 019_05.robot} | 2 +- .../Consumption/Entity/{011.robot => 019_06.robot} | 2 +- .../CreateEntity/{001.robot => 001_01.robot} | 10 +++++----- .../CreateEntity/{002.robot => 001_02.robot} | 6 +++--- .../CreateEntity/{003.robot => 001_03.robot} | 0 .../DeleteEntity/{004.robot => 002_01.robot} | 2 +- .../DeleteEntity/{005.robot => 002_02.robot} | 4 ++-- .../DeleteEntity/{006.robot => 002_03_.robot} | 2 +- .../EntityAttributes/{001.robot => 010_01.robot} | 8 ++++---- .../EntityAttributes/{002.robot => 010_02.robot} | 4 ++-- .../{002_03.robot => 010_02_03.robot} | 0 .../EntityAttributes/{003.robot => 010_03.robot} | 2 +- .../EntityAttributes/{004.robot => 011_01.robot} | 8 ++++---- .../EntityAttributes/{005.robot => 011_02.robot} | 4 ++-- .../{005_03.robot => 011_02_03.robot} | 0 .../EntityAttributes/{006.robot => 011_04.robot} | 2 +- .../EntityAttributes/{007.robot => 012_01.robot} | 4 ++-- .../EntityAttributes/{008.robot => 012_02.robot} | 12 ++++++------ .../EntityAttributes/{009.robot => 012_03.robot} | 11 +++++------ .../EntityAttributes/{010.robot => 013_01.robot} | 14 +++++++------- .../EntityAttributes/{011.robot => 013_02.robot} | 14 +++++++------- .../EntityAttributes/{012.robot => 013_03.robot} | 12 ++++++------ .../{001_01.robot => 033_01_01.robot} | 0 .../{001_02.robot => 033_01_02.robot} | 0 .../{001_03.robot => 033_01_03.robot} | 0 .../{002.robot => 033_02.robot} | 4 ++-- .../{002_01.robot => 033_02_01.robot} | 0 .../{003.robot => 033_03.robot} | 0 .../{007.robot => 035_01.robot} | 0 .../{008.robot => 035_02.robot} | 4 ++-- .../{009.robot => 035_03.robot} | 0 .../{004.robot => 034_01.robot} | 4 ++-- .../{005.robot => 034_02.robot} | 8 ++++---- .../{005_05.robot => 034_02_05.robot} | 2 +- .../{006.robot => 034_03.robot} | 2 +- ...hicle-two-datasetid-attributes-sample-01.jsonld | 1 - ...hicle-two-datasetid-attributes-sample-02.jsonld | 1 - ...hicle-two-datasetid-attributes-sample-03.jsonld | 1 - ...hicle-two-datasetid-attributes-sample-04.jsonld | 1 - .../vehicle-two-datasetid-attributes-sample.jsonld | 4 +--- resources/ApiUtils.resource | 8 ++------ 65 files changed, 101 insertions(+), 112 deletions(-) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{001_01.robot => 018_01_01.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{001_02.robot => 018_01_02.robot} (96%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{001_03.robot => 018_01_03.robot} (95%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{002.robot => 018_02.robot} (74%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{003_01.robot => 018_03_01.robot} (89%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{003_02.robot => 018_03_02.robot} (95%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{004.robot => 018_04.robot} (95%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{005.robot => 018_05.robot} (94%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{006_01.robot => 019_01_01.robot} (95%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{006_02.robot => 019_01_02.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{006_03.robot => 019_01_03.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{006_04.robot => 019_01_04.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{006_05.robot => 019_01_05.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{007_01.robot => 019_02_01.robot} (94%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{007_02.robot => 019_02_02.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{007_03.robot => 019_02_03.robot} (96%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{007_04.robot => 019_02_04.robot} (96%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{007_05.robot => 019_02_05.robot} (96%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{008_01.robot => 019_03_01.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{008_02.robot => 019_03_02.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{008_03.robot => 019_03_03.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{008_04.robot => 019_03_04.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{008_05.robot => 019_03_05.robot} (97%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{009.robot => 019_04.robot} (95%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{010.robot => 019_05.robot} (94%) rename TP/NGSI-LD/ContextInformation/Consumption/Entity/{011.robot => 019_06.robot} (95%) rename TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/{001.robot => 001_01.robot} (58%) rename TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/{002.robot => 001_02.robot} (75%) rename TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/{003.robot => 001_03.robot} (100%) rename TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/{004.robot => 002_01.robot} (97%) rename TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/{005.robot => 002_02.robot} (76%) rename TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/{006.robot => 002_03_.robot} (91%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{001.robot => 010_01.robot} (69%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{002.robot => 010_02.robot} (88%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{002_03.robot => 010_02_03.robot} (100%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{003.robot => 010_03.robot} (93%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{004.robot => 011_01.robot} (65%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{005.robot => 011_02.robot} (87%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{005_03.robot => 011_02_03.robot} (100%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{006.robot => 011_04.robot} (93%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{007.robot => 012_01.robot} (79%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{008.robot => 012_02.robot} (61%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{009.robot => 012_03.robot} (68%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{010.robot => 013_01.robot} (64%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{011.robot => 013_02.robot} (62%) rename TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/{012.robot => 013_03.robot} (62%) rename TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/{001_01.robot => 033_01_01.robot} (100%) rename TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/{001_02.robot => 033_01_02.robot} (100%) rename TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/{001_03.robot => 033_01_03.robot} (100%) rename TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/{002.robot => 033_02.robot} (77%) rename TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/{002_01.robot => 033_02_01.robot} (100%) rename TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/{003.robot => 033_03.robot} (100%) rename TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/{007.robot => 035_01.robot} (100%) rename TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/{008.robot => 035_02.robot} (88%) rename TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/{009.robot => 035_03.robot} (100%) rename TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/{004.robot => 034_01.robot} (83%) rename TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/{005.robot => 034_02.robot} (70%) rename TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/{005_05.robot => 034_02_05.robot} (95%) rename TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/{006.robot => 034_03.robot} (93%) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/001_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_01_01.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/001_01.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/018_01_01.robot index f6aeac9c..381f3b60 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/001_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_01_01.robot @@ -10,7 +10,7 @@ ${filename}= building-simple-attributes-sample.jsonld ${expectation_filename}= building-simple-attributes-sample-expectation.jsonld *** Test Cases *** -001_01_Get an entity by id +018_01_01_Get an entity by id [Documentation] Check that you can get an entity by id [Tags] mandatory diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/001_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_01_02.robot similarity index 96% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/001_02.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/018_01_02.robot index 8b97f073..d73cf3a1 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/001_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_01_02.robot @@ -12,7 +12,7 @@ ${attribute_airqualitylevel}= https://uri.fiware.org/ns/data-models#airQualityL ${attribute_subcategory}= https://uri.fiware.org/ns/data-models#subCategory *** Test Cases *** -001_02_Query some attributes from an entity +018_01_02_Query some attributes from an entity [Documentation] Check that you can query some attributes from an entity [Tags] mandatory diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/001_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_01_03.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/001_03.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/018_01_03.robot index 76f6b0ed..8ccd23fa 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/001_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_01_03.robot @@ -11,7 +11,7 @@ ${expectation_filename}= building-location-attribute-sample-expectation-query-g ${geometry_property}= location *** Test Cases *** -001_03_Query the geometry property from an entity +018_01_03_Query the geometry property from an entity [Documentation] Check that you can query the geometry property from an entity [Tags] mandatory diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/002.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_02.robot similarity index 74% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/002.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/018_02.robot index 282a9b00..f91428d6 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/002.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 -002_01_Get an entity if the Entity Id is not present ${EMPTY} 400 ${ERROR_TYPE_BAD_REQUEST_DATA} -002_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/003_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_03_01.robot similarity index 89% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/003_01.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/018_03_01.robot index 59647fef..3349a57a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/003_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_03_01.robot @@ -8,7 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Cases *** -003_01_Get an entity if the Entity Id is not known to the system +Get an entity if the Entity Id is not known to the system [Documentation] Check that you cannot get an entity if the entity id or attributes are not known to the system [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/003_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_03_02.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/003_02.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/018_03_02.robot index fd207890..164e4581 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/003_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 *** -003_02_Get an entity if an atris not known to the system +Get an entity if an atris not known to the system [Documentation] Check that you cannot get an entity if an attribute is not known to the system [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/004.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_04.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/004.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/018_04.robot index b74f19dd..ce5a82b2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/004.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_04.robot @@ -11,7 +11,7 @@ ${expectation_filename}= building-simple-attributes-sample-expectation-simplifi ${options_parameter}= keyValues *** Test Cases *** -004_Get an entity in a simplified representation +Get an entity in a simplified representation [Documentation] Check that the queried entity by Id can be returned in a simplified representation [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/005.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_05.robot similarity index 94% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/005.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/018_05.robot index c81cc37a..8ee32f94 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/005.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/018_05.robot @@ -12,7 +12,7 @@ ${options_parameter}= keyValues ${accept_header}= application/geo+json *** Test Cases *** -005_Get an entity by id that can be returned in a geoJSON format +Get an entity by id that can be returned in a geoJSON format [Documentation] Check that the queried entity by id can be returned in a geoJSON format [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_01.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/006_01.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_01.robot index 441ef1eb..075a6e08 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_01.robot @@ -11,7 +11,7 @@ ${expectation_filename}= building-minimal-sample-expectation.jsonld ${entity_type}= https://uri.fiware.org/ns/data-models#Building *** Test Cases *** -006_01_Query several entities based on ids +Query several entities based on ids [Documentation] Check that you can query several entities based on ids [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_02.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/006_02.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_02.robot index be7e684a..a32ec395 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_02.robot @@ -18,7 +18,7 @@ ${parking_entity_type}= https://uri.fiware.org/ns/data-models#OffStreetParking *** Test Cases *** -006_02_Query several entities based on the entities types +Query several entities based on the entities types [Documentation] Check that you can query several entities based on the entities types [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_03.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/006_03.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_03.robot index 7f1ef6db..f97279c1 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_03.robot @@ -12,7 +12,7 @@ ${entity_type}= https://uri.fiware.org/ns/data-models#Building ${entity_id_pattern}= urn:ngsi-ld:Building:.* *** Test Cases *** -006_03_Query several entities based on the given id pattern +Query several entities based on the given id pattern [Documentation] Check that you can query several entities based on the given id pattern [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_04.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/006_04.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_04.robot index 18f59109..afb3db77 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_04.robot @@ -13,7 +13,7 @@ ${attribute_airqualitylevel}= https://uri.fiware.org/ns/data-models#airQualityL ${attribute_subcategory}= https://uri.fiware.org/ns/data-models#subCategory *** Test Cases *** -006_04_Query several entities based on attribute names +Query several entities based on attribute names [Documentation] Check that you can query several entities based on attribute names [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_05.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/006_05.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_05.robot index f4c4ac63..07cfb0ff 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/006_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_01_05.robot @@ -12,7 +12,7 @@ ${entity_type}= https://uri.fiware.org/ns/data-models#Building ${geometry_property}= location *** Test Cases *** -006_05_Query several entities based on a list of properties +Query several entities based on a list of properties [Documentation] Check that you can query entitites based on a list of properties [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_01.robot similarity index 94% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/007_01.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_01.robot index b18df22b..6d6f8cb1 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_01.robot @@ -11,7 +11,7 @@ ${expectation_filename}= building-minimal-sample-expectation.jsonld ${entity_type}= https://uri.fiware.org/ns/data-models#Building *** Test Cases *** -007_01_Query several entities via POST Interaction based on ids +Query several entities via POST Interaction based on ids [Documentation] Check that you can query several entities via POST Interaction based on ids [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_02.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/007_02.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_02.robot index 6f404862..c9717c56 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_02.robot @@ -18,7 +18,7 @@ ${parking_entity_type}= https://uri.fiware.org/ns/data-models#OffStreetParking *** Test Cases *** -007_02_Query several entities via POST Interaction based on the entities types +Query several entities via POST Interaction based on the entities types [Documentation] Check that you can query several entities via POST Interaction based on the entities types [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_03.robot similarity index 96% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/007_03.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_03.robot index fa7d2d66..32e200c0 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_03.robot @@ -12,7 +12,7 @@ ${entity_type}= https://uri.fiware.org/ns/data-models#Building ${entity_id_pattern}= urn:ngsi-ld:Building:.* *** Test Cases *** -007_03_Query several entities via POST Interaction based on the given id pattern +Query several entities via POST Interaction based on the given id pattern [Documentation] Check that you can query several entities via POST Interaction based on the given id pattern [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_04.robot similarity index 96% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/007_04.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_04.robot index 60e03dda..82b7a91e 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_04.robot @@ -13,7 +13,7 @@ ${attribute_airqualitylevel}= https://uri.fiware.org/ns/data-models#airQualityL ${attribute_subcategory}= https://uri.fiware.org/ns/data-models#subCategory *** Test Cases *** -006_04_Query several entities via POST Interaction based on attribute names +Query several entities via POST Interaction based on attribute names [Documentation] Check that you can query several entities via POST Interaction based on attribute names [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_05.robot similarity index 96% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/007_05.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_05.robot index a7ec401a..79e1ce2c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/007_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_02_05.robot @@ -12,7 +12,7 @@ ${entity_type}= https://uri.fiware.org/ns/data-models#Building ${geometry_property}= location *** Test Cases *** -006_05_Query several entities via POST Interaction based on a list of properties +Query several entities via POST Interaction based on a list of properties [Documentation] Check that you can query entitites via POST Interaction based on a list of properties [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_01.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/008_01.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_01.robot index 569d2723..f1f322cb 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_01.robot @@ -12,7 +12,7 @@ ${entity_invalid_id_one}= thisisaninvaliduri1 ${entity_invalid_id_two}= thisisaninvaliduri2 *** Test Cases *** -008_01_Query entities based on incorrect ids +Query entities based on incorrect ids [Documentation] Check that you cannot query entities if the requested ids are incorrect [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_02.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/008_02.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_02.robot index c598a04d..fbe5ef33 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_02.robot @@ -14,7 +14,7 @@ ${invalid_entity_type_two}= invalid_entity_type_two *** Test Cases *** -008_02_Query entities based on incorrect entity types +Query entities based on incorrect entity types [Documentation] Check that you cannot query entities if the requested entity types are incorrect [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_03.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/008_03.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_03.robot index 999e6a45..87739e2b 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_03.robot @@ -11,7 +11,7 @@ ${entity_type}= https://uri.fiware.org/ns/data-models#Building ${invalid_entity_id_pattern}= invalid_entity_id_pattern* *** Test Cases *** -008_03_Query several entities based on incorrect id pattern +Query several entities based on incorrect id pattern [Documentation] Check that you cannot query entities if the requested id pattern is incorrect [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_04.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/008_04.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_04.robot index 86368ca9..bceffdaf 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_04.robot @@ -12,7 +12,7 @@ ${invalid_attribute_one}= invalid_attribute_one ${invalid_attribute_two}= invalid_attribute_two *** Test Cases *** -008_04_Query several entities based on incorrect attribute names +Query several entities based on incorrect attribute names [Documentation] Check that you cannot query entities if the requested attribute names are incorrect [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_05.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/008_05.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_05.robot index b29b3ffc..a89e2924 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/008_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_03_05.robot @@ -11,7 +11,7 @@ ${entity_type}= https://uri.fiware.org/ns/data-models#Building ${invalid_geometry_property}= invalid_geometry_property *** Test Cases *** -008_05_Query several entities based on a list of properties +Query several entities based on a list of properties [Documentation] Check that you can query entitites based on a list of properties [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/009.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_04.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/009.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_04.robot index a5ec04bd..4deb4252 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/009.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_04.robot @@ -12,7 +12,7 @@ ${options_parameter}= keyValues ${entity_type}= https://uri.fiware.org/ns/data-models#Building *** Test Cases *** -009_Query entities in a simplified representation +Query entities in a simplified representation [Documentation] Check that the queried entities by Id can be returned in a simplified representation [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/010.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_05.robot similarity index 94% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/010.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_05.robot index c9df1913..6c07b580 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/010.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_05.robot @@ -12,7 +12,7 @@ ${entity_type}= https://uri.fiware.org/ns/data-models#Building ${accept_header}= application/geo+json *** Test Cases *** -010_Get an entity by id that can be returned in a geoJSON format +Get an entity by id that can be returned in a geoJSON format [Documentation] Check that the queried entities by id can be returned in a geoJSON format [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/011.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_06.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/Entity/011.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Entity/019_06.robot index 0c84970a..d9659dd3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/011.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/019_06.robot @@ -12,7 +12,7 @@ ${entity_type}= https://uri.fiware.org/ns/data-models#Building ${limit}= 2 *** Test Cases *** -011_Query entities specifying a maximum number of results +Query entities specifying a maximum number of results [Documentation] Check that you can query entities specifying a maximum number of results [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot similarity index 58% rename from TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001.robot rename to TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot index 6fa0cd12..2dc442b9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot @@ -10,11 +10,11 @@ Test Template Create Entity Scenarios ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Cases *** FILENAME CONTENT_TYPE -001_01_MinimalEntity building-minimal-without-context-sample.jsonld application/json -001_02_EntityWithSimpleProperties building-simple-attributes-sample.jsonld application/ld+json -001_03_EntityWithRelationshipsProperties building-relationship-of-property-sample.jsonld application/ld+json -001_04_EntityWithNoContext building-minimal-without-context-sample.jsonld application/ld+json -001_05_EntityWithLocationAttribute building-location-attribute.jsonld application/ld+json +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 *** Keywords *** Create Entity Scenarios diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/002.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_02.robot similarity index 75% rename from TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/002.robot rename to TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_02.robot index e552177c..afcaa3c1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/002.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_02.robot @@ -6,9 +6,9 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Test Template Create Entity With Invalid Request Scenarios *** Test Cases *** FILENAME -002_01_InvalidJson invalid-json-sample.jsonld -002_02_EmptyJson empty-sample.jsonld -002_03_EntityWithNoContext building-minimal-without-context-sample.jsonld +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 *** Keywords *** Create Entity With Invalid Request Scenarios diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/003.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_03.robot similarity index 100% rename from TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/003.robot rename to TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_03.robot diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/004.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot similarity index 97% rename from TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/004.robot rename to TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot index ca6c0422..a476e0f0 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/004.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot @@ -8,7 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Case *** -004_Delete an entity +Delete an entity [Documentation] Check that you can delete an entity by id [Tags] mandatory diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/005.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_02.robot similarity index 76% rename from TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/005.robot rename to TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_02.robot index 1a0ee934..758ed56a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/005.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_02.robot @@ -11,8 +11,8 @@ ${entity_id_empty}= ${entity_id_not_valid}= thisisaninvaliduri *** Test Cases *** ENTITY_ID EXPECTED_STATUS_CODE PROBLEM_TYPE -005_01_Delete an entity if the Entity Id is not present ${entity_id_empty} 400 ${ERROR_TYPE_BAD_REQUEST_DATA} -005_02_Delete an entity if the Entity Id is not a valid URI ${entity_id_not_valid} 400 ${ERROR_TYPE_BAD_REQUEST_DATA} +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} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/006.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03_.robot similarity index 91% rename from TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/006.robot rename to TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03_.robot index b71875cf..1c29651d 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/006.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03_.robot @@ -9,7 +9,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${expected_status_code}= 404 *** Test Case *** -006_Delete an entity with an id not known to the system +Delete an entity with an id not known to the system [Documentation] Check that you cannot delete an entity if the entity id is not known to the system [Tags] mandatory diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/001.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot similarity index 69% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/001.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot index d6c2eaff..3991a51a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/001.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot @@ -11,10 +11,10 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-datasetid-attributes-sample.jsonld *** Test Cases *** STATUS_CODE OVERWRITE FRAGMENT_FILENAME EXPECTATION_FILENAME -001_01_Append entity attributes 204 ${EMPTY} vehicle-fragment-same-datasetid-sample.jsonld ${EMPTY} -001_02_Append entity attributes 207 noOverwrite vehicle-fragment-same-datasetid-sample.jsonld vehicle-attributes-sample-append-expectation-02.jsonld -001_03_Append entity attributes 204 ${EMPTY} vehicle-fragment-different-datasetid-sample.jsonld ${EMPTY} -001_04_Append entity attributes 204 noOverwrite vehicle-fragment-different-datasetid-sample.jsonld ${EMPTY} +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} +010_01_04_Append entity attributes 204 noOverwrite vehicle-fragment-different-datasetid-sample.jsonld ${EMPTY} *** Keywords *** Append Attributes diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/002.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_02.robot similarity index 88% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/002.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_02.robot index 66fa4348..2e059f80 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/002.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_02.robot @@ -13,8 +13,8 @@ ${fragment_filename}= vehicle-fragment-same-datasetid-sample.jsonld ${status_code}= 400 *** Test Cases *** ENTITY_INVALID_ID -002_01_Append entity attributes if the entity Id is not present ${EMPTY} -002_02_Append entity attributes if the Entity Id is not a valid URI thisisaninvaliduri +010_02_01_Append entity attributes if the entity Id is not present ${EMPTY} +010_02_02_Append entity attributes if the Entity Id is not a valid URI thisisaninvaliduri *** Keywords *** Append Attributes diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/002_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_02_03.robot similarity index 100% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/002_03.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_02_03.robot diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/003.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_03.robot similarity index 93% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/003.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_03.robot index 7553785b..155aa02c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/003.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_03.robot @@ -9,7 +9,7 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${fragment_filename}= vehicle-fragment-same-datasetid-sample.jsonld *** Test Cases *** -003_Append entity attributes when the entity id is not known to the system +Append entity attributes when the entity id is not known to the system [Documentation] Check that you cannot append entity attributes if the entity id or attributes are not known to the system [Tags] mandatory failing diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/004.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot similarity index 65% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/004.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot index 196c26bc..58c836c2 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/004.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot @@ -11,10 +11,10 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-two-datasetid-attributes-sample.jsonld *** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME -004_01_Check that you can update existing attributes with no datasetId 204 vehicle-two-datasetid-attributes-sample-01.jsonld ${EMPTY} -004_02_Check that you can update existing attributes with the datasetId 204 vehicle-two-datasetid-attributes-sample-02.jsonld ${EMPTY} -004_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 -004_04_Check that you cannot change the type of the attribute 204 vehicle-two-datasetid-attributes-sample-04.jsonld ${EMPTY} +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 +011_01_04_Check that you cannot change the type of the attribute 204 vehicle-two-datasetid-attributes-sample-04.jsonld ${EMPTY} *** Keywords *** Update Attributes diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/005.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_02.robot similarity index 87% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/005.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_02.robot index c3ca676d..851ec9ca 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/005.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_02.robot @@ -12,8 +12,8 @@ ${filename}= vehicle-two-datasetid-attributes-sample.jsonld ${fragment_filename}= vehicle-two-datasetid-attributes-sample-01.jsonld *** Test Cases *** STATUS_CODE ENTITY_INVALID_ID -005_01_Update an attribute if the Entity Id is not present 400 ${EMPTY} -005_02_Update an attribute if the Entity Id is not a valid URI 400 thisisaninvaliduri +011_02_01_Update an attribute if the Entity Id is not present 400 ${EMPTY} +011_02_02_Update an attribute if the Entity Id is not a valid URI 400 thisisaninvaliduri *** Keywords *** Update Attributes diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/005_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_02_03.robot similarity index 100% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/005_03.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_02_03.robot diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/006.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_04.robot similarity index 93% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/006.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_04.robot index 6b1bea6a..e8816488 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/006.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_04.robot @@ -9,7 +9,7 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${fragment_filename}= vehicle-two-datasetid-attributes-sample-01.jsonld *** Test Cases *** -006_Update entity attributes when the entity id is not known to the system +Update entity attributes when the entity id is not known to the system [Documentation] Check that you cannot update entity attributes if the entity id or attributes are not known to the system [Tags] mandatory diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/007.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot similarity index 79% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/007.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot index ea2fb14a..6c379833 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/007.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot @@ -13,8 +13,8 @@ ${attribute_id}= speed ${status_code}= 204 *** Test Cases *** FRAGMENT_FILENAME -007_01_Check that you can partially update an attribute vehicle-fragment-empty-datasetid-sample.jsonld -007_02_CCheck that you can partially update an attribute by specifying the datasetId vehicle-fragment-equal-datasetid-sample.jsonld +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 *** Keywords *** Update Attributes diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/008.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_02.robot similarity index 61% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/008.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_02.robot index 8f9f0238..e9e74050 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/008.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_02.robot @@ -13,12 +13,12 @@ ${filename}= vehicle-two-datasetid-attributes-sample.jsonld ${status_code}= 400 *** Test Cases *** ENTITY_ID ATTRIBUTE_ID FRAGMENT_FILENAME -008_01_Make a partial attribute update if the Entity Id is not present ${EMPTY} speed vehicle-fragment-equal-datasetid-sample.jsonld -008_02_Make a partial attribute update if the Entity Id is not a valid URI thisisaninvaliduri speed vehicle-fragment-equal-datasetid-sample.jsonld -008_03_Make a partial attribute update if the Attribute Name is not present ${valid_entity_id} speed vehicle-fragment-attribute-name-missing-sample.jsonld -008_04_Make a partial attribute update if the Attribute Id is invalid ${valid_entity_id} invalid vehicle-fragment-equal-datasetid-sample.jsonld -008_05_Make a partial attribute update if the Attribute type does not match ${valid_entity_id} speed vehicle-fragment-equal-datasetid-different-type-sample.jsonld -008_06_Make a partial attribute update if the entity fragment is empty ${valid_entity_id} speed vehicle-fragment-all-empty-sample.jsonld +012_02_01_Make a partial attribute update if the Entity Id is not present ${EMPTY} speed vehicle-fragment-equal-datasetid-sample.jsonld +012_02_02_Make a partial attribute update if the Entity Id is not a valid URI thisisaninvaliduri speed vehicle-fragment-equal-datasetid-sample.jsonld +012_02_03_Make a partial attribute update if the Attribute Name is not present ${valid_entity_id} speed vehicle-fragment-attribute-name-missing-sample.jsonld +012_02_04_Make a partial attribute update if the Attribute Id is invalid ${valid_entity_id} invalid vehicle-fragment-equal-datasetid-sample.jsonld +012_02_05_Make a partial attribute update if the Attribute type does not match ${valid_entity_id} speed vehicle-fragment-equal-datasetid-different-type-sample.jsonld +012_02_06_Make a partial attribute update if the entity fragment is empty ${valid_entity_id} speed vehicle-fragment-all-empty-sample.jsonld *** Keywords *** Update Attributes diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/009.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot similarity index 68% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/009.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot index 807efc9d..e69df34a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/009.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot @@ -10,15 +10,14 @@ Test Template Partial Update Attributes *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-datasetid-attributes-sample.jsonld -${fragment_filename}= vehicle-two-datasetid-attributes-sample-01.jsonld ${status_code}= 404 ${attribute_id}= speed -*** Test Cases *** ENTITY_ID FRAGMENT_FILENAME -009_01_Partial update when the Entity Id is not known to the system ${not_found_entity_id} vehicle-fragment-same-datasetid-sample.jsonld -009_02_Partial update when no default instance and no datasetId specified ${valid_entity_id} vehicle-fragment-invalid-datasetid-sample.jsonld -009_03_Partial update when no instance with the datasetId specified ${valid_entity_id} vehicle-fragment-empty-datasetid-sample.jsonld -009_04_Partial update when no instance with the attrId specified ${valid_entity_id} vehicle-fragment-attribute-name-missing-sample.jsonld +*** Test Cases *** ENTITY_ID FRAGMENT_FILENAME +012_03_01_Partial update when the Entity Id is not known to the system ${not_found_entity_id} vehicle-fragment-same-datasetid-sample.jsonld +012_03_02_Partial update when no default instance and no datasetId specified ${valid_entity_id} vehicle-fragment-invalid-datasetid-sample.jsonld +012_03_03_Partial update when no instance with the datasetId specified ${valid_entity_id} vehicle-fragment-empty-datasetid-sample.jsonld +012_03_04_Partial update when no instance with the attrId specified ${valid_entity_id} vehicle-fragment-attribute-name-missing-sample.jsonld *** Keywords *** Partial Update Attributes diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot similarity index 64% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot index 069230f5..9ce044b2 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot @@ -10,12 +10,12 @@ Test Template Delete Attributes ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${status_code}= 204 ${filename}= vehicle-two-datasetid-attributes-sample.jsonld -${attribute_id}= 'https://uri.fiware.org/ns/data-models#speed' +${attribute_id}= speed -*** Test Cases *** DATASETID DELETEALL -010_01_delete an attribute with the id ${EMPTY} False -010_02_delete an attribute with the datasetId urn:ngsi-ld:Property:gpsBxyz123-speed False -010_03_delete all target attribute instances with a datasetId urn:ngsi-ld:Property:gpsBxyz123-speed True +*** 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 *** Keywords *** Delete Attributes @@ -26,8 +26,8 @@ Delete Attributes ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} ${request} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - Query Entity ${entity_id} ${CONTENT_TYPE_LD_JSON} - ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${CONTENT_TYPE_LD_JSON} ${datasetId} ${deleteAll} + + ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${datasetId} ${deleteAll} Check Response Status Code ${status_code} ${response['status']} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_02.robot similarity index 62% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_02.robot index 0fe427c1..be253f2f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_02.robot @@ -12,10 +12,10 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${status_code}= 400 ${filename}= vehicle-two-datasetid-attributes-sample.jsonld -*** Test Cases *** ENTITY_ID ATTRIBUTE_ID -011_01_delete an attribute if the Entity Id is not present ${EMPTY} speed -011_02_delete an attribute if the Entity Id is not a valid URI thisIsAnInvalidURI speed -011_03_delete an attribute if the Attribute Name is not present ${valid_entity_id} ${EMPTY} +*** Test Cases *** ENTITY_ID ATTRIBUTE_ID +013_02_01_delete an attribute if the Entity Id is not present ${EMPTY} speed +013_02_02_delete an attribute if the Entity Id is not a valid URI thisIsAnInvalidURI speed +013_02_03_delete an attribute if the Attribute Name is not present ${valid_entity_id} ${EMPTY} *** Keywords *** Delete Attributes @@ -23,13 +23,13 @@ Delete Attributes [Documentation] Check that you cannot delete an attribute from an entity with invalid/missing ids [Tags] mandatory failing - ${request} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} + ${request} ${response}= Create Entity Selecting Content Type ${filename} ${valid_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${CONTENT_TYPE_LD_JSON} ${EMPTY} ${EMPTY} + ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${EMPTY} false Check Response Status Code ${status_code} ${response['status']} - [Teardown] Delete Entity by Id Returning Response ${entity_id} + [Teardown] Delete Entity by Id Returning Response ${valid_entity_id} Setup Initial Entities ${valid_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_03.robot similarity index 62% rename from TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012.robot rename to TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_03.robot index de8dde45..7f527c1e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_03.robot @@ -12,10 +12,10 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${status_code}= 404 ${filename}= vehicle-two-datasetid-attributes-sample.jsonld -*** Test Cases *** ENTITY_ID ATTRIBUTE_ID DATASETID -012_01_delete an attribute when the Entity Id is not known to the system ${not_found_entity_id} speed urn:ngsi-ld:Property:gpsBxyz123-speed -012_02_delete an attribute when the Entity does not contain the target attribute id ${valid_entity_id} notFound ${EMPTY} -012_03_delete an attribute when the Entity does not contain the target attribute with same datasetId ${valid_entity_id} speed urn:ngsi-ld:Property:notFound +*** Test Cases *** ENTITY_ID ATTRIBUTE_ID DATASETID +013_03_01_delete an attribute when the Entity Id is not known to the system ${not_found_entity_id} speed urn:ngsi-ld:Property:gpsBxyz123-speed +013_03_02_delete an attribute when the Entity does not contain the target attribute id ${valid_entity_id} notFound ${EMPTY} +013_03_03_delete an attribute when the Entity does not contain the target attribute with same datasetId ${valid_entity_id} speed urn:ngsi-ld:Property:notFound *** Keywords *** Delete Attributes @@ -23,10 +23,10 @@ Delete Attributes [Documentation] Check that you cannot delete an attribute from an entity with invalid/missing ids [Tags] mandatory failing - ${request} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} + ${request} ${response}= Create Entity Selecting Content Type ${filename} ${valid_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${CONTENT_TYPE_LD_JSON} ${datasetId} ${EMPTY} + ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${datasetId} false Check Response Status Code ${status_code} ${response['status']} [Teardown] Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_01.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot similarity index 100% rename from TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_01.robot rename to TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_02.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot similarity index 100% rename from TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_02.robot rename to TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_03.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot similarity index 100% rename from TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/001_03.robot rename to TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/002.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_02.robot similarity index 77% rename from TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/002.robot rename to TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_02.robot index a5d629f6..bd9a79ff 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/002.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_02.robot @@ -11,8 +11,8 @@ Test Template Create Context Source With Invalid Content ${registration_id_prefix}= urn:ngsi-ld:Registration: *** Test Cases *** FILENAME -002_02_Create a context source registration with a different data structure than CsourRegistration data type csourceRegistrations/registration-invalid-structure-sample.jsonld -002_03_Create a context source registration with a date in the past csourceRegistrations/registration-past-expiration-sample.jsonld +033_02_02_Create a context source registration with a different data structure than CsourRegistration data type csourceRegistrations/registration-invalid-structure-sample.jsonld +033_02_03_Create a context source registration with a date in the past csourceRegistrations/registration-past-expiration-sample.jsonld *** Keywords *** Create Context Source With Invalid Content diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/002_01.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_02_01.robot similarity index 100% rename from TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/002_01.robot rename to TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_02_01.robot diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/003.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_03.robot similarity index 100% rename from TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/003.robot rename to TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_03.robot diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/007.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot similarity index 100% rename from TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/007.robot rename to TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/008.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot similarity index 88% rename from TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/008.robot rename to TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot index e6ec0f24..479a314a 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/008.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot @@ -11,8 +11,8 @@ ${registration_id_prefix}= urn:ngsi-ld:Registration: ${filename}= registration-sample.jsonld *** Test Case *** INVALID_REGISTRATION_ID -008_01_Delete a Context Source Registration if the Id is not present ${EMPTY} -008_02_Delete a Context Source Registration if the Id is not a valid URI invalidURI +035_02_01_Delete a Context Source Registration if the Id is not present ${EMPTY} +035_02_02_Delete a Context Source Registration if the Id is not a valid URI invalidURI *** Keywords *** Delete Context Source diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/009.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_03.robot similarity index 100% rename from TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/009.robot rename to TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_03.robot diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/004.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot similarity index 83% rename from TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/004.robot rename to TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot index e78cef49..26c54f63 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/004.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot @@ -10,8 +10,8 @@ Test Template Update Context Source ${registration_id_prefix}= urn:ngsi-ld:Registration: *** Test Case *** FILENAME UPDATE_FILENAME -004_01_Update a context source registration by id registration-sample.jsonld registration-with-expiration-sample.jsonld -004_02_Update a context source registration to never expire registration-with-expiration-sample.jsonld registration-sample.jsonld +034_01_01_Update a context source registration by id registration-sample.jsonld registration-with-expiration-sample.jsonld +034_01_02_Update a context source registration to never expire registration-with-expiration-sample.jsonld registration-sample.jsonld *** Keywords *** Update Context Source diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot similarity index 70% rename from TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005.robot rename to TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot index d6c7cc0b..1068f5b2 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot @@ -12,10 +12,10 @@ ${registration_id_prefix}= urn:ngsi-ld:Registration: ${filename}= registration-sample.jsonld *** Test Case *** REGISTRATION_ID FRAGMENT_FILENAME -005_01_Update a context source registration by id if the Id is not present ${EMPTY} registration-with-expiration-sample.jsonld -005_02_Update a context source registration by id if the Id is not a valid URI invalidURI registration-with-expiration-sample.jsonld -005_03_Update a context source registration if the request body is not of the same data type ${valid_registration_id} registration-different-type-sample.jsonld -005_04_Update a context source registration if you attempt to remove a mandatory property ${valid_registration_id} registration-invalid-structure-sample.jsonld +034_02_01_Update a context source registration by id if the Id is not present ${EMPTY} registration-with-expiration-sample.jsonld +034_02_02_Update a context source registration by id if the Id is not a valid URI invalidURI registration-with-expiration-sample.jsonld +034_02_03_Update a context source registration if the request body is not of the same data type ${valid_registration_id} registration-different-type-sample.jsonld +034_02_04_Update a context source registration if you attempt to remove a mandatory property ${valid_registration_id} registration-invalid-structure-sample.jsonld *** Keywords *** Update Context Source diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005_05.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02_05.robot similarity index 95% rename from TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005_05.robot rename to TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02_05.robot index 21cfb6f6..0d986b93 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/005_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02_05.robot @@ -10,7 +10,7 @@ ${filename}= registration-sample.jsonld ${registration_payload_file_path}= registration-invalid-sample.jsonld *** Test Case *** -005_04_Update a context source registration if the request body is invalid +Update a context source registration if the request body is invalid [Documentation] Check that you cannot update a context source registration if the request body is invalid [Tags] mandatory ${registration_id}= Generate Random Entity Id ${registration_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/006.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_03.robot similarity index 93% rename from TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/006.robot rename to TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_03.robot index 87ba775a..9bdb1b5c 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/006.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_03.robot @@ -9,7 +9,7 @@ ${registration_id_prefix}= urn:ngsi-ld:Registration: ${filename}= registration-sample.jsonld *** Test Case *** -006_Update a context source registration by id if the id is not known to the system +Update a context source registration by id if the id is not known to the system [Documentation] Check that you cannot update a context source registration by id if the id is not known to the system [Tags] mandatory ${registration_id}= Generate Random Entity Id ${registration_id_prefix} 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 115393ad..f8455144 100644 --- a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-01.jsonld +++ b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-01.jsonld @@ -17,7 +17,6 @@ } }, "@context": [ - "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-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 5a0ece28..e108e52c 100644 --- a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-02.jsonld +++ b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-02.jsonld @@ -19,7 +19,6 @@ "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" }, "@context": [ - "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-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 b18c7a96..17a6c11d 100644 --- a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-03.jsonld +++ b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-03.jsonld @@ -19,7 +19,6 @@ "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" }, "@context": [ - "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-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 a906bcc3..e442fe0d 100644 --- a/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-04.jsonld +++ b/data/entities/fragmentEntities/vehicle-two-datasetid-attributes-sample-04.jsonld @@ -19,7 +19,6 @@ "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" }, "@context": [ - "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-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 7e83ea23..334902b0 100644 --- a/data/entities/vehicle-two-datasetid-attributes-sample.jsonld +++ b/data/entities/vehicle-two-datasetid-attributes-sample.jsonld @@ -21,8 +21,7 @@ "source": { "type": "Property", "value": "Speedometer" - }, - "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" + } }, { "type": "Property", @@ -34,7 +33,6 @@ "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" }], "@context": [ - "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } \ No newline at end of file diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index d3fdfa44..ca87fce1 100755 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -158,12 +158,8 @@ Update Entity Attributes [return] ${response} Delete Entity Attributes - [Arguments] ${entityId} ${attributeId} ${content_type} ${datasetId} ${deleteAll} - &{headers}= Create Dictionary Content-Type=${content_type} - &{params}= Create Dictionary - Run Keyword If '${datasetId}'!='' Set To Dictionary ${params} datasetId=${datasetId} - Run Keyword If '${deleteAll}'!='' Set To Dictionary ${params} deletelAll=${deleteAll} - ${response}= DELETE ${ENTITIES_ENDPOINT_PATH}${entityId}/attrs/${attributeId}/?datasetId='${datasetId}' headers=${headers} + [Arguments] ${entityId} ${attributeId} ${datasetId} ${deleteAll} + ${response}= DELETE ${ENTITIES_ENDPOINT_PATH}${entityId}/attrs/${attributeId}?datasetId=${datasetId}&deleteAll=${deleteAll} Output request Output response [return] ${response} -- GitLab