From e5614272d1728b460d8933a7d07de5e936356a36 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Sun, 8 Jun 2025 15:53:28 +0200 Subject: [PATCH] refactor: load entity and generate id keywords - use specialised Generate Id keywords and avoid declaring ids prefix in the Test Cases - reorder declaration of Resources in Test Cases - keep Load Entity but make it use Load Test Sample --- .../VerifyGETWithoutAccept/045_01.robot | 19 +++---- .../VerifyLdContextNotAvailable/043_01.robot | 17 +++---- .../VerifyMergePatchJson/044_01.robot | 10 ++-- .../VerifyMergePatchJson/044_02.robot | 4 +- .../VerifyNotAcceptableMediaType/049_01.robot | 15 +++--- .../VerifyNotAcceptableMediaType/049_02.robot | 10 ++-- .../VerifyUnsupportedMediaType/048_01.robot | 19 +++---- .../027_01.robot | 6 +-- .../027_02.robot | 8 +-- .../RetrieveAvailableAttributes/025_01.robot | 6 +-- .../024_01.robot | 8 +-- .../024_02.robot | 10 ++-- .../RetrieveAvailableEntityTypes/022_01.robot | 11 ++-- .../026_01.robot | 6 +-- .../023_01.robot | 11 ++-- .../Entity/QueryEntities/019_01_01.robot | 10 ++-- .../Entity/QueryEntities/019_01_02.robot | 12 ++--- .../Entity/QueryEntities/019_01_03.robot | 8 +-- .../Entity/QueryEntities/019_01_04.robot | 8 +-- .../Entity/QueryEntities/019_01_05.robot | 8 +-- .../Entity/QueryEntities/019_01_06.robot | 8 +-- .../Entity/QueryEntities/019_02_01.robot | 10 ++-- .../Entity/QueryEntities/019_02_02.robot | 11 ++-- .../Entity/QueryEntities/019_02_03.robot | 8 +-- .../Entity/QueryEntities/019_02_04.robot | 9 ++-- .../Entity/QueryEntities/019_02_05.robot | 4 +- .../Entity/QueryEntities/019_02_06.robot | 10 ++-- .../Entity/QueryEntities/019_03_01.robot | 8 +-- .../Entity/QueryEntities/019_03_02.robot | 9 ++-- .../Entity/QueryEntities/019_03_03.robot | 8 +-- .../Entity/QueryEntities/019_03_04.robot | 8 +-- .../Entity/QueryEntities/019_03_05.robot | 20 ++++---- .../Entity/QueryEntities/019_04.robot | 10 ++-- .../Entity/QueryEntities/019_05.robot | 3 +- .../Entity/QueryEntities/019_06.robot | 16 +++--- .../Entity/QueryEntities/019_07.robot | 8 +-- .../Entity/QueryEntities/019_08.robot | 9 ++-- .../Entity/QueryEntities/019_09.robot | 12 ++--- .../Entity/QueryEntities/019_10.robot | 13 ++--- .../Entity/QueryEntities/019_11.robot | 11 ++-- .../Entity/RetrieveEntity/018_01_01.robot | 6 +-- .../Entity/RetrieveEntity/018_01_02.robot | 6 +-- .../Entity/RetrieveEntity/018_03_01.robot | 7 +-- .../Entity/RetrieveEntity/018_03_02.robot | 6 +-- .../Entity/RetrieveEntity/018_04.robot | 6 +-- .../Entity/RetrieveEntity/018_05.robot | 8 +-- .../Entity/RetrieveEntity/018_06.robot | 6 +-- .../Entity/RetrieveEntity/018_07.robot | 8 +-- .../Entity/RetrieveEntity/018_08.robot | 8 +-- .../Entity/RetrieveEntity/018_09.robot | 8 +-- .../021_01.robot | 2 +- .../021_05.robot | 2 +- .../021_11.robot | 8 +-- .../021_12.robot | 4 +- .../021_13.robot | 2 +- .../021_14.robot | 2 +- .../021_15.robot | 6 +-- .../021_16.robot | 6 +-- .../021_17.robot | 4 +- .../020_01.robot | 4 +- .../020_02.robot | 4 +- .../020_03.robot | 4 +- .../020_04.robot | 4 +- .../020_05.robot | 4 +- .../020_08.robot | 4 +- .../020_09.robot | 4 +- .../020_10.robot | 4 +- .../020_11.robot | 4 +- .../020_12.robot | 4 +- .../020_13.robot | 4 +- .../020_14.robot | 4 +- .../020_17.robot | 6 +-- .../020_18.robot | 6 +-- .../020_19.robot | 6 +-- .../020_20.robot | 6 +-- .../CreateBatchOfEntities/003_01.robot | 11 ++-- .../CreateBatchOfEntities/003_02.robot | 13 ++--- .../CreateBatchOfEntities/003_04.robot | 11 ++-- .../CreateBatchOfEntities/003_05.robot | 11 ++-- .../CreateBatchOfEntities/003_06.robot | 7 +-- .../CreateBatchOfEntities/003_07.robot | 11 ++-- .../CreateBatchOfEntities/003_08.robot | 7 +-- .../CreateBatchOfEntities/003_09.robot | 7 +-- .../CreateBatchOfEntities/003_10.robot | 11 ++-- .../DeleteBatchOfEntities/006_01.robot | 11 ++-- .../DeleteBatchOfEntities/006_02.robot | 11 ++-- .../DeleteBatchOfEntities/006_04.robot | 11 ++-- .../MergeBatchOfEntities/057_01.robot | 8 +-- .../MergeBatchOfEntities/057_02.robot | 10 ++-- .../UpdateBatchOfEntities/005_01.robot | 8 +-- .../UpdateBatchOfEntities/005_02.robot | 8 +-- .../UpdateBatchOfEntities/005_03.robot | 10 ++-- .../UpdateBatchOfEntities/005_05.robot | 8 +-- .../UpsertBatchOfEntities/004_01.robot | 11 ++-- .../UpsertBatchOfEntities/004_02.robot | 13 ++--- .../UpsertBatchOfEntities/004_03.robot | 11 ++-- .../UpsertBatchOfEntities/004_04.robot | 8 +-- .../UpsertBatchOfEntities/004_05.robot | 16 +++--- .../UpsertBatchOfEntities/004_07.robot | 11 ++-- .../UpsertBatchOfEntities/004_08.robot | 11 ++-- .../Entities/CreateEntity/001_01.robot | 9 ++-- .../Entities/CreateEntity/001_03.robot | 8 +-- .../Entities/CreateEntity/001_04.robot | 10 ++-- .../Entities/CreateEntity/001_05.robot | 10 ++-- .../Entities/CreateEntity/001_06.robot | 6 +-- .../Entities/CreateEntity/001_07.robot | 10 ++-- .../Entities/CreateEntity/001_08.robot | 6 +-- .../Entities/CreateEntity/001_09.robot | 6 +-- .../Entities/CreateEntity/001_10.robot | 9 ++-- .../Entities/CreateEntity/001_11.robot | 9 ++-- .../Entities/CreateEntity/001_12.robot | 10 ++-- .../Entities/CreateEntity/001_13.robot | 10 ++-- .../Entities/DeleteEntity/002_01.robot | 9 ++-- .../Entities/DeleteEntity/002_03.robot | 4 +- .../Entities/MergeEntity/056_01.robot | 6 +-- .../Entities/MergeEntity/056_02.robot | 6 +-- .../Entities/MergeEntity/056_03.robot | 6 +-- .../Entities/MergeEntity/056_04.robot | 6 +-- .../Entities/MergeEntity/056_05.robot | 6 +-- .../Entities/ReplaceEntity/054_01.robot | 6 +-- .../Entities/ReplaceEntity/054_02.robot | 6 +-- .../Entities/ReplaceEntity/054_03.robot | 6 +-- .../AppendEntityAttributes/010_01.robot | 8 +-- .../AppendEntityAttributes/010_02.robot | 4 +- .../AppendEntityAttributes/010_03.robot | 4 +- .../AppendEntityAttributes/010_04.robot | 4 +- .../AppendEntityAttributes/010_05.robot | 4 +- .../AppendEntityAttributes/010_06.robot | 8 +-- .../AppendEntityAttributes/010_07.robot | 6 +-- .../AppendEntityAttributes/010_08.robot | 6 +-- .../AppendEntityAttributes/010_09.robot | 6 +-- .../DeleteEntityAttribute/013_01.robot | 12 ++--- .../DeleteEntityAttribute/013_02.robot | 6 +-- .../DeleteEntityAttribute/013_03.robot | 10 ++-- .../DeleteEntityAttribute/013_04.robot | 6 +-- .../DeleteEntityAttribute/013_05.robot | 6 +-- .../DeleteEntityAttribute/013_06.robot | 6 +-- .../PartialAttributeUpdate/012_01.robot | 10 ++-- .../PartialAttributeUpdate/012_02.robot | 8 +-- .../PartialAttributeUpdate/012_03.robot | 12 ++--- .../PartialAttributeUpdate/012_04.robot | 10 ++-- .../PartialAttributeUpdate/012_05.robot | 8 +-- .../PartialAttributeUpdate/012_06.robot | 8 +-- .../PartialAttributeUpdate/012_07.robot | 8 +-- .../ReplaceEntityAttribute/055_01.robot | 6 +-- .../ReplaceEntityAttribute/055_02.robot | 6 +-- .../ReplaceEntityAttribute/055_03.robot | 6 +-- .../UpdateEntityAttributes/011_01.robot | 8 +-- .../UpdateEntityAttributes/011_02.robot | 7 +-- .../UpdateEntityAttributes/011_03.robot | 4 +- .../UpdateEntityAttributes/011_04.robot | 6 +-- .../UpdateEntityAttributes/011_05.robot | 6 +-- .../UpdateEntityAttributes/011_06.robot | 8 +-- .../UpdateEntityAttributes/011_07.robot | 8 +-- .../UpdateEntityAttributes/011_08.robot | 8 +-- .../UpdateEntityAttributes/011_09.robot | 8 +-- .../007_01.robot | 9 ++-- .../009_01.robot | 8 +-- .../009_02.robot | 4 -- .../009_03.robot | 6 +-- .../008_01.robot | 6 +-- .../AddAttributes/014_01.robot | 6 +-- .../AddAttributes/014_02.robot | 4 +- .../AddAttributes/014_03.robot | 4 +- .../AddAttributes/014_04.robot | 4 +- .../DeleteAttribute/015_01.robot | 12 ++--- .../DeleteAttribute/015_02.robot | 8 +-- .../DeleteAttribute/015_03.robot | 10 ++-- .../DeleteAttributeInstance/017_01.robot | 6 +-- .../DeleteAttributeInstance/017_02.robot | 10 ++-- .../DeleteAttributeInstance/017_03.robot | 12 ++--- .../016_01.robot | 6 +-- .../016_02.robot | 6 +-- .../016_03.robot | 8 +-- .../CreateSubscription/028_01.robot | 4 +- .../CreateSubscription/028_04.robot | 4 +- .../DeleteSubscription/032_03.robot | 4 +- .../QuerySubscriptions/031_01.robot | 8 +-- .../QuerySubscriptions/031_02.robot | 8 +-- .../RetrieveSubscription/030_03.robot | 4 +- .../046_01.robot | 9 ++-- .../046_02.robot | 9 ++-- .../046_03.robot | 11 ++-- .../046_04.robot | 9 ++-- .../046_05.robot | 9 ++-- .../046_06.robot | 9 ++-- .../046_07.robot | 9 ++-- .../046_08.robot | 9 ++-- .../046_09.robot | 9 ++-- .../046_10.robot | 8 ++- .../046_11.robot | 9 ++-- .../046_12.robot | 9 ++-- .../046_13.robot | 11 ++-- .../046_14.robot | 9 ++-- .../046_15.robot | 9 ++-- .../046_16_01.robot | 9 ++-- .../046_16_02.robot | 9 ++-- .../046_17.robot | 9 ++-- .../046_18.robot | 9 ++-- .../046_21_01.robot | 2 +- .../046_21_02.robot | 2 +- .../046_22_01.robot | 2 +- .../046_22_02.robot | 2 +- .../046_22_03.robot | 2 +- .../046_22_04.robot | 2 +- .../046_22_05.robot | 2 +- .../046_22_06.robot | 2 +- .../046_22_07.robot | 2 +- .../046_22_08.robot | 2 +- .../046_22_09.robot | 2 +- .../046_22_10.robot | 2 +- .../046_22_11.robot | 2 +- .../046_22_12.robot | 2 +- .../046_22_13.robot | 2 +- .../MQTT/058_01.robot | 9 ++-- .../MQTT/058_02.robot | 9 ++-- .../MQTT/058_03.robot | 9 ++-- .../MQTT/058_04.robot | 9 ++-- .../UpdateSubscription/029_03.robot | 4 +- .../UpdateSubscription/029_04.robot | 4 +- .../UpdateSubscription/029_05.robot | 4 +- .../UpdateSubscription/029_06.robot | 4 +- .../UpdateSubscription/029_07.robot | 4 +- .../UpdateSubscription/029_08.robot | 4 +- .../UpdateSubscription/029_09.robot | 4 +- .../UpdateSubscription/029_10.robot | 4 +- .../UpdateSubscription/029_11.robot | 4 +- .../037_01.robot | 6 +-- .../037_04.robot | 4 +- .../037_05.robot | 7 +-- .../037_06.robot | 4 +- .../037_07.robot | 4 +- .../037_08.robot | 4 +- .../037_09.robot | 4 +- .../037_10.robot | 8 +-- .../037_11.robot | 8 +-- .../036_03.robot | 4 +- .../036_04.robot | 4 +- .../036_05.robot | 4 +- .../035_01.robot | 4 +- .../035_02.robot | 6 +-- .../035_03.robot | 4 +- .../RegisterContextSource/033_01_01.robot | 4 +- .../RegisterContextSource/033_01_02.robot | 6 +-- .../RegisterContextSource/033_01_03.robot | 3 +- .../RegisterContextSource/033_02.robot | 1 - .../RegisterContextSource/033_03.robot | 6 +-- .../RegisterContextSource/033_04.robot | 8 +-- .../RegisterContextSource/033_05.robot | 8 +-- .../RegisterContextSource/033_06.robot | 4 +- .../RegisterContextSource/033_07.robot | 8 +-- .../RegisterContextSource/033_08.robot | 4 +- .../RegisterContextSource/033_09.robot | 4 +- .../RegisterContextSource/033_10.robot | 7 +-- .../034_01.robot | 9 ++-- .../034_02.robot | 4 +- .../034_03.robot | 8 +-- .../034_04.robot | 6 +-- .../034_05.robot | 9 ++-- .../034_06.robot | 4 +- .../047_01.robot | 9 ++-- .../047_02.robot | 9 ++-- .../047_03.robot | 9 ++-- .../047_04.robot | 9 ++-- .../047_05.robot | 9 ++-- .../047_06.robot | 9 ++-- .../047_07.robot | 9 ++-- .../047_08.robot | 9 ++-- .../047_09.robot | 9 ++-- .../047_10.robot | 9 ++-- .../047_11.robot | 9 ++-- .../047_12.robot | 9 ++-- .../047_13.robot | 9 ++-- .../047_14.robot | 9 ++-- .../047_15.robot | 9 ++-- .../047_16.robot | 11 ++-- .../038_01.robot | 5 +- .../038_03.robot | 4 +- .../038_04.robot | 4 +- .../038_05.robot | 4 +- .../038_06.robot | 4 +- .../038_07.robot | 4 +- .../038_08.robot | 4 +- .../038_09.robot | 4 +- .../042_01.robot | 4 +- .../041_01.robot | 6 +-- .../041_02.robot | 8 +-- .../041_03.robot | 8 +-- .../040_01.robot | 3 +- .../039_01.robot | 4 +- .../039_04.robot | 4 +- .../039_05.robot | 4 +- .../Entity/QueryEntities/D011_01_01_inc.robot | 13 +++-- .../Entity/QueryEntities/D011_01_02_inc.robot | 13 +++-- .../Entity/QueryEntities/D011_01_03_inc.robot | 15 +++--- .../Entity/QueryEntities/D011_01_04_inc.robot | 15 +++--- .../Entity/QueryEntities/D011_01_05_inc.robot | 13 +++-- .../Entity/QueryEntities/D011_02_inc.robot | 13 +++-- .../Entity/RetrieveEntity/D010_01_inc.robot | 13 +++-- .../Entity/RetrieveEntity/D010_02_inc.robot | 13 +++-- .../Entities/CreateEntity/D001_01_inc.robot | 13 +++-- .../Entities/CreateEntity/D001_02_inc.robot | 11 ++-- .../CreateEntity/D001_03_01_inc.robot | 13 +++-- .../CreateEntity/D001_03_02_inc.robot | 13 +++-- .../CreateEntity/D001_03_03_inc.robot | 13 +++-- .../Entities/DeleteEntity/D002_01_inc.robot | 13 +++-- .../DeleteEntity/D002_02_01_inc.robot | 13 +++-- .../DeleteEntity/D002_02_02_inc.robot | 13 +++-- .../UpdateEntityAttributes/D004_01_inc.robot | 13 +++-- .../Consumption/ListContexts/052_06.robot | 2 +- .../Consumption/ListContexts/052_07.robot | 16 +++--- .../Consumption/ServeContext/053_04.robot | 2 +- .../Consumption/ServeContext/053_05.robot | 6 +-- .../Consumption/ServeContext/053_06.robot | 11 ++-- .../Consumption/ServeContext/053_08.robot | 5 +- .../Provision/AddContext/050_04.robot | 18 +++---- .../Provision/DeleteContext/051_03.robot | 16 +++--- .../Provision/DeleteContext/051_05.robot | 6 +-- .../Provision/DeleteContext/051_06.robot | 2 +- .../Provision/DeleteContext/051_07.robot | 2 +- resources/ApiUtils/Common.resource | 50 +++++++++++++++++-- resources/JsonUtils.resource | 29 +++-------- resources/SubscriptionUtils.resource | 4 +- 323 files changed, 1159 insertions(+), 1306 deletions(-) diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyGETWithoutAccept/045_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyGETWithoutAccept/045_01.robot index 8dfdfcc56..3c2e15787 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyGETWithoutAccept/045_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyGETWithoutAccept/045_01.robot @@ -1,26 +1,23 @@ *** Settings *** Documentation Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${building_filename}= building-simple-attributes.jsonld -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_filename}= subscriptions/subscription.jsonld -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_filename}= csourceRegistrations/context-source-registration-with-expiration.jsonld ${registration_type}= Vehicle -${tea_id_prefix}= urn:ngsi-ld:Vehicle: ${tea_filename}= vehicle-temporal-representation.jsonld ${teatype}= Vehicle ${content_type}= application/json @@ -30,7 +27,7 @@ ${content_type}= application/json 045_01_01 Endpoint /entities/{entityId} [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/entities/{entityId}) [Tags] e-query cb-get 6_3_4 - ${id}= Generate Random Entity Id ${building_id_prefix} + ${id}= Generate Random Building Entity Id ${response}= Create Entity Selecting Content Type ... ${building_filename} ... ${id} @@ -48,7 +45,7 @@ ${content_type}= application/json 045_01_02 Endpoint /subscriptions/{subscriptionId} [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/subscriptions/{subscriptionId}) [Tags] sub-retrieve cb-get 6_3_4 - ${id}= Generate Random Entity Id ${subscription_id_prefix} + ${id}= Generate Random Subscription Id ${response}= Create Subscription ${id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Subscription @@ -62,7 +59,7 @@ ${content_type}= application/json 045_01_03 Endpoint /csourceRegistrations/ [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/csourceRegistrations/) [Tags] csr-query cb-get 6_3_4 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id ${payload}= Load JSON From File ${EXECDIR}/data/${registration_filename} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${response}= Create Context Source Registration With Return ${updated_payload} @@ -80,7 +77,7 @@ ${content_type}= application/json 045_01_04 Endpoint /temporal/entities [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/temporal/entities) [Tags] te-query cb-get 6_3_4 - ${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} ... filename=${tea_filename} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyLdContextNotAvailable/043_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyLdContextNotAvailable/043_01.robot index c31238d5d..86ee791f7 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyLdContextNotAvailable/043_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyLdContextNotAvailable/043_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource @@ -11,13 +12,9 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** ${expected_status_code}= 503 -${building_id_prefix}= urn:ngsi-ld:Building: ${building_filename}= building-unretrievable-context.jsonld -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_filename}= subscriptions/subscription-unretrievable-context.jsonld -${tea_id_prefix}= urn:ngsi-ld:Vehicle: ${tea_filename}= bus-temporal-representation-unretrievable-context.jsonld -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_filename}= csourceRegistrations/context-source-registration-unretrievable-context.jsonld @@ -25,7 +22,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration 043_01_01 Create entity [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create entity) [Tags] e-create cb-ldcontext 5_2_2 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity Selecting Content Type ... ${building_filename} ... ${entity_id} @@ -40,7 +37,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration 043_01_02 Create subscription [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create subscription) [Tags] sub-create cb-ldcontext 5_2_2 - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${response}= Create Subscription ${subscription_id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${expected_status_code} ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to @@ -52,7 +49,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration 043_01_03 Create Temporal Representation of Entities [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create Temporal Representation of Entities) [Tags] te-create cb-ldcontext 5_2_2 - ${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} ... filename=${tea_filename} @@ -67,8 +64,8 @@ ${registration_filename}= csourceRegistrations/context-source-registration 043_01_04 Batch entity create [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Batch entity create) [Tags] be-create cb-ldcontext 5_2_2 - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id ${first_entity}= Load Entity ${building_filename} ${first_entity_id} ${second_entity}= Load Entity ${building_filename} ${second_entity_id} @{entities_to_be_created}= Create List ${first_entity} ${second_entity} @@ -90,7 +87,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration 043_01_05 Create context source registration [Documentation] Verify receiving 503 – LdContextNotAvailable error if remote JSON-LD @context cannot be retrieved (Create context source registration) [Tags] csr-create cb-ldcontext 5_2_2 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id ${payload}= Load JSON From File ${EXECDIR}/data/${registration_filename} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${response}= Create Context Source Registration With Return ${updated_payload} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_01.robot index d7b50946e..2b521b2b8 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,10 +11,9 @@ Test Teardown Delete Initial Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${vehicle_filename}= vehicle-simple-attributes.jsonld -${vehicle_fragment}= vehicle-brandname-fragment.json -${attribute_id}= brandName +${vehicle_filename}= vehicle-simple-attributes.jsonld +${vehicle_fragment}= vehicle-brandname-fragment.json +${attribute_id}= brandName *** Test Cases *** @@ -31,7 +31,7 @@ ${attribute_id}= brandName *** Keywords *** Create Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id ${response}= Create Entity Selecting Content Type ... ${vehicle_filename} ... ${entity_id} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_02.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_02.robot index 70853e4b6..455b2a764 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_02.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyMergePatchJson/044_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Initial Subscription *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_filename}= subscriptions/subscription.jsonld ${subscription_fragment}= subscriptions/fragments/subscription-update.json @@ -30,7 +30,7 @@ ${subscription_fragment}= subscriptions/fragments/subscription-update.json *** Keywords *** Create Initial Subscription - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${response}= Create Subscription ${subscription_id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} Set Test Variable ${subscription_id} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_01.robot index b835ad1c5..ae9ba566b 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_01.robot @@ -1,28 +1,27 @@ *** Settings *** Documentation Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${accept}= application/xml -${status_code}= 406 -${building_id_prefix}= urn:ngsi-ld:Building: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: +${accept}= application/xml +${status_code}= 406 *** Test Cases *** 049_01_01 Endpoint get /entities/{entityId} [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /entities/{entityId}) [Tags] e-query cb-noacceptable-medtype 6_3_4 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Query Entity ... id=${entity_id} ... accept=${accept} @@ -32,7 +31,7 @@ ${subscription_id_prefix}= urn:ngsi-ld:Subscription: 049_01_02 Endpoint get /subscriptions/{subscriptionId} [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /subscriptions/{subscriptionId}) [Tags] sub-retrieve cb-noacceptable-medtype 6_3_4 - ${id}= Generate Random Entity Id ${subscription_id_prefix} + ${id}= Generate Random Subscription Id ${response}= Retrieve Subscription ... id=${id} ... accept=${accept} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_02.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_02.robot index 75a726425..728ce9743 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_02.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyNotAcceptableMediaType/049_02.robot @@ -1,24 +1,24 @@ *** Settings *** Documentation Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header is "application/geo+json" for operations different than "Retrieve Entity" and "Query Entity" +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${accept}= application/geo+json -${status_code}= 406 -${subscription_id_prefix}= urn:ngsi-ld:Subscription: +${accept}= application/geo+json +${status_code}= 406 *** Test Cases *** 049_02_01 Retrieve subscription by id [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header is "application/geo+json" for operations different than "Retrieve Entity" and "Query Entity" (get /subscriptions/{subscriptionId}) [Tags] sub-retrieve cb-noacceptable-medtype 6_3_4 - ${id}= Generate Random Entity Id ${subscription_id_prefix} + ${id}= Generate Random Subscription Id ${response}= Retrieve Subscription ... id=${id} ... accept=${accept} diff --git a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyUnsupportedMediaType/048_01.robot b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyUnsupportedMediaType/048_01.robot index b87bbb642..41fdf2424 100644 --- a/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyUnsupportedMediaType/048_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/CommonResponses/VerifyUnsupportedMediaType/048_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource @@ -9,16 +10,12 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_filename}= vehicle-simple-attributes.jsonld ${vehicle_attribute}= speed ${vehicle_fragment}= vehicle-brandname-fragment.jsonld -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_filename}= csourceSubscriptions/subscription.jsonld ${subscription_fragment}= csourceSubscriptions/fragments/subscription-update.jsonld -${tea_id_prefix}= urn:ngsi-ld:Vehicle: ${tea_filename}= vehicle-temporal-representation.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${building_filename}= building-simple-attributes.jsonld ${content_type}= application/xml @@ -27,7 +24,7 @@ ${content_type}= application/xml 048_01_01 Endpoint patch /entities/{entityId}/attrs/{attrId} [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /entities/{entityId}/attrs/{attrId}) [Tags] ea-partial-update cb-unsupport-medtype 6_3_4 - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id ${response}= Partial Update Entity Attributes ... entityId=${entity_id} ... attributeId=${vehicle_attribute} @@ -39,7 +36,7 @@ ${content_type}= application/xml 048_01_02 Endpoint patch /subscriptions/{subscriptionId} [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /subscriptions/{subscriptionId}) [Tags] sub-update cb-unsupport-medtype 6_3_4 - ${id}= Generate Random Entity Id ${subscription_id_prefix} + ${id}= Generate Random Subscription Id ${response}= Update Subscription ${id} ${subscription_fragment} ${content_type} Check Response Status Code 415 ${response.status_code} [Teardown] Delete Subscription ${id} @@ -47,7 +44,7 @@ ${content_type}= application/xml 048_01_03 Endpoint post /entities/ [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entities/) [Tags] e-create cb-unsupport-medtype 6_3_4 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity Selecting Content Type ... ${building_filename} ... ${entity_id} @@ -58,7 +55,7 @@ ${content_type}= application/xml 048_01_04 Endpoint post /subscriptions/ [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /subscriptions/) [Tags] sub-create cb-unsupport-medtype 6_3_4 - ${subscriptions_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscriptions_id}= Generate Random Subscription Id ${response}= Create Subscription ${subscriptions_id} ${subscription_filename} ${content_type} Check Response Status Code 415 ${response.status_code} [Teardown] Delete Subscription ${subscriptions_id} @@ -66,8 +63,8 @@ ${content_type}= application/xml 048_01_05 Endpoint post /entityOperations/create [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entityOperations/create) [Tags] be-create cb-unsupport-medtype 6_3_4 - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id ${first_entity}= Load Entity ${building_filename} ${first_entity_id} ${second_entity}= Load Entity ${building_filename} ${second_entity_id} @{entities_to_be_created}= Create List ${first_entity} ${second_entity} @@ -79,7 +76,7 @@ ${content_type}= application/xml 048_01_06 Endpoint post /temporal/entities/ [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /temporal/entities/) [Tags] te-create cb-unsupport-medtype 6_3_4 - ${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} ... filename=${tea_filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot index 73d9c42c8..edad46fda 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot retrieve a detailed representation of an unknown NGSI-LD attribute +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,8 +12,7 @@ Suite Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.json +${filename}= building-simple-attributes.json *** Test Cases *** @@ -29,7 +29,7 @@ ${filename}= building-simple-attributes.json *** Keywords *** Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot index 6ee800390..fa4f1164d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a list with a detailed representation of NGSI-LD attributes +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,9 +13,8 @@ Test Template Retrieve Detailed Representation Of Available Attribute *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.json -${expectation_file}= types/expectations/attribute-027-01.json +${filename}= building-simple-attributes.json +${expectation_file}= types/expectations/attribute-027-01.json *** Test Cases *** ATTR_NAME @@ -35,7 +35,7 @@ Retrieve Detailed Representation Of Available Attribute Check Response Body Containing Attribute element ${expectation_file} ${response.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot index 207eedc68..248053bfa 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a list of NGSI-LD attributes +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,8 +13,7 @@ Test Template Retrieve Available Attributes *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.json +${filename}= building-simple-attributes.json *** Test Cases *** CONTEXT EXPECTATION_FILE @@ -35,7 +35,7 @@ Retrieve Available Attributes Check Response Body Containing AttributeList element ${expectation_file} ${response.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot index 8bb90236f..86dbcacdc 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot retrieve a detailed representation of an unknown NGSI-LD entity type +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,8 +12,7 @@ Suite Teardown Delete Initial Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.json +${filename}= building-simple-attributes.json *** Test Cases *** @@ -29,8 +29,8 @@ ${filename}= building-simple-attributes.json *** Keywords *** Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot index 1a6ba8fb9..e0ecf6912 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a detailed representation of a specified NGSI-LD entity type +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,9 +13,8 @@ Test Template Retrieve Detailed Representation Of Available Entity Type *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.json -${expectation_file}= types/expectations/entity-type-info-024-01.json +${filename}= building-simple-attributes.json +${expectation_file}= types/expectations/entity-type-info-024-01.json *** Test Cases *** TYPE @@ -35,8 +35,8 @@ Retrieve Detailed Representation Of Available Entity Type Check Response Body Containing EntityTypeInfo element ${expectation_file} ${response.json()} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot index 4ed1a8848..018065cba 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a list of NGSI-LD entity types +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,10 +13,8 @@ Test Template Retrieve Available Entity Types *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${first_filename}= building-simple-attributes.json -${second_filename}= vehicle-simple-attributes.json +${first_filename}= building-simple-attributes.json +${second_filename}= vehicle-simple-attributes.json *** Test Cases *** CONTEXT EXPECTATION_FILE @@ -37,8 +36,8 @@ Retrieve Available Entity Types Check Response Body Containing EntityTypeList element ${expectation_file} ${response.json()} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Vehicle Entity Id ${create_response1}= Create Entity Selecting Content Type ... ${first_filename} ... ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot index 4a60d16ef..8c761e770 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a list with a detailed representation of NGSI-LD attributes +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,8 +13,7 @@ Test Template Retrieve Details Of Available Attributes *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.json +${filename}= building-simple-attributes.json *** Test Cases *** CONTEXT EXPECTATION_FILE @@ -36,7 +36,7 @@ Retrieve Details Of Available Attributes Check Response Body Containing Attribute element ${expectation_file} ${response.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot index e5916c4f2..fd244c7a7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a list with a detailed representation of NGSI-LD entity types +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,10 +13,8 @@ Test Template Retrieve Details Of Available Entity Types *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${first_filename}= building-simple-attributes.json -${second_filename}= vehicle-simple-attributes.json +${first_filename}= building-simple-attributes.json +${second_filename}= vehicle-simple-attributes.json *** Test Cases *** CONTEXT EXPECTATION_FILE @@ -38,8 +37,8 @@ Retrieve Details Of Available Entity Types Check Response Body Containing EntityType element ${expectation_file} ${response.json()} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Vehicle Entity Id ${create_response1}= Create Entity Selecting Content Type ... ${first_filename} ... ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot index 1e0a7beba..ef3de1232 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities based on ids -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${expectation_filename}= building-minimal.json ${entity_type}= https://ngsi-ld-test-suite/context#Building @@ -38,21 +38,21 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building *** Keywords *** Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${third_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${third_entity_id}= Generate Random Building Entity Id Set Suite Variable ${third_entity_id} ${create_response3}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot index 009e7e3dc..a5014450c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities based on the entities types -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,9 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${parking_id_prefix}= urn:ngsi-ld:OffStreetParking: ${building_filename}= building-minimal.jsonld ${vehicle_filename}= vehicle-simple-attributes.jsonld ${parking_filename}= parking-simple-attributes.jsonld @@ -42,21 +40,21 @@ ${parking_entity_type}= https://ngsi-ld-test-suite/context#OffStreetParking *** Keywords *** Setup Initial Entities - ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${building_entity_id}= Generate Random Building Entity Id Set Suite Variable ${building_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${building_filename} ... ${building_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${vehicle_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${vehicle_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${vehicle_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${vehicle_filename} ... ${vehicle_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${parking_entity_id}= Generate Random Entity Id ${parking_id_prefix} + ${parking_entity_id}= Generate Random Parking Entity Id Set Suite Variable ${parking_entity_id} ${create_response3}= Create Entity Selecting Content Type ... ${parking_filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot index 8a4a3a5ab..e61c33589 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities based on the given id pattern -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${expectation_filename}= building-minimal.json ${entity_type}= https://ngsi-ld-test-suite/context#Building @@ -38,14 +38,14 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.* *** Keywords *** Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot index 4c71f7017..6f78753aa 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities based on attribute names -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-simple-attributes.jsonld ${filename2}= building-minimal.jsonld ${expectation_filename}= building-attributes-query.json @@ -41,14 +41,14 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego *** Keywords *** Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename2} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot index c1467f99a..a542ac9dd 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query entities based on a geoquery -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-location-attribute.jsonld ${expectation_filename}= building-geoproperty-query.jsonld ${entity_type}= https://ngsi-ld-test-suite/context#Building @@ -44,14 +44,14 @@ ${coordinates}= [13.3986, 52.5547] *** Keywords *** Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_06.robot index ead347f54..87ef141f5 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities based on scopes -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Query several entities based on scopes *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_one_scope}= building-minimal-with-one-scope.json ${entity_many_scopes}= building-minimal-with-many-scopes.json ${entity_type}= https://ngsi-ld-test-suite/context#Building @@ -50,7 +50,7 @@ Query several entities based on scopes Check Response Body Containing Number Of Entities ${entity_type} ${expected_count} ${response.json()} Setup Initial Entities - ${entity_one_scope_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_one_scope_id}= Generate Random Building Entity Id Set Suite Variable ${entity_one_scope_id} ${create_response1}= Create Entity Selecting Content Type ... ${entity_one_scope} @@ -58,7 +58,7 @@ Setup Initial Entities ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} Check Response Status Code 201 ${create_response1.status_code} - ${entity_many_scopes_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_many_scopes_id}= Generate Random Building Entity Id Set Suite Variable ${entity_many_scopes_id} ${create_response2}= Create Entity Selecting Content Type ... ${entity_many_scopes} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot index b71cfdd81..638f17c5c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query one entity via POST Interaction based on id -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${expectation_filename}= building-minimal.json ${entity_type}= https://ngsi-ld-test-suite/context#Building @@ -35,21 +35,21 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building *** Keywords *** Create Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${third_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${third_entity_id}= Generate Random Building Entity Id Set Suite Variable ${third_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot index 49bfe69c2..88727250b 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities via POST Interaction based on the entity type -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,8 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${building_filename}= building-minimal.jsonld ${vehicle_filename}= vehicle-simple-attributes.jsonld ${expectation_filename}= two-vehicles.jsonld @@ -40,21 +39,21 @@ ${vehicle_entity_type}= https://ngsi-ld-test-suite/context#Vehicle *** Keywords *** Create Entities - ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${building_entity_id}= Generate Random Building Entity Id Set Suite Variable ${building_entity_id} ${response}= Create Entity Selecting Content Type ... ${building_filename} ... ${building_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${first_vehicle_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${first_vehicle_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${first_vehicle_entity_id} ${response}= Create Entity Selecting Content Type ... ${vehicle_filename} ... ${first_vehicle_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${second_vehicle_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${second_vehicle_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${second_vehicle_entity_id} ${response}= Create Entity Selecting Content Type ... ${vehicle_filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot index 56d9f0142..e9f4a532c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities via POST Interaction based on the given id pattern -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${expectation_filename}= building-minimal.json ${entity_type}= https://ngsi-ld-test-suite/context#Building @@ -36,14 +36,14 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.* *** Keywords *** Create Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot index e9e38a6ea..869c00a35 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities via POST Interaction based on attribute names -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,8 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${building_filename}= building-minimal.jsonld ${vehicle_filename}= vehicle-simple-attributes.jsonld ${expectation_filename}= vehicle-simple-attributes-core-context.json @@ -36,14 +35,14 @@ ${attribute_isparked}= https://uri.etsi.org/ngsi-ld/default-context/isParke *** Keywords *** Create Entities - ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${building_entity_id}= Generate Random Building Entity Id Set Suite Variable ${building_entity_id} ${response}= Create Entity Selecting Content Type ... ${building_filename} ... ${building_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${vehicle_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${vehicle_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${vehicle_entity_id} ${response}= Create Entity Selecting Content Type ... ${vehicle_filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot index 15295a0b3..f05ee6765 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot @@ -1,8 +1,8 @@ *** Settings *** Documentation Check that one can query entitites via POST Interaction asking for a GeoJSON representation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,8 +11,6 @@ Suite Teardown Delete Entities *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${parking_id_prefix}= urn:ngsi-ld:OffStreetParking: ${vehicle_filename}= vehicle-simple-attributes.jsonld ${parking_filename}= parking-simple-attributes.jsonld ${expectation_filename_alt2}= vehicle-parking-019-02-05.alternative2.geojson diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_06.robot index 0f02f838d..a91f6c19d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query two entities via POST Interaction based on ids -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${expectation_filename}= building-minimal.json ${entity_type}= https://ngsi-ld-test-suite/context#Building @@ -36,21 +36,21 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building *** Keywords *** Create Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${third_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${third_entity_id}= Generate Random Building Entity Id Set Suite Variable ${third_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot index 44a8dd8ff..78e04223b 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot query entities if the requested ids are incorrect -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${entity_type}= https://ngsi-ld-test-suite/context#Building ${entity_invalid_id_one}= thisisaninvaliduri1 @@ -38,14 +38,14 @@ ${entity_invalid_id_two}= thisisaninvaliduri2 *** Keywords *** Create Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot index 2eeffcf16..bbf48311c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot query entities if the requested entity types are incorrect -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,8 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${building_filename}= building-minimal.jsonld ${vehicle_filename}= vehicle-simple-attributes.jsonld ${invalid_entity_type_one}= type @@ -39,14 +38,14 @@ ${invalid_entity_type_two}= invalid_entity_type_two *** Keywords *** Create Entities - ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${building_entity_id}= Generate Random Building Entity Id Set Suite Variable ${building_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${building_filename} ... ${building_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${vehicle_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${vehicle_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${vehicle_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${vehicle_filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot index 35c350376..6dc83085a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot query entities if the requested id pattern is incorrect -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${entity_type}= https://ngsi-ld-test-suite/context#Building ${invalid_entity_id_pattern}= invalid_entity_id_pattern** @@ -36,14 +36,14 @@ ${invalid_entity_id_pattern}= invalid_entity_id_pattern** *** Keywords *** Create Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot index 07451987d..1b13c2343 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot query entities if the requested attribute names are incorrect -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${entity_type}= https://ngsi-ld-test-suite/context#Building ${invalid_attribute_one}= id @@ -35,14 +35,14 @@ ${invalid_attribute_two}= type *** Keywords *** Create Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot index f671b7578..25eef745f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot query entities if the request has a wrong geometryProperty -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,13 +12,12 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-location-attribute.jsonld -${entity_type}= Building -${georel}= invalid -${geometry}= Point -${coordinates}= [-8.503,41.202] -${geoproperty}= location +${filename}= building-location-attribute.jsonld +${entity_type}= Building +${georel}= invalid +${geometry}= Point +${coordinates}= [-8.503,41.202] +${geoproperty}= location *** Test Cases *** @@ -43,14 +43,14 @@ ${geoproperty}= location *** Keywords *** Create Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot index 6165d6a62..4aaeda034 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the queried entities by Id can be returned in a simplified representation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-simple-attributes.jsonld ${expectation_filename}= building-simple-attributes-simplified.json ${options_parameter}= keyValues @@ -40,21 +40,21 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building *** Keywords *** Create Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${third_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${third_entity_id}= Generate Random Building Entity Id Set Suite Variable ${third_entity_id} ${create_response3}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot index 03bcf9d1c..c9b3fa1e9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot @@ -1,8 +1,8 @@ *** Settings *** Documentation Check that the queried entities by id can be returned in GeoJSON format -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +11,6 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-location-attribute.jsonld ${expectation_filename}= two-buildings-location-attribute-normalized-019-05.geojson ${expectation_filename_alt1}= two-buildings-location-attribute-normalized-019-05.alternative.geojson diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot index 6c6e3a148..7946eac59 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query entities specifying a maximum number of results -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,10 +12,9 @@ Suite Teardown Delete Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-minimal.jsonld -${entity_type}= https://ngsi-ld-test-suite/context#Building -${limit}= 2 +${filename}= building-minimal.jsonld +${entity_type}= https://ngsi-ld-test-suite/context#Building +${limit}= 2 *** Test Cases *** @@ -40,21 +40,21 @@ ${limit}= 2 *** Keywords *** Create Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${third_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${third_entity_id}= Generate Random Building Entity Id Set Suite Variable ${third_entity_id} ${create_response3}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot index 60a53e038..4ed72f2b9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation If the count parameter is set to true the special HTTP header NGSILD-Results-Count is set in the response and it must contain the total number of matching results. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Query Entities With Count *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${first_entity_filename}= building-simple-attributes.jsonld ${second_entity_filename}= building-simple-attributes-second.jsonld ${entity_type}= Building @@ -42,14 +42,14 @@ Query Entities With Count Check Response Headers Containing NGSILD-Results-Count Equals To ${expected_count} ${response.headers} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${first_entity_filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${second_entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_08.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_08.robot index 81365192e..008cd7c8f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_08.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Query entities with Entity Type Selection Language. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -47,21 +48,21 @@ Query entities using Entity Type Selection Language ... ${response.json()} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${first_entity_id}= Generate Random Id ${entity_id_prefix} Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... ${first_entity_filename} ... ${first_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${second_entity_id}= Generate Random Id ${entity_id_prefix} Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... ${second_entity_filename} ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${third_entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${third_entity_id}= Generate Random Id ${entity_id_prefix} Set Suite Variable ${third_entity_id} ${create_response3}= Create Entity Selecting Content Type ... ${third_entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_09.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_09.robot index 163251d3c..81079c49c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_09.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities based on q -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Query several entities based on q *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${entity_type}= https://ngsi-ld-test-suite/context#Building +${entity_type}= https://ngsi-ld-test-suite/context#Building *** Test Cases *** Q EXPECTED_COUNT @@ -63,7 +63,7 @@ Query several entities based on q Check Response Headers Containing NGSILD-Results-Count Equals To ${expected_count} ${response.headers} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... building-simple-attributes.jsonld @@ -71,7 +71,7 @@ Setup Initial Entities ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... building-simple-attributes-second.jsonld @@ -79,7 +79,7 @@ Setup Initial Entities ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${third_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${third_entity_id}= Generate Random Building Entity Id Set Suite Variable ${third_entity_id} ${create_response3}= Create Entity Selecting Content Type ... building-simple-attributes-third.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_10.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_10.robot index 87ca2a2fb..faef128d5 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_10.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_10.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities based on complex geoqueries with Point target geometries -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,10 +12,6 @@ Suite Teardown Delete Entities Test Template Query several entities based on complex geoqueries -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** GEOREL GEOMETRY COORDINATES EXPECTED_COUNT 019_10_01 QueryOnEqualsPoint [Documentation] Check that one can query with an exact point @@ -67,7 +64,7 @@ Query several entities based on complex geoqueries Check Response Headers Containing NGSILD-Results-Count Equals To ${expected_count} ${response.headers} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... building-location-attribute.jsonld @@ -75,7 +72,7 @@ Setup Initial Entities ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... building-location-attribute-second.jsonld @@ -83,7 +80,7 @@ Setup Initial Entities ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${third_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${third_entity_id}= Generate Random Building Entity Id Set Suite Variable ${third_entity_id} ${create_response3}= Create Entity Selecting Content Type ... building-location-attribute-third.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_11.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_11.robot index 72f9d9f2e..807406dc0 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_11.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_11.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query several entities based on complex geoqueries with Polygon target geometries -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,10 +12,6 @@ Suite Teardown Delete Entities Test Template Query several entities based on complex geoqueries -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** GEOREL GEOMETRY COORDINATES EXPECTED_COUNT 019_11_01 QueryOnEqualsPolygon [Documentation] Check that one can query with an exact polygon @@ -67,7 +64,7 @@ Query several entities based on complex geoqueries Check Response Headers Containing NGSILD-Results-Count Equals To ${expected_count} ${response.headers} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type ... building-location-polygon.jsonld @@ -75,7 +72,7 @@ Setup Initial Entities ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${create_response2}= Create Entity Selecting Content Type ... building-location-polygon-second.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot index 811a68876..29172e3a7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can get an entity by id -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Created Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-simple-attributes.jsonld ${expectation_filename}= building-simple-attributes.jsonld @@ -34,7 +34,7 @@ ${expectation_filename}= building-simple-attributes.jsonld *** Keywords *** Create Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${create_response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_02.robot index 1f16bb8bd..6a061c225 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can query some attributes from an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Created Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-simple-attributes.jsonld ${expectation_filename}= building-simple-attributes-query.jsonld ${attribute_airqualitylevel}= https://ngsi-ld-test-suite/context#airQualityLevel @@ -42,7 +42,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego *** Keywords *** Create Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${create_response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_01.robot index 6e2cac12c..bccd230d0 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_01.robot @@ -1,20 +1,17 @@ *** Settings *** Documentation Check that one cannot get an entity if the entity id is not known to the system +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 018_03_01 Get an entity if the Entity Id is not known to the system [Documentation] Check that one cannot get an entity if the entity id is not known to the system [Tags] e-retrieve 5_7_1 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Query Entity ... id=${entity_id} ... accept=${CONTENT_TYPE_LD_JSON} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_02.robot index a5724abb1..40533d529 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot get an entity if an attribute is not known to the system -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Created Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-simple-attributes.jsonld ${attribute_not_known}= property_not_found @@ -36,7 +36,7 @@ ${attribute_not_known}= property_not_found *** Keywords *** Create Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${create_response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot index 2d54419c2..c10c7e8a3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the queried entity by Id can be returned in a simplified representation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Created Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-simple-attributes.jsonld ${expectation_filename}= building-simple-attributes-simplified.jsonld ${options_parameter}= keyValues @@ -36,7 +36,7 @@ ${options_parameter}= keyValues *** Keywords *** Create Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${create_response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot index 6d3a4ddb1..7ffa0a613 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the queried entity by id can be returned in a GeoJSON format -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Retrieve Entity In GeoJSON Representation *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-two-geometry-attributes.jsonld +${filename}= building-two-geometry-attributes.jsonld *** Test Cases *** OPTIONS EXPECTATION_FILENAME @@ -48,7 +48,7 @@ Retrieve Entity In GeoJSON Representation ... response_body=${response.json()} Create Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot index 81eeff7ba..4b6229a6c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the JSON-LD @context is obtained from a Link header if present and that the default JSON-LD @context is used if not present -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Review JSON-LD Resolution When retrieving an entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-simple-attributes.json ${empty_jsonld_expectation_filename}= building-simple-attributes-expanded.json ${creation_jsonld_expectation_filename}= building-simple-attributes-compacted.json @@ -39,7 +39,7 @@ Review JSON-LD Resolution When retrieving an entity Check Response Body Containing Entity element ${expected_payload} ${entity_id} ${response.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_07.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_07.robot index cf211b2ff..5fb5efa30 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_07.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can retrieve an entity using Language Filter -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Retrieve Entity With Language Filter *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-language-property.jsonld +${filename}= building-language-property.jsonld *** Test Cases *** LANGUAGE_FILTER OPTIONS EXPECTATION_FILENAME @@ -54,7 +54,7 @@ Retrieve Entity With Language Filter ... ${response.json()} Create Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_08.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_08.robot index 91b3ba086..bba14ed29 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_08.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that an entity with observationSpace geospatial Property can be retrieved -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Retrieve Entity With observationSpace Geospatial Property *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-observation-space-geoproperty.jsonld +${filename}= building-observation-space-geoproperty.jsonld *** Test Cases *** OPTIONS EXPECTATION_FILENAME @@ -37,7 +37,7 @@ Retrieve Entity With observationSpace Geospatial Property Check Response Body Containing Entity element ${expectation_filename} ${entity_id} ${response.json()} Create Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_09.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_09.robot index 88fa76992..bb6cdd021 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_09.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that an entity with operationSpace geospatial Property can be retrieved -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Retrieve Entity With operationSpace Geospatial Property *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-operation-space-geoproperty.jsonld +${filename}= building-operation-space-geoproperty.jsonld *** Test Cases *** OPTIONS EXPECTATION_FILENAME @@ -37,7 +37,7 @@ Retrieve Entity With operationSpace Geospatial Property Check Response Body Containing Entity element ${expectation_filename} ${entity_id} ${response.json()} Create Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot index 943c1bda0..903edd262 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot @@ -61,7 +61,7 @@ Setup Initial Entities ... ${second_temporal_entity_representation_id} Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_temporal_entity_representation_id} - ${third_temporal_entity_representation_id}= Catenate ${BUS_ID_PREFIX}021-13-A + ${third_temporal_entity_representation_id}= Generate Bus Entity Id 021-13-A ${create_response3}= Create Temporal Representation Of Entity ... ${bus_payload_file} ... ${third_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot index c36de8f73..d9dc1451f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot @@ -43,7 +43,7 @@ Setup Initial Temporal Entities ... ${first_temporal_entity_representation_id} Check Response Status Code 201 ${create_response1.status_code} Set Suite Variable ${first_temporal_entity_representation_id} - ${second_temporal_entity_representation_id}= Catenate ${BUS_ID_PREFIX}021-05-A + ${second_temporal_entity_representation_id}= Generate Bus Entity Id 021-05-A ${create_response2}= Create Temporal Representation Of Entity ... ${bus_payload_file} ... ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot index e4a855b03..d7acb604b 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query the temporal evolution of entities with a limit to the number of entities to be retrieved +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Query the temporal evolution of entities with a limit to the *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${first_vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld ${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.jsonld @@ -41,19 +41,19 @@ Query the temporal evolution of entities with a limit to the number of entities Check Response Body Containing Number Of Entities Vehicle ${limit} ${response.json()} Setup Initial Temporal Entities - ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${first_temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} Check Response Status Code 201 ${create_response1.status_code} Set Test Variable ${first_temporal_entity_representation_id} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_temporal_entity_representation_id} - ${third_temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${third_temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response3}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${third_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot index 34a21d36b..187de2fbe 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot query the temporal evolution of entities with an invalid request or invalid request content +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Initial Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld @@ -32,7 +32,7 @@ ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld *** Keywords *** Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot index f1a6e5d14..4e5b52f11 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot @@ -58,7 +58,7 @@ Setup Initial Temporal Entities ... ${second_temporal_entity_representation_id} Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_temporal_entity_representation_id} - ${third_temporal_entity_representation_id}= Catenate ${BUS_ID_PREFIX}021-13-A + ${third_temporal_entity_representation_id}= Generate Bus Entity Id 021-13-A ${create_response3}= Create Temporal Representation Of Entity ... ${bus_payload_file} ... ${third_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot index 2143993e2..7a68800c9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot @@ -60,7 +60,7 @@ Setup Initial Entities ... ${second_temporal_entity_representation_id} Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_temporal_entity_representation_id} - ${third_temporal_entity_representation_id}= Catenate ${BUS_ID_PREFIX}021-14-A + ${third_temporal_entity_representation_id}= Generate Bus Entity Id 021-14-A ${create_response3}= Create Temporal Representation Of Entity ... ${bus_payload_file} ... ${third_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot index 0a4d9062a..b2a3b81bd 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check temporal pagination is applied when querying the temporal evolution of entities +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve Temporal Entities *** Variables *** -${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: ${first_vehicle_payload_file}= pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld ${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.jsonld ${timeBefore}= 2019-01-01T01:01:00Z @@ -117,8 +117,8 @@ Retrieve Temporal Entities END Setup Initial Entities - ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${first_temporal_entity_representation_id}= Generate Random Vehicle Entity Id + ${second_temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${response}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot index cbd467863..5aa9de130 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check temporal pagination is applied when querying the temporal evolution of entities via POST +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve Temporal Entities Via Post *** Variables *** -${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: ${first_vehicle_payload_file}= pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld ${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.jsonld @@ -46,8 +46,8 @@ Retrieve Temporal Entities Via Post Check Content Range Part Equal ${unit} date-time Setup Initial Entities - ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${first_temporal_entity_representation_id}= Generate Random Vehicle Entity Id + ${second_temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${response}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_17.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_17.robot index 0dab1467a..dec15ac87 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_17.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_17.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of entities with the aggregated temporal representation +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve the temporal evolution of entities with the aggrega *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${first_vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld ${second_vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld @@ -56,7 +56,7 @@ Retrieve the temporal evolution of entities with the aggregated temporal represe ... ${response.json()[0]} Setup Initial Entities - ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${first_temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${response}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot index 5df3b954e..2431f0fd2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of an entity +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Initial Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld ${vehicle_expectation_file}= vehicle-temporal-representation-020-01.jsonld @@ -31,7 +31,7 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-01.jsonld *** Keywords *** Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot index 5dcdd8612..ce97fe166 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of an entity using a context +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Initial Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld ${vehicle_expectation_file}= vehicle-temporal-representation-020-02.jsonld @@ -32,7 +32,7 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-02.jsonld *** Keywords *** Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot index 495b3ae47..910f13e7f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of certain attributes of an entity +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve the temporal evolution of certain attributes of an *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld ${vehicle_expectation_file}= vehicle-temporal-representation-020-03.jsonld @@ -41,7 +41,7 @@ Retrieve the temporal evolution of certain attributes of an entity ... ${response.json()} Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot index 07928f992..30abc24cc 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of an entity matching the given NGSI-LD temporal query +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve the temporal evolution of an entity matching the gi *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld @@ -45,7 +45,7 @@ Retrieve the temporal evolution of an entity matching the given NGSI-LD temporal ... ${response.json()} Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot index 516b78d53..78946919a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of the last N instances of entity attributes +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve the temporal evolution of the last N instances of e *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation-multiple-instances.jsonld @@ -40,7 +40,7 @@ Retrieve the temporal evolution of the last N instances of entity attributes ... ${response.json()} Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot index 2e2d81671..3490fd60a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot retrieve the temporal evolution of non-existing entity attributes +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Initial Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld @@ -33,7 +33,7 @@ ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld *** Keywords *** Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot index 90911bba7..649efe987 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot retrieve the temporal evolution of an entity with an invalid request content +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve the temporal evolution of an entity with an invalid *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld @@ -44,7 +44,7 @@ Retrieve the temporal evolution of an entity with an invalid request content Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot index 08859d960..072501dac 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of an entity with the simplified temporal representation +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Initial Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld ${vehicle_expectation_file}= vehicle-temporal-representation-020-10.jsonld @@ -34,7 +34,7 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-10.jsonld *** Keywords *** Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_11.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_11.robot index d8ef43b4e..b8d404049 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_11.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_11.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of an entity with the aggregated temporal representation +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve the temporal evolution of an entity with the aggreg *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= 2020-08-vehicle-temporal-representation.jsonld @@ -50,7 +50,7 @@ Retrieve the temporal evolution of an entity with the aggregated temporal repres ... ${response.json()} Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_12.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_12.robot index a01ba13b9..c145bb565 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_12.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_12.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of an entity with a LanguageProperty property +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= vehicle-language-property-temporal-representation.jsonld @@ -40,7 +40,7 @@ Retrieve Temporal Entity ... ${response.json()} Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot index b2778c882..88931a495 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check temporal pagination is applied when retrieving the temporal evolution of an entity +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve Temporal Entity *** Variables *** -${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld ${timeBefore}= 2019-01-01T01:01:00Z ${timeAfter}= 2021-01-01T01:01:00Z @@ -120,7 +120,7 @@ Retrieve Temporal Entity END Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot index 157e3479e..5933f0af5 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that the time range cut before the second attribute to avoid missing data in content-range +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Retrieve Temporal Entity *** Variables *** -${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld ${timeBefore}= 2019-01-01T01:01:00Z ${timeAfter}= 2021-01-01T01:01:00Z @@ -44,7 +44,7 @@ Retrieve Temporal Entity Check Data Is Empty ${response.json()}[${emptyAttr}] Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot index cf3a12ae6..7846ed1ed 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot @@ -1,9 +1,10 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property +Resource ${EXECDIR}/resources/ApiUtils/Common.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,7 +14,6 @@ Test Template Delete Temporal Attribute and Retrieve Temporal Evolution of *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= vehicle-temporal-representation-different-attributes-types.jsonld @@ -55,7 +55,7 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute ... json_path=['${attr_name}']['deletedAt'] Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot index 71ad4dc79..c7e76c992 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot @@ -1,9 +1,10 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property with temporal values +Resource ${EXECDIR}/resources/ApiUtils/Common.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,7 +14,6 @@ Test Template Delete Temporal Attribute and Retrieve Temporal Evolution of *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= vehicle-temporal-representation-different-attributes-types.jsonld @@ -58,7 +58,7 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute ... json_path=['${attr_name}']['${simplified_temporal_key}'][0][1] Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot index ce06dcfc4..e46d0c9b4 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot @@ -1,9 +1,10 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property +Resource ${EXECDIR}/resources/ApiUtils/Common.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,7 +14,6 @@ Test Template Delete Temporal Attribute and Retrieve Temporal Evolution of *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= vehicle-temporal-representation-scope.jsonld @@ -49,7 +49,7 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute ... json_path=['scope']['deletedAt'] Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot index 5ecf2beb4..584fa6775 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot @@ -1,9 +1,10 @@ *** Settings *** Documentation Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property with temporal values +Resource ${EXECDIR}/resources/ApiUtils/Common.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,7 +14,6 @@ Test Template Delete Temporal Attribute and Retrieve Temporal Evolution of *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_payload_file}= vehicle-temporal-representation-scope.jsonld @@ -50,7 +50,7 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute ... json_path=['scope']['values'][0][1] Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot index d722c601f..f5f6ec558 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can create a batch of entities -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,10 +11,6 @@ Test Teardown Delete Initial Entities Test Template Batch Create Entity Scenarios -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** FILENAME 003_01_01 MinimalEntity [Tags] be-create 5_6_7 @@ -33,8 +30,8 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Batch Create Entity Scenarios [Documentation] Check that one can create a batch of entities [Arguments] ${filename} - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id ${first_entity}= Load Entity ${filename} ${first_entity_id} ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_to_be_created}= Create List ${first_entity} ${second_entity} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot index 5c7af583a..d3fdb20b8 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can create a batch of entities where some will succeed and others will fail -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,17 +11,13 @@ Suite Setup Setup Initial Entity Suite Teardown Delete Initial Entities -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 003_02_01 Create a batch of two valid entities and one invalid entity [Documentation] Check that one can create a batch of two valid entities and one invalid entity [Tags] be-create 5_6_7 - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} # TODO: Use Load Test Sample keyword instead ${first_entity}= Load Entity building-minimal.jsonld ${first_entity_id} @@ -50,7 +47,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Keywords *** Setup Initial Entity - ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${existing_entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity building-minimal.jsonld ${existing_entity_id} Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${existing_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot index f8a786ccf..ddaca8e82 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot @@ -1,24 +1,21 @@ *** Settings *** Documentation Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Teardown Delete Initial Entities -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 003_04_01 Create a batch of one entity using a provided Link header with JSON content type and retrieve the entity with context detail [Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" [Tags] be-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${entity}= Load Entity building-simple-attributes.json ${entity_id} @{entities_to_be_created}= Create List ${entity} @@ -41,7 +38,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: [Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" [Tags] be-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${entity}= Load Entity building-simple-attributes.json ${entity_id} @{entities_to_be_created}= Create List ${entity} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot index d2b017bdd..890bbfc89 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot @@ -1,24 +1,21 @@ *** Settings *** Documentation Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Teardown Delete Initial Entities -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 003_05_01 Create a batch of one entity using the default context with JSON content type [Documentation] Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context and retrieve the entity without context [Tags] be-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${entity}= Load Entity building-simple-attributes.json ${entity_id} @{entities_to_be_created}= Create List ${entity} @@ -36,7 +33,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: [Documentation] Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context and retrieve the entity with context [Tags] be-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${entity}= Load Entity building-simple-attributes.json ${entity_id} @{entities_to_be_created}= Create List ${entity} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_06.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_06.robot index 01f9b6b20..e39f3e325 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_06.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_06.robot @@ -1,20 +1,17 @@ *** Settings *** Documentation Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 003_06_01 Create a batch of one entity containing a JSON-LD @context with a JSON content type [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term [Tags] be-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${entity}= Load Entity building-simple-attributes.jsonld ${entity_id} @{entities_to_be_created}= Create List ${entity} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot index 7b2ead684..271c35c7e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot @@ -1,23 +1,20 @@ *** Settings *** Documentation Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Teardown Delete Initial Entities -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 003_07_01 Create a batch of one entity using a JSON-LD @context obtained from the request payload [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" and the response attribute should be compacted as one used the same context as provided when creating the entity [Tags] be-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${entity}= Load Entity building-simple-attributes.jsonld ${entity_id} @{entities_to_be_created}= Create List ${entity} @@ -36,7 +33,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: 003_07_02 Create a batch of one entity using a JSON-LD @context obtained from the request payload [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" and response attribute should not be compacted as one did not provide a context containing this term [Tags] be-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${entity}= Load Entity building-simple-attributes.jsonld ${entity_id} @{entities_to_be_created}= Create List ${entity} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_08.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_08.robot index dd61c8733..d44668521 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_08.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_08.robot @@ -1,20 +1,17 @@ *** Settings *** Documentation Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 003_08_01 Create a batch of one entity not containing a JSON-LD @context with a JSON-LD content type [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term [Tags] be-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${entity}= Load Entity building-simple-attributes.json ${entity_id} @{entities_to_be_created}= Create List ${entity} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_09.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_09.robot index d5b90bee5..367c912e0 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_09.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_09.robot @@ -1,20 +1,17 @@ *** Settings *** Documentation Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and a JSON-LD Link header is present in the incoming HTTP request +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 003_09_01 Create a batch of one entity with a Link header and a JSON-LD content type [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and a JSON-LD Link header is present in the incoming HTTP request [Tags] be-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${entity}= Load Entity building-simple-attributes.jsonld ${entity_id} @{entities_to_be_created}= Create List ${entity} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_10.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_10.robot index c89a23c5c..73672e6b1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_10.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_10.robot @@ -1,25 +1,22 @@ *** Settings *** Documentation Check that one can create a batch of entities where two have the same id -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Teardown Delete Entities -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 003_10_01 Create a batch of three valid entities where two have the same id [Documentation] Check that one can create a batch of entities where two have the same id [Tags] be-create 5_6_7 5_5_11 since_v1.5.1 - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id Set Suite Variable ${first_entity_id} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id Set Suite Variable ${second_entity_id} ${first_entity}= Load Entity building-minimal.jsonld ${first_entity_id} ${second_entity}= Load Entity building-minimal.jsonld ${second_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot index c469c99f1..888c551ea 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot @@ -1,18 +1,15 @@ *** Settings *** Documentation Check that one can delete a batch of entities -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Setup Setup Initial Entities -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 006_01_01 Delete a batch of entities [Documentation] Check that one can delete a batch of entities @@ -30,10 +27,10 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Keywords *** Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id ${create_response1}= Create Entity building-simple-attributes.jsonld ${first_entity_id} Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id ${create_response2}= Create Entity building-simple-attributes.jsonld ${second_entity_id} Check Response Status Code 201 ${create_response2.status_code} @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot index 0e6ebc087..4d44089ed 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot @@ -1,23 +1,20 @@ *** Settings *** Documentation Check that one can delete a batch of entities where some will succeed and others will fail -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Setup Setup Initial Entity -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 006_02_01 Delete a batch of non-existing and existing entities [Documentation] Check that one can delete a batch of non-existing and existing entities [Tags] be-delete 5_6_10 - ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${new_entity_id}= Generate Random Building Entity Id @{entities_ids_to_be_deleted}= Create List ${existing_entity_id} ${new_entity_id} ${response}= Batch Delete Entities entities_ids_to_be_deleted=@{entities_ids_to_be_deleted} @@ -43,7 +40,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Keywords *** Setup Initial Entity - ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${existing_entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity building-simple-attributes.jsonld ${existing_entity_id} Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${existing_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_04.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_04.robot index 84ccd5894..76077be6b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_04.robot @@ -1,23 +1,20 @@ *** Settings *** Documentation Check that one can delete a batch of entities with the same id -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Setup Setup Initial Entity -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 006_04_01 Delete a batch of existing entities with the same id [Documentation] Check that one can delete a batch entities with the same id [Tags] be-delete 5_6_10 5_5_11 since_v1.5.1 - ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${new_entity_id}= Generate Random Building Entity Id @{entities_ids_to_be_deleted}= Create List ${entity_id} ${entity_id} ${response}= Batch Delete Entities entities_ids_to_be_deleted=@{entities_ids_to_be_deleted} @@ -33,7 +30,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Keywords *** Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity building-simple-attributes.jsonld ${entity_id} Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/MergeBatchOfEntities/057_01.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/MergeBatchOfEntities/057_01.robot index 39acd7033..92c614965 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/MergeBatchOfEntities/057_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/MergeBatchOfEntities/057_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that you can merge a batch of entities -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Batch Merge Entity Scenarios *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= merge/building-merge-data.jsonld @@ -55,8 +55,8 @@ Batch Merge Entity Scenarios ... ignore_core_context_version=${True} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id Create Entity ${entity_payload_filename} ${first_entity_id} Create Entity ${entity_payload_filename} ${second_entity_id} Set Test Variable ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/MergeBatchOfEntities/057_02.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/MergeBatchOfEntities/057_02.robot index 8461c5394..2c6656eae 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/MergeBatchOfEntities/057_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/MergeBatchOfEntities/057_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that you can merge a batch of entities where some will succeed and others will fail -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Initial Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= building-simple-attributes.jsonld ${merge_fragment_filename}= fragmentEntities/simple-attributes-relationship-of-property-fragment.json ${entity_filename}= building-relationship-of-property.jsonld @@ -27,7 +27,7 @@ ${entity_filename}= building-relationship-of-property.jsonld ${second_existing_entity}= Load Entity ... ${entity_filename} ... ${second_existing_entity_id} - ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${new_entity_id}= Generate Random Building Entity Id ${new_entity}= Load Entity ${entity_filename} ${new_entity_id} @{entities_to_be_merged}= Create List ${first_existing_entity} ${second_existing_entity} ${new_entity} @@ -61,8 +61,8 @@ ${entity_filename}= building-relationship-of-property.jsonld *** Keywords *** Setup Initial Entities - ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_existing_entity_id}= Generate Random Building Entity Id + ${second_existing_entity_id}= Generate Random Building Entity Id Create Entity ${entity_payload_filename} ${first_existing_entity_id} Create Entity ${entity_payload_filename} ${second_existing_entity_id} Set Suite Variable ${first_existing_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot index f02488a88..550d5405a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can update a batch of entities -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Batch Update Entity Scenarios *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= building-simple-attributes.jsonld @@ -55,11 +55,11 @@ Batch Update Entity Scenarios Check Updated Resources Set To ${updated_entities} ${response1.json()} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id ${create_response1}= Create Entity ${entity_payload_filename} ${first_entity_id} Check Response Status Code 201 ${create_response1.status_code} Set Test Variable ${first_entity_id} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id ${create_response2}= Create Entity ${entity_payload_filename} ${second_entity_id} Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot index c580c5c1e..90861f5bc 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can update a batch of entities with noOverwrite option -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Batch Update Entity With NoOverwrite Option Scenarios *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= building-simple-attributes.jsonld @@ -55,11 +55,11 @@ Batch Update Entity With NoOverwrite Option Scenarios Check Updated Resources Set To ${updated_entities} ${response1.json()} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id ${create_response1}= Create Entity ${entity_payload_filename} ${first_entity_id} Check Response Status Code 201 ${create_response1.status_code} Set Test Variable ${first_entity_id} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_entity_id}= Generate Random Building Entity Id ${create_response2}= Create Entity ${entity_payload_filename} ${second_entity_id} Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot index ea069a314..814867ab4 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can update a batch of entities where some will succeed and others will fail -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Initial Entities *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= building-simple-attributes.jsonld ${update_fragment_filename}= fragmentEntities/simple-attributes-relationship-of-property-fragment.json @@ -26,7 +26,7 @@ ${update_fragment_filename}= fragmentEntities/simple-attributes-relationship- ${second_existing_entity}= Load Entity ... building-relationship-of-property.jsonld ... ${second_existing_entity_id} - ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${new_entity_id}= Generate Random Building Entity Id ${new_entity}= Load Entity building-relationship-of-property.jsonld ${new_entity_id} @{entities_to_be_updated}= Create List ${first_existing_entity} ${second_existing_entity} ${new_entity} @@ -61,11 +61,11 @@ ${update_fragment_filename}= fragmentEntities/simple-attributes-relationship- *** Keywords *** Setup Initial Entities - ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_existing_entity_id}= Generate Random Building Entity Id ${create_response1}= Create Entity ${entity_payload_filename} ${first_existing_entity_id} Check Response Status Code 201 ${create_response1.status_code} Set Suite Variable ${first_existing_entity_id} - ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_existing_entity_id}= Generate Random Building Entity Id ${create_response2}= Create Entity ${entity_payload_filename} ${second_existing_entity_id} Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_existing_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_05.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_05.robot index f8cbb1971..b9c2645b6 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that you can update types of entities in a batch update operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Batch Update Entity Scenarios *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= building-minimal.jsonld @@ -47,8 +47,8 @@ Batch Update Entity Scenarios Check Updated Resources Set To ${updated_entities} ${response1.json()} Setup Initial Entities - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id Create Entity ${entity_payload_filename} ${first_entity_id} Create Entity ${entity_payload_filename} ${second_entity_id} Set Test Variable ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot index 4a38b317b..572b9bfbe 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can upsert a batch of non-existing entities and they will be created -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,10 +11,6 @@ Test Teardown Delete Initial Entities Test Template Batch Upsert Entity Scenarios -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** FILENAME 004_01_01 EntityWithSimpleProperties [Tags] be-upsert 5_6_8 @@ -30,8 +27,8 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Batch Upsert Entity Scenarios [Documentation] Check that one can upsert a batch of non-existing entities [Arguments] ${filename} - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id ${first_entity}= Load Entity ${filename} ${first_entity_id} ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_to_be_upserted}= Create List ${first_entity} ${second_entity} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot index 7212be861..1a33fb631 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can upsert a batch of non-existing and existing entities where non-existing will be created and existing will be replaced -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,10 +11,6 @@ Test Teardown Delete Initial Entities Test Template Batch Upsert Non-existing And Existing Entities Scenarios -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** FILENAME 004_02_01 EntityWithSimpleProperties [Tags] be-upsert 5_6_8 @@ -51,13 +48,13 @@ Batch Upsert Non-existing And Existing Entities Scenarios Prepare Entities To Upsert [Arguments] ${filename} - ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_existing_entity_id}= Generate Random Building Entity Id + ${second_existing_entity_id}= Generate Random Building Entity Id Create Entity building-minimal.jsonld ${first_existing_entity_id} Create Entity building-minimal.jsonld ${second_existing_entity_id} Set Test Variable ${first_existing_entity_id} Set Test Variable ${second_existing_entity_id} - ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${new_entity_id}= Generate Random Building Entity Id Set Test Variable ${new_entity_id} ${new_entity}= Load Entity ${filename} ${new_entity_id} ${first_existing_entity}= Load Entity ${filename} ${first_existing_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot index ac887633f..dcd2612f1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can upsert a batch of existing entities and they will be replaced -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,10 +12,6 @@ Test Teardown Delete Initial Entities Test Template Batch Upsert Existing Entities Scenarios -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** FILENAME 004_03_01 EntityWithSimpleProperties [Tags] be-upsert 5_6_8 @@ -54,11 +51,11 @@ Batch Upsert Existing Entities Scenarios Check Updated Resources Set To ${entities_to_be_upserted} ${response1.json()} Setup Initial Entities - ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_existing_entity_id}= Generate Random Building Entity Id ${create_response1}= Create Entity building-minimal.jsonld ${first_existing_entity_id} Check Response Status Code 201 ${create_response1.status_code} Set Test Variable ${first_existing_entity_id} - ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${second_existing_entity_id}= Generate Random Building Entity Id ${create_response2}= Create Entity building-minimal.jsonld ${second_existing_entity_id} Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_existing_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot index 6ed310ed1..1270a1334 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can upsert a batch of entities with update option -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Batch Upsert Entities With Update Option Scenarios *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${existing_entity_payload_filename}= building-minimal.jsonld @@ -32,7 +32,7 @@ ${existing_entity_payload_filename}= building-minimal.jsonld Batch Upsert Entities With Update Option Scenarios [Documentation] Check that one can upsert a batch of entities with update option [Arguments] ${filename} ${update_fragment_filename} - ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${new_entity_id}= Generate Random Building Entity Id Set Test Variable ${new_entity_id} ${new_entity}= Load Entity ${filename} ${new_entity_id} ${existing_entity}= Load Entity ${filename} ${existing_entity_id} @@ -57,7 +57,7 @@ Batch Upsert Entities With Update Option Scenarios Check Updated Resources Set To ${updated_entities} ${response1.json()} Setup Initial Entity - ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${existing_entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity ${existing_entity_payload_filename} ${existing_entity_id} Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${existing_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot index c96f5de87..f3a7833ca 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot @@ -1,29 +1,27 @@ *** Settings *** Documentation Check that one can upsert a batch of entities where some will succeed and others will fail -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Teardown Delete Entities -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 004_05_01 Upsert a batch of two valid entities and one invalid entity [Documentation] Check that one can upsert a batch of two valid entities and one invalid entity [Tags] be-upsert 5_6_8 - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${third_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id + ${third_entity_id}= Generate Random Building Entity Id ${first_entity}= Load Entity building-minimal.jsonld ${first_entity_id} ${second_entity}= Load Entity building-minimal.jsonld ${second_entity_id} ${third_entity}= Load Entity building-minimal.jsonld ${third_entity_id} - ${invalid_entity}= Remove Entity Type ${third_entity} + ${invalid_entity}= Delete Object From JSON ${third_entity} $.type + @{entities_to_be_upserted}= Create List ${first_entity} ${second_entity} ${invalid_entity} ${response}= Batch Upsert Entities @{entities_to_be_upserted} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_07.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_07.robot index 05c933f17..0717f7abf 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_07.robot @@ -1,24 +1,21 @@ *** Settings *** Documentation Check that one can upsert a batch of entities where two have the same id -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Teardown Delete Entities -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 004_07_01 Upsert a batch of three valid entities where two have the same id [Documentation] Check that one can upsert a batch of where two have the same id [Tags] be-upsert 5_6_8 5_5_11 since_v1.5.1 - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_entity_id}= Generate Random Building Entity Id + ${second_entity_id}= Generate Random Building Entity Id ${first_entity}= Load Entity building-minimal.jsonld ${first_entity_id} ${second_entity}= Load Entity building-minimal.jsonld ${second_entity_id} @{entities_to_be_upserted}= Create List ${first_entity} ${second_entity} ${first_entity} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_08.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_08.robot index 6e30947da..e3ce82b15 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_08.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_08.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that you can upsert a batch of existing entities with new types and they will be replaced -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,10 +12,6 @@ Test Teardown Delete Initial Entities Test Template Batch Upsert Existing Entities Scenarios -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** FILENAME 004_08_01 EntityWithNewTypes [Tags] be-upsert 5_6_8 4_16 @@ -40,8 +37,8 @@ Batch Upsert Existing Entities Scenarios Check Updated Resources Set To ${entities_to_be_upserted} ${response1.json()} Setup Initial Entities - ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${first_existing_entity_id}= Generate Random Building Entity Id + ${second_existing_entity_id}= Generate Random Building Entity Id Create Entity building-minimal.jsonld ${first_existing_entity_id} Create Entity building-minimal.jsonld ${second_existing_entity_id} Set Test Variable ${first_existing_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot index 9418ed7bf..860b9445c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can create an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,10 +11,6 @@ Test Teardown Delete Initial Entity Test Template Create Entity Scenarios -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** FILENAME CONTENT_TYPE 001_01_01 MinimalEntity [Tags] e-create 5_6_1 @@ -36,7 +33,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Create Entity Scenarios [Documentation] Check that one can create an entity [Arguments] ${filename} ${content_type} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_03.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_03.robot index 2c1d7e14c..539d78fee 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot create an entity with an existing id +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,9 +11,8 @@ Suite Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-minimal.jsonld -${content_type}= application/ld+json +${filename}= building-minimal.jsonld +${content_type}= application/ld+json *** Test Cases *** @@ -33,7 +33,7 @@ ${content_type}= application/ld+json *** Keywords *** Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${create_response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_04.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_04.robot index 58f228c67..8f1d3f779 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,15 +11,14 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.json +${filename}= building-simple-attributes.json *** Test Cases *** 001_04_01 Create one entity using a provided Link header with JSON content type and NGSILD context [Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" [Tags] e-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} @@ -34,7 +34,7 @@ ${filename}= building-simple-attributes.json 001_04_02 Create one entity using a provided Link header with JSON content type and no context [Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" [Tags] e-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_05.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_05.robot index 4fcab0c45..e2e780c28 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,15 +11,14 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.json +${filename}= building-simple-attributes.json *** Test Cases *** 001_05_01 Create one entity using the default context with JSON content type and request without context [Documentation] Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context, requesting without context [Tags] e-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_JSON} ${response1}= Retrieve Entity by Id id=${entity_id} @@ -30,7 +30,7 @@ ${filename}= building-simple-attributes.json 001_05_02 Create one entity using the default context with JSON content type and request with context [Documentation] Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context, requesting with context [Tags] e-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_JSON} ${response1}= Retrieve Entity by Id diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_06.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_06.robot index 464cfe76b..52439c750 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_06.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_06.robot @@ -1,21 +1,21 @@ *** Settings *** Documentation Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.jsonld +${filename}= building-simple-attributes.jsonld *** Test Cases *** 001_06_01 Create one entity containing a JSON-LD @context with a JSON content type [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term [Tags] e-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_07.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_07.robot index 20cb883ed..eb7897cc9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,15 +11,14 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.jsonld +${filename}= building-simple-attributes.jsonld *** Test Cases *** 001_07_01 Create one entity using a JSON-LD @context obtained from the request payload with ld context [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" and retrieve with ld context [Tags] e-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} ${response1}= Retrieve Entity by Id id=${entity_id} context=${ngsild_test_suite_context} @@ -30,7 +30,7 @@ ${filename}= building-simple-attributes.jsonld 001_07_02 Create one entity using a JSON-LD @context obtained from the request payload without context [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" and retrieve without context [Tags] e-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} ${response1}= Retrieve Entity by Id id=${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_08.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_08.robot index 2b44b19f8..df7fb32b4 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_08.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_08.robot @@ -1,21 +1,21 @@ *** Settings *** Documentation Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.json +${filename}= building-simple-attributes.json *** Test Cases *** 001_08_01 Create one entity not containing a JSON-LD @context with a JSON-LD content type [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term [Tags] e-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_09.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_09.robot index 47917f108..9fab24a1b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_09.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_09.robot @@ -1,21 +1,21 @@ *** Settings *** Documentation Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and a JSON-LD Link header is present in the incoming HTTP request +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-simple-attributes.jsonld +${filename}= building-simple-attributes.jsonld *** Test Cases *** 001_09_01 Create one entity with a Link header and a JSON-LD content type [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and a JSON-LD Link header is present in the incoming HTTP request [Tags] e-create 6_3_5 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_10.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_10.robot index 2dcf2ec51..6a8674543 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_10.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_10.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can create an entity with a LanguageProperty property -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,10 +11,6 @@ Test Teardown Delete Initial Entity Test Template Create Entity Scenarios -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** FILENAME CONTENT_TYPE 001_10_01 EntityWithLanguageProperty [Tags] e-create 5_6_1 4_5_18 since_v1.4.1 @@ -24,7 +21,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Create Entity Scenarios [Documentation] Check that one can create an entity with a LanguageProperty property [Arguments] ${filename} ${content_type} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_11.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_11.robot index b6341b021..cc98c873b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_11.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_11.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can create an entity with one or more scopes -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,10 +11,6 @@ Test Teardown Delete Initial Entity Test Template Create Entity Scenarios -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** FILENAME CONTENT_TYPE 001_11_01 EntityWithOneScope [Tags] e-create 4_18 since_v1.5.1 @@ -27,7 +24,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Create Entity Scenarios [Documentation] Check that one can create an entity with one or more scopes [Arguments] ${filename} ${content_type} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_12.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_12.robot index d1357bcae..73a88dfc6 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_12.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_12.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can create an entity with observationSpace geospatial Property -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,9 +11,8 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-observation-space-geoproperty.jsonld -${content_type}= application/ld+json +${filename}= building-observation-space-geoproperty.jsonld +${content_type}= application/ld+json *** Test Cases *** @@ -20,7 +20,7 @@ ${content_type}= application/ld+json [Documentation] Check that one can create an entity with observationSpace geospatial Property [Tags] e-create 5_6_1 4_7 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_13.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_13.robot index 08bcaa127..3358c56e9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_13.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_13.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can create an entity with operationSpace geospatial Property -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,9 +11,8 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-operation-space-geoproperty.jsonld -${content_type}= application/ld+json +${filename}= building-operation-space-geoproperty.jsonld +${content_type}= application/ld+json *** Test Cases *** @@ -20,7 +20,7 @@ ${content_type}= application/ld+json [Documentation] Check that one can create an entity with operationSpace geospatial Property [Tags] e-create 5_6_1 4_7 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot index a9ecdf6e0..eebee0b62 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot @@ -1,18 +1,15 @@ *** Settings *** Documentation Check that one can delete an entity by id -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Setup Setup Initial Entity -*** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: - - *** Test Cases *** 002_01_01 Delete an entity [Documentation] Check that one can delete an entity by id @@ -25,7 +22,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Keywords *** Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity Selecting Content Type ... building-simple-attributes.jsonld ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03.robot index f872c9077..5aa3128e2 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_03.robot @@ -1,13 +1,13 @@ *** Settings *** Documentation Check that one cannot delete an entity if the entity id is not known to the system +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${expected_status_code}= 404 @@ -15,7 +15,7 @@ ${expected_status_code}= 404 002_03_01 Delete an entity with an id not known to the system [Documentation] Check that one cannot delete an entity if the entity id is not known to the system [Tags] e-delete 5_6_6 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Delete Entity by Id ${entity_id} Check Response Status Code ${expected_status_code} ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_01.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_01.robot index 72c4959ce..278c6df32 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can merge an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Merge Entity Scenarios *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= merge/building-merge-data.jsonld @@ -51,7 +51,7 @@ Merge Entity Scenarios ... response_body=${response1.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity ${entity_payload_filename} ${entity_id} Set Test Variable ${entity_id} Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_02.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_02.robot index f277ea307..0b6200dce 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that if the target entity ID is faulty an error is raised -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Merge an existing entity with a faulty ID *** Variables *** -${building_id_prefix} urn:ngsi-ld:Building: ${entity_filename} building-simple-attributes.json ${entity_replacement_filename} building-locatedAt-and-name.json @@ -43,7 +43,7 @@ Merge an existing entity with a faulty ID Check Response Status Code ${expected_status_code} ${response.status_code} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_03.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_03.robot index 3e878bec5..247992bd9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete an attribute using NGSI-LD Null in a Merge Entity operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Merge Entity Scenarios *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= building-different-attributes-types.jsonld @@ -51,7 +51,7 @@ Merge Entity Scenarios ... response_body=${response1.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity ${entity_payload_filename} ${entity_id} Set Test Variable ${entity_id} Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_04.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_04.robot index a2bda14cb..d2ffb5308 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete a specific attribute instance using NGSI-LD Null in a Merge Entity operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Merge Entity Scenarios *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= building-different-attributes-instances-and-types.jsonld @@ -51,7 +51,7 @@ Merge Entity Scenarios ... response_body=${response1.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity ${entity_payload_filename} ${entity_id} Set Test Variable ${entity_id} Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_05.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_05.robot index 027e63d08..f53da4552 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete the default attribute instance using NGSI-LD Null in a Merge Entity operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Merge Entity Scenarios *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_payload_filename}= building-different-default-attributes-instances-and-types.jsonld @@ -51,7 +51,7 @@ Merge Entity Scenarios ... response_body=${response1.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity ${entity_payload_filename} ${entity_id} Set Test Variable ${entity_id} Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_01.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_01.robot index dffa254a0..d5ccbc163 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can replace an existing entity and that its createdAt Temporal Property remains unchanged -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix} urn:ngsi-ld:Building: ${entity_filename} building-simple-attributes.json ${entity_replacement_filename} building-locatedAt-and-name.json ${expectation_filename} building-locatedAt-and-name-normalized.jsonld @@ -50,7 +50,7 @@ ${expectation_filename} building-locatedAt-and-name-normalized.jsonl *** Keywords *** Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_02.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_02.robot index 47b262fe7..84ab3660a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that if the target entity ID is faulty an error is raised -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Replace an existing entity with a faulty ID *** Variables *** -${building_id_prefix} urn:ngsi-ld:Building: ${entity_filename} building-simple-attributes.json ${entity_replacement_filename} building-locatedAt-and-name.json @@ -44,7 +44,7 @@ Replace an existing entity with a faulty ID Check Response Status Code ${expected_status_code} ${response.status_code} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_03.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_03.robot index 19e2b34fc..1f5837606 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can replace an existing entity and that scopes are replaced -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Test Setup Setup Initial Entity @@ -10,7 +11,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix} urn:ngsi-ld:Building: ${entity_filename} building-minimal-with-one-scope.json ${entity_replacement_filename} building-minimal-with-many-scopes.json ${expectation_filename} building-minimal-with-two-scopes.json @@ -39,7 +39,7 @@ ${expectation_filename} building-minimal-with-two-scopes.json *** Keywords *** Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot index 30a523c22..cb9f8934f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can append entity attributes -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Append Attributes Without Params *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-speed-two-datasetid.jsonld +${filename}= vehicle-speed-two-datasetid.jsonld *** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -41,7 +41,7 @@ Append Attributes Without Params ... response_body=${response1.json()} Create Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_02.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_02.robot index dd5c5b639..f5b43cb2e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot append entity attributes with invalid/missing id or invalid request body +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Append Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-speed-two-datasetid.jsonld ${fragment_filename}= vehicle-attribute-to-add-fragment.jsonld ${status_code}= 400 @@ -39,7 +39,7 @@ Append Attributes [Teardown] Delete Entity by Id ${entity_id} Create Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot index 659cfd227..07d3e62e7 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot append entity attributes if the entity id is not known to the system +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -9,7 +10,6 @@ Suite Teardown Delete Initial Entities *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${fragment_filename}= vehicle-attribute-to-add-fragment.jsonld @@ -17,7 +17,7 @@ ${fragment_filename}= vehicle-attribute-to-add-fragment.jsonld 010_03_01 Append entity attributes when the entity id is not known to the system [Documentation] Check that one cannot append entity attributes if the entity id is not known to the system [Tags] ea-append 5_6_3 - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Append Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 404 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot index 35d2e2feb..71eee8cb9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can append entity attributes with noOverwrite option +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Append Attributes With Params *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-speed-two-datasetid.jsonld ${existing_attribute_name}= https://ngsi-ld-test-suite/context#speed ${non_existing_attribute_name}= https://uri.etsi.org/ngsi-ld/default-context/attribute_to_be_added @@ -57,7 +57,7 @@ Append Attributes With Params ... ignored_keys=${ignored_attributes} Create Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_05.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_05.robot index 48022c6a4..b8f08070b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_05.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot append entity attributes with invalid/missing id or invalid request body +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-speed-two-datasetid.jsonld ${fragment_filename}= vehicle-attribute-to-add-fragment.jsonld ${status_code}= 400 @@ -32,7 +32,7 @@ ${invalid_fragment_filename}= invalid-fragment.jsonld *** Keywords *** Create Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_06.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_06.robot index aa0105550..b9de0b2de 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_06.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can append a LanguageProperty property to an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Append Attributes Without Params *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-speed-two-datasetid.jsonld +${filename}= vehicle-speed-two-datasetid.jsonld *** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -36,7 +36,7 @@ Append Attributes Without Params Check Updated Resource Set To ${entity_expectation_payload} ${response1.json()} Create Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_07.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_07.robot index 2f2ef05fb..a9520bdaf 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can append a scope to an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= building-minimal-with-one-scope.json ${scope_fragment_filename}= one-scope-fragment.json @@ -53,7 +53,7 @@ ${scope_fragment_filename}= one-scope-fragment.json *** Keywords *** Create Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_08.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_08.robot index 8e74c8527..f625be32a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_08.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_08.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can append an observationSpace geospatial Property to an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${observation_space_fragment_filename}= observation-space-fragment.json ${expectation_filename}= building-observation-space-geoproperty-normalized.jsonld @@ -36,7 +36,7 @@ ${expectation_filename}= building-observation-space-geoproper *** Keywords *** Create Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_09.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_09.robot index 853f97245..6e78b67c6 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_09.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_09.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can append an operationSpace geospatial Property to an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-minimal.jsonld ${operation_space_fragment_filename}= operation-space-fragment.json ${expectation_filename}= building-operation-space-geoproperty-normalized.jsonld @@ -36,7 +36,7 @@ ${expectation_filename}= building-operation-space-geoproperty *** Keywords *** Create Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot index e92c21dd9..96648d8a1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete an attribute from an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,10 +13,9 @@ Test Template Delete Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${status_code}= 204 -${filename}= vehicle-two-datasetid-attributes.jsonld -${attribute_id}= speed +${status_code}= 204 +${filename}= vehicle-two-datasetid-attributes.jsonld +${attribute_id}= speed *** Test Cases *** DATASETID DELETEALL EXPECTATION_FILENAME @@ -52,7 +52,7 @@ Delete Attributes ... ignored_keys=${ignored_attributes} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${create_response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_02.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_02.robot index 36b23f399..51752453b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot delete an attribute from an entity with invalid/missing ids +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,8 +12,7 @@ Test Template Delete Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-two-datasetid-attributes.jsonld +${filename}= vehicle-two-datasetid-attributes.jsonld *** Test Cases *** ENTITY_ID ATTRIBUTE_ID EXPECTED_STATUS_CODE @@ -37,7 +37,7 @@ Delete Attributes Check Response Status Code ${expected_status_code} ${response.status_code} Create Initial Entity - ${valid_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${valid_entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${valid_entity_id} ${create_response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_03.robot index b1c0448d1..3ba0ff03a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot delete an attribute from an entity with invalid/missing ids +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,9 +12,8 @@ Test Template Delete Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${status_code}= 404 -${filename}= vehicle-two-datasetid-attributes.jsonld +${status_code}= 404 +${filename}= vehicle-two-datasetid-attributes.jsonld *** Test Cases *** ENTITY_ID ATTRIBUTE_ID DATASETID @@ -38,14 +38,14 @@ Delete Attributes Check Response Status Code ${status_code} ${response.status_code} Setup Initial Entity - ${valid_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${valid_entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${valid_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${valid_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${not_found_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${not_found_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${not_found_entity_id} Delete Initial Entity diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_04.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_04.robot index bc4464f08..c4793c28b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete a scope from an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= building-minimal-with-one-scope.json ${expectation_filename}= building-minimal-compacted.json @@ -35,7 +35,7 @@ ${expectation_filename}= building-minimal-compacted.json *** Keywords *** Create Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_05.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_05.robot index 3a7162f88..82cee02c1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete an observationSpace geospatial Property from an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-observation-space-geoproperty.jsonld ${expectation_filename}= building-minimal-compacted.json @@ -35,7 +35,7 @@ ${expectation_filename}= building-minimal-compacted.json *** Keywords *** Create Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_06.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_06.robot index 4aa625432..c7952056c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_06.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete an operationSpace geospatial Property from an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-operation-space-geoproperty.jsonld ${expectation_filename}= building-minimal-compacted.json @@ -35,7 +35,7 @@ ${expectation_filename}= building-minimal-compacted.json *** Keywords *** Create Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot index 214864fb3..cd86697d6 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can perform a partial update on an entity attribute -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,9 +13,8 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-speed-two-datasetid.jsonld -${status_code}= 204 +${filename}= vehicle-speed-two-datasetid.jsonld +${status_code}= 204 *** Test Cases *** FRAGMENT_FILENAME ATTRIBUTE_ID EXPECTATION_FILENAME @@ -47,7 +47,7 @@ Update Attributes ... ignored_keys=${ignored_attributes} Initiate Test Case - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_02.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_02.robot index 5f830c2a1..4b0993a3c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot perform a partial update on an entity attribute with invalid data +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,9 +12,8 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-two-datasetid-attributes.jsonld -${status_code}= 400 +${filename}= vehicle-two-datasetid-attributes.jsonld +${status_code}= 400 *** Test Cases *** ENTITY_ID ATTRIBUTE_ID FRAGMENT_FILENAME @@ -48,7 +48,7 @@ Update Attributes Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} Setup Initial Entity - ${valid_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${valid_entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${valid_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_03.robot index c6fbdec35..27b074374 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot perform a partial update on an entity attribute if the entity id or attribute is not known to the system +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,10 +12,9 @@ Test Template Partial Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-speed-two-datasetid.jsonld -${status_code}= 404 -${default_attr_id}= speed +${filename}= vehicle-speed-two-datasetid.jsonld +${status_code}= 404 +${default_attr_id}= speed *** Test Cases *** ENTITY_ID ATTR_ID FRAGMENT_FILENAME @@ -45,9 +45,9 @@ Partial Update Attributes Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} Create Initial Entity - ${valid_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${valid_entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${valid_entity_id} - ${not_found_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${not_found_entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${not_found_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_04.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_04.robot index 10948bc18..ebbd6c472 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can perform a partial update on a LanguageProperty property -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,9 +13,8 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Building: -${filename}= building-language-property-sub-property.jsonld -${status_code}= 204 +${filename}= building-language-property-sub-property.jsonld +${status_code}= 204 *** Test Cases *** FRAGMENT_FILENAME ATTRIBUTE_ID EXPECTATION_FILENAME @@ -42,7 +42,7 @@ Update Attributes Check Updated Resource Set To ${entity_expectation_payload} ${response1.json()} ${ignored_attributes} Initiate Test Case - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_05.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_05.robot index 48bd9fb88..9779ba3a7 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete an attribute using NGSI-LD Null in an Partial Attribute Update operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= building-different-attributes-types.jsonld +${filename}= building-different-attributes-types.jsonld *** Test Cases *** STATUS_CODE ATTR_NAME FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -59,7 +59,7 @@ Delete Initial Entity Delete Entity by Id ${entity_id} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_06.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_06.robot index 3f9beead5..30d494b2f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_06.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete a specific attribute instance using NGSI-LD Null in an Partial Attribute Update operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= building-different-attributes-instances-and-types.jsonld +${filename}= building-different-attributes-instances-and-types.jsonld *** Test Cases *** STATUS_CODE ATTR_NAME FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -59,7 +59,7 @@ Delete Initial Entity Delete Entity by Id ${entity_id} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_07.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_07.robot index c2a477cbe..67074f83b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete the default attribute instance using NGSI-LD Null in an Partial Attribute Update operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= building-different-default-attributes-instances-and-types.jsonld +${filename}= building-different-default-attributes-instances-and-types.jsonld *** Test Cases *** STATUS_CODE ATTR_NAME FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -59,7 +59,7 @@ Delete Initial Entity Delete Entity by Id ${entity_id} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_01.robot index e438615e7..f5a9724b7 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can replace an existing entity attribute and that its createdAt Temporal Property remains unchanged -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Replace Entity Attribute *** Variables *** -${vehicle_id_prefix} urn:ngsi-ld:Vehicle: ${entity_filename} vehicle-speed-multi-instances.jsonld @@ -55,7 +55,7 @@ Replace Entity Attribute ... response_body=${response1.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_02.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_02.robot index ac80245a6..5b4ae8915 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can replace an existing multi-instance entity attribute and that its createdAt Temporal Property remains unchanged -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Replace Multi Instance Entity Attribute *** Variables *** -${vehicle_id_prefix} urn:ngsi-ld:Vehicle: ${entity_filename} vehicle-speed-multi-instances.jsonld @@ -55,7 +55,7 @@ Replace Multi Instance Entity Attribute ... response_body=${response1.json()} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_03.robot index 31938756d..3a4865860 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/ReplaceEntityAttribute/055_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the correct error type is returned when replacing an attribute with faulty data -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Replace Entity Attribute With Faulty Data *** Variables *** -${vehicle_id_prefix} urn:ngsi-ld:Vehicle: ${entity_filename} vehicle-speed-multi-instances.jsonld @@ -50,7 +50,7 @@ Replace Entity Attribute With Faulty Data Check Response Status Code ${expected_status_code} ${response.status_code} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot index 25df88271..c7851b32f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can update entity attributes -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-two-datasetid-attributes.jsonld +${filename}= vehicle-two-datasetid-attributes.jsonld *** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -55,7 +55,7 @@ Delete Initial Entities Delete Entity by Id ${entity_id} Initialize Test - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_02.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_02.robot index 57b5ba0cf..2f591cda1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update entity attributes with invalid/missing id or invalid request body +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,10 +11,6 @@ Test Teardown Delete Entity Test Template Update Attributes -*** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: - - *** Test Cases *** ENTITY_INVALID_ID FRAGMENT_FILENAME 011_02_01 Update an attribute if the Entity Id is not present ${EMPTY} vehicle-speed-two-datasetid-01-fragment.jsonld @@ -34,7 +31,7 @@ Update Attributes Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} Initialize Environment - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... vehicle-two-datasetid-attributes.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot index 3e8250998..eea13c066 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update entity attributes if the entity id or attributes are not known to the system +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -9,7 +10,6 @@ Suite Teardown Delete Initial Entities *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${fragment_filename}= vehicle-speed-two-datasetid-01-fragment.jsonld @@ -17,7 +17,7 @@ ${fragment_filename}= vehicle-speed-two-datasetid-01-fragment.jsonld 011_03_01 Update entity attributes when the entity id is not known to the system [Documentation] Check that one cannot update entity attributes if the entity id or attributes are not known to the system [Tags] ea-update 5_6_2 - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 404 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_04.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_04.robot index b47bf2354..dd5480038 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update entity attributes with invalid request body +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,8 +11,7 @@ Test Template Update entity attributes with invalid entity fragments *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-speed-two-datasetid.jsonld +${filename}= vehicle-speed-two-datasetid.jsonld *** Test Cases *** @@ -35,7 +35,7 @@ Update entity attributes with invalid entity fragments Initialize Environment [Arguments] ${filename} - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_05.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_05.robot index 379ebefe0..b26ae6065 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can update a scope in an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Test Teardown Delete Initial Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${scope_fragment_filename}= one-scope-fragment.json @@ -53,7 +53,7 @@ ${scope_fragment_filename}= one-scope-fragment.json *** Keywords *** Create Initial Entity [Arguments] ${filename} - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_06.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_06.robot index 817c4574f..27838eeb1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_06.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that you can update the types on an entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Append Types to an Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${entity_filename}= building-minimal.json +${entity_filename}= building-minimal.json *** Test Cases *** FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -47,7 +47,7 @@ Append Types to an Entity Check Updated Resource Set To ${entity_expectation_payload} ${response.json()} Create Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${entity_filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_07.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_07.robot index c38f31ee8..f4339e354 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete an attribute using NGSI-LD Null in an Update Attributes operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= building-different-attributes-types.jsonld +${filename}= building-different-attributes-types.jsonld *** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -57,7 +57,7 @@ Delete Initial Entity Delete Entity by Id ${entity_id} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_08.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_08.robot index a170a794b..f0b461752 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_08.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_08.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete a specific attribute instance using NGSI-LD Null in an Update Attributes operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= building-different-attributes-instances-and-types.jsonld +${filename}= building-different-attributes-instances-and-types.jsonld *** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -57,7 +57,7 @@ Delete Initial Entity Delete Entity by Id ${entity_id} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_09.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_09.robot index f5dd1fb7c..7e8d48aa5 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_09.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_09.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete the default attribute instance using NGSI-LD Null in an Update Attributes operation -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,8 +13,7 @@ Test Template Update Attributes *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= building-different-default-attributes-instances-and-types.jsonld +${filename}= building-different-default-attributes-instances-and-types.jsonld *** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME @@ -57,7 +57,7 @@ Delete Initial Entity Delete Entity by Id ${entity_id} Setup Initial Entity - ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot index cc49b06f3..2e30ee5f9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can create a temporal representation of an entity -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,10 +11,6 @@ Test Teardown Delete Temporal Entity Test Template Create Temporal Entity -*** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: - - *** Test Cases *** FILENAME EXPECTATION_FILENAME CONTENT_TYPE 007_01_01 Create a temporal representation of an entity vehicle-create-temporal-representation.jsonld vehicle-temporal-representation-create.jsonld application/ld+json @@ -26,7 +23,7 @@ Create Temporal Entity [Documentation] Check that one can create a temporal representation of an entity [Tags] te-create 5_6_11 [Arguments] ${filename} ${expectation_filename} ${content_type} - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_01.robot index b101168ec..2cb8ededc 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete a temporal representation of an entity with simple temporal properties -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,8 +11,7 @@ Test Setup Create Initial Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-temporal-representation.jsonld +${filename}= vehicle-temporal-representation.jsonld *** Test Cases *** @@ -29,7 +29,7 @@ ${filename}= vehicle-temporal-representation.jsonld *** Keywords *** Create Initial Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_02.robot index 2eb55336c..16b5ede7b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_02.robot @@ -8,10 +8,6 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Test Template Delete Temporal Entity -*** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: - - *** Test Cases *** ID EXPECTED_STATUS_CODE PROBLEM_TYPE 009_02_01 Delete a temporal representation of an entity with an empty entity id ${EMPTY} 405 ${EMPTY} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_03.robot index 4f9b44bdc..589c0f506 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_03.robot @@ -1,21 +1,21 @@ *** Settings *** Documentation Check that an error is raised if one deletes a temporal entity with a non-existing/invalid EntityId +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${status_code}= 404 +${status_code}= 404 *** Test Cases *** 009_03_01 Delete a temporal representation of an entity with an unknown entity id [Documentation] Check that an error is raised if one deletes a temporal entity with a non-existing entity id [Tags] te-delete 5_6_16 - ${temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_id}= Generate Random Vehicle Entity Id ${response}= Delete Temporal Representation Of Entity With Returning Response ${temporal_entity_id} Check Response Status Code ${status_code} ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot index baa4e31e5..398c2e551 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can update a temporal representation of an entity with simple temporal properties -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-create-temporal-representation.jsonld ${update_filename}= vehicle-temporal-representation-update.jsonld ${expectation_filename}= vehicle-temporal-representation-update.jsonld @@ -43,7 +43,7 @@ ${expectation_filename}= vehicle-temporal-representation-update.jsonld *** Keywords *** Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Suite Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot index 9e4d40470..23a9b371c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can add a simple temporal attribute to a temporal representation of an entity -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation.jsonld ${fragment_filename}= vehicle-temporal-representation-fragment.jsonld ${expectation_filename}= vehicle-temporal-representation-added-attribute.jsonld @@ -43,7 +43,7 @@ ${expectation_filename}= vehicle-temporal-representation-added-attribute.json *** Keywords *** Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Suite Variable ${temporal_entity_representation_id} ${create_response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_02.robot index 960b7db7f..38fdb4128 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that an error is raised if one adds an attribute to a temporal entity with invalid content +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Add Attribute To Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation.jsonld ${fragment_filename}= vehicle-temporal-representation-fragment.jsonld ${status_code}= 400 @@ -33,7 +33,7 @@ Add Attribute To Temporal Entity Check Response Status Code ${status_code} ${response.status_code} Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Test Variable ${temporal_entity_representation_id} ${create_response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_03.robot index 46c42b3d2..508c417ed 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_03.robot @@ -1,13 +1,13 @@ *** Settings *** Documentation Check that an error is raised if one adds an attribute to a non-existent entity +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation.jsonld ${fragment_filename}= vehicle-temporal-representation-fragment.jsonld ${status_code}= 404 @@ -17,7 +17,7 @@ ${status_code}= 404 014_03_01 Add Attribute To Temporal Entity [Documentation] Check that an error is raised if one adds an attribute to a non-existent entity [Tags] tea-append 5_6_12 - ${not_found_temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${not_found_temporal_entity_representation_id}= Generate Random Vehicle Entity Id ${response}= Append Attribute To Temporal Entity ... ${not_found_temporal_entity_representation_id} ... ${fragment_filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_04.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_04.robot index 24a19441a..3c8d6f961 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that an error is raised if one adds a temporal entity attribute with empty/invalid content +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Add an Attribute To a Temporal Entity From File *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation.jsonld ${fragment_filename}= vehicle-temporal-representation-fragment.jsonld ${status_code}= 400 @@ -38,7 +38,7 @@ Add an Attribute To a Temporal Entity From File Check Response Body Title When Using Session Request ${response.json()} Initialize Test Case - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot index a3d0e607a..aa1e6b125 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete an attribute of a temporal representation of an entity with simple temporal properties -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,10 +13,9 @@ Test Template Delete Attribute From A Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-temporal-representation.jsonld -${status_code}= 204 -${attribute_id}= fuelLevel +${filename}= vehicle-temporal-representation.jsonld +${status_code}= 204 +${attribute_id}= fuelLevel *** Test Cases *** DELETE_ALL DATASET_ID EXPECTATION_FILE @@ -55,7 +55,7 @@ Delete Attribute From A Temporal Entity ... ignored_keys=${ignored_attributes} Initialize Setup - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_02.robot index 861752c01..b89aa5219 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that an error is raised if one deletes an attribute to temporal entity with an unknown/invalid Entity/Attribute Id +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,9 +12,8 @@ Test Template Delete attribute from temporal entity with unknow entity/att *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${status_code}= 400 -${filename}= vehicle-temporal-representation.jsonld +${status_code}= 400 +${filename}= vehicle-temporal-representation.jsonld *** Test Cases *** ENTITY_ID ATTRIBUTE_ID @@ -43,7 +43,7 @@ Delete attribute from temporal entity with unknow entity/attribute id Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} Create Temporal Entity - ${valid_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${valid_temporal_entity_id}= Generate Random Vehicle Entity Id ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${valid_temporal_entity_id} ... filename=${filename} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_03.robot index 493bdae75..07af2a29b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that an error is raised if one deletes a temporal entity with an unknown EntityId/Attribute Id +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,9 +12,8 @@ Test Template Delete An Attribute *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-temporal-representation.jsonld -${status_code}= 404 +${filename}= vehicle-temporal-representation.jsonld +${status_code}= 404 *** Test Cases *** ENTITY_ID ATTRIBUTE_ID @@ -42,8 +42,8 @@ Delete An Attribute Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} Create Id - ${valid_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${valid_temporal_entity_id}= Generate Random Vehicle Entity Id + ${unknown_temporal_entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${valid_temporal_entity_id} Set Test Variable ${unknown_temporal_entity_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot index 7c1a37943..105ed76b7 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can delete an attribute instance in temporal representation of an entity -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation.jsonld ${attributeId}= speed ${expectation_filename}= vehicle-temporal-representation-delete-speed-instanceid.jsonld @@ -51,7 +51,7 @@ ${expectation_filename}= vehicle-temporal-representation-delete-speed-instanc *** Keywords *** Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Suite Variable ${temporal_entity_representation_id} ${create_response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_02.robot index 98adc7bcd..72e8ff57b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot delete an attribute instance in temporal representation of an entity if the EntityId/AttributeId/InstanceId is not right -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,9 +13,8 @@ Test Template Delete attribute instance *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-temporal-representation.jsonld -${status_code}= 400 +${filename}= vehicle-temporal-representation.jsonld +${status_code}= 400 *** Test Cases *** TEMPORAL_ENTITY_ID ATTRIBUTE_ID INSTANCE_ID @@ -44,7 +44,7 @@ Delete attribute instance Check Response Status Code ${status_code} ${response.status_code} Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot index dcdb0de06..638eb85a1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot delete an attribute instance in temporal representation of an entity if the EntityId/AttributeId/InstanceId is not right -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,9 +13,8 @@ Test Template Delete An Attribute Instance *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-temporal-representation.jsonld -${status_code}= 404 +${filename}= vehicle-temporal-representation.jsonld +${status_code}= 404 *** Test Cases *** TEMPORAL_ENTITY_ID ATTRIBUTE_ID INSTANCE_ID @@ -40,7 +40,7 @@ Delete An Attribute Instance Check Response Status Code ${status_code} ${response.status_code} Create Id - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} @@ -54,7 +54,7 @@ Create Id ... context=${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response.json()['speed'][0]['instanceId']} Set Test Variable ${valid_instanceId} - ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${unknown_temporal_entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${unknown_temporal_entity_id} Delete Initial Temporal Representation Of Entity diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot index 48cfee351..d8c1ee172 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can modify an attribute instance in temporal representation of an entity -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Intitial Temporal Representation Of Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation.jsonld ${fragment_filename}= vehicle-temporal-modify-attribute-instance-fragment.jsonld ${expectation_filename}= vehicle-temporal-representation-modify-attribute-instance.jsonld @@ -60,7 +60,7 @@ ${attributeId}= speed *** Keywords *** Create Temporal Entity - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Suite Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_02.robot index b65a5f4b1..f0f3f85b6 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot modify an attribute instance in temporal representation of an entity if the EntityId/AttributeId/InstanceId is not right -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Modify Attribute Instance Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation.jsonld ${fragment_filename}= vehicle-temporal-modify-attribute-instance-fragment.jsonld @@ -47,7 +47,7 @@ Modify Attribute Instance Temporal Entity Check Response Status Code ${expected_status_code} ${response.status_code} Create Id - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot index 3b2a8633c..d134c5b03 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one cannot partially modify attribute instance in temporal representation of an entity if the EntityId/AttributeId/InstanceId is not found -Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -12,7 +13,6 @@ Test Template Modify Attribute Instance Temporal Entity *** Variables *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation.jsonld ${fragment_filename}= vehicle-temporal-modify-attribute-instance-fragment.jsonld ${status_code}= 404 @@ -42,7 +42,7 @@ Modify Attribute Instance Temporal Entity Check Response Status Code ${status_code} ${response.status_code} Create Id - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id Set Suite Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} @@ -56,7 +56,7 @@ Create Id ... context=${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response.json()['speed'][0]['instanceId']} Set Test Variable ${valid_instanceId} - ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${unknown_temporal_entity_id}= Generate Random Vehicle Entity Id Set Test Variable ${unknown_temporal_entity_id} Delete Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot index 8c618ad72..cb06d411a 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can create a subscription +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -9,7 +10,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld ${subscription_expectation_file_path}= subscriptions/expectations/subscription-028-01.jsonld @@ -18,7 +18,7 @@ ${subscription_expectation_file_path}= subscriptions/expectations/subscript 028_01_01 Create Subscription [Documentation] Check that one can create a subscription [Tags] sub-create 5_8_1 - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${subscription_id} ${response}= Create Subscription ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot index dde6d4c44..66106a66c 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot create a subscription with an existing id +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld @@ -32,7 +32,7 @@ ${subscription_payload_file_path}= subscriptions/subscription.jsonld *** Keywords *** Create Initial Subscription - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${subscription_id} ${initial_response}= Create Subscription ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot index 066f7c38e..a092939dc 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can delete a subscription +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -9,7 +10,6 @@ Suite Setup Setup Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld @@ -26,7 +26,7 @@ ${subscription_payload_file_path}= subscriptions/subscription.jsonld *** Keywords *** Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${create_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot index 7e94cad0e..d98e1f935 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query a list of subscriptions +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${first_subscription_payload_file_path}= subscriptions/subscription.jsonld ${second_subscription_payload_file_path}= subscriptions/subscription-watchedAttributes.jsonld ${third_subscription_payload_file_path}= subscriptions/subscription-inactive.jsonld @@ -35,21 +35,21 @@ ${expectation_file_path}= subscriptions/expectations/subsc *** Keywords *** Setup Initial Subscriptions - ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${first_subscription_id}= Generate Random Subscription Id ${create_response1}= Create Subscription ... ${first_subscription_id} ... ${first_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} Set Suite Variable ${first_subscription_id} - ${second_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${second_subscription_id}= Generate Random Subscription Id ${create_response2}= Create Subscription ... ${second_subscription_id} ... ${second_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_subscription_id} - ${third_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${third_subscription_id}= Generate Random Subscription Id ${create_response3}= Create Subscription ... ${third_subscription_id} ... ${third_subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot index 0440eb19f..074779101 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query a list of subscriptions: Pagination logic shall be in place +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Query Subscriptions With Limit And Page Parameters *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${first_subscription_payload_file_path}= subscriptions/subscription.jsonld ${second_subscription_payload_file_path}= subscriptions/subscription-watchedAttributes.jsonld ${third_subscription_payload_file_path}= subscriptions/subscription-inactive.jsonld @@ -46,21 +46,21 @@ Query Subscriptions With Limit And Page Parameters Check Pagination Prev And Next Headers ${prev_link} ${next_link} ${response.headers} Setup Initial Subscriptions - ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${first_subscription_id}= Generate Random Subscription Id ${create_response1}= Create Subscription ... ${first_subscription_id} ... ${first_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response1.status_code} Set Test Variable ${first_subscription_id} - ${second_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${second_subscription_id}= Generate Random Subscription Id ${create_response2}= Create Subscription ... ${second_subscription_id} ... ${second_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_subscription_id} - ${third_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${third_subscription_id}= Generate Random Subscription Id ${create_response3}= Create Subscription ... ${third_subscription_id} ... ${third_subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot index 69baa4d00..ee2404b0e 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a subscription +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld ${expectation_file_path}= subscriptions/expectations/subscriptions-030-03.json @@ -31,7 +31,7 @@ ${expectation_file_path}= subscriptions/expectations/subscriptions *** Keywords *** Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${create_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot index 36af1c75d..aed10b6a2 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that a notification is only sent if and only if the status is active -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-active.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_building_filepath}= building-simple-attributes.jsonld ${fragment_filename}= airQualityLevel-fragment.jsonld ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify @@ -42,13 +41,13 @@ Before Test Setup Initial Subscriptions Add Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity ${entity_building_filepath} ${entity_id} Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot index c14633af0..ace3e6f1a 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation If a Subscription defines a timeInterval member, a Notification shall be sent periodically, when the time interval (in seconds) specified in such value field is reached, regardless of Attribute changes. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-timeInterval.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify ${entity_building_filepath}= building-simple-attributes.jsonld @@ -43,8 +42,8 @@ Before Test Start Local Server ${notification_server_host} ${notification_server_port} Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot index 7257da2b4..6237d17cd 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation A notification with all subscribed Entities will be included if query or geoquery are not defined. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-default.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify ${entity_building_filepath}= building-simple-attributes.jsonld ${fragment_filename}= airQualityLevel-fragment.jsonld @@ -43,8 +42,8 @@ Before Test Setup Initial Subscriptions Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} @@ -71,7 +70,7 @@ Delete Initial Subscriptions Delete Subscription ${subscription_id} Add Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Create Entity ${entity_building_filepath} ${entity_id} Set Suite Variable ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot index dfa3c812f..3b2ab4943 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation If a Subscription does not define a timeInterval member, the notification shall be sent whenever there is a change in the watched Attributes. The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-active-watchedAttributes.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify ${entity_building_filepath}= building-simple-attributes.jsonld ${fragment_filename}= airQualityLevel-fragment.jsonld @@ -42,8 +41,8 @@ Before Test Setup Initial Subscriptions Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot index 4ec55b206..14b267ab2 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation If a Subscription does not define a timeInterval member, the notification shall be sent whenever there is a change in the watched Attributes and the entity matches the q parameter. The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-active-watchedAttributes-query.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify ${entity_building_filepath}= building-simple-attributes.jsonld ${fragment_filename}= airQualityLevel-fragment.jsonld @@ -43,8 +42,8 @@ Before Test Setup Initial Subscriptions Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot index a5bc12c4f..5f1e592ce 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that a notification is sent when an entity is created and entityCreated notification trigger is configured -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown Delete Server And Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-entityCreated.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${building_filename}= building-location-attribute.jsonld ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify @@ -23,7 +22,7 @@ ${notification_server_send_url}= http://${notification_server_host}:${not 046_06_01 Check that a notification is sent with all matching entities [Documentation] Check that a notification is sent when an entity is created and entityCreated notification trigger is configured [Tags] sub-notification 5_8_6 since_v1.6.1 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type @@ -38,7 +37,7 @@ ${notification_server_send_url}= http://${notification_server_host}:${not *** Keywords *** Setup Server And Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot index a7f2bc3a5..467dd4eb3 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that a notification is only sent if and only if the status is active -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -13,11 +14,9 @@ Test Teardown After Test *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-building-entities-active.jsonld ${subscription_payload_file_path_notificationAttributes} subscriptions/subscription-building-entities-active-notificationAttributes.jsonld ${subscription_payload_file_path_default_context} subscriptions/subscription-building-entities-active-default-context.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${notification_server_send_url} http://${notification_server_host}:${notification_server_port}/notify ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld @@ -75,8 +74,8 @@ Before Suite Setup Initial Subscriptions [Arguments] ${subscription_payload_path} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot index 65213d783..34d82d9c5 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that a notification is only sent if and only if the status is active -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -14,9 +15,7 @@ Test Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-active.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify ${entity_building_filepath}= building-simple-attributes.jsonld ${fragment_filename}= airQualityLevel-fragment.jsonld @@ -63,8 +62,8 @@ Before Suite Setup Initial Subscriptions [Arguments] ${change_json} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot index 3a5c11eaf..4f96957ec 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.receiverInfo defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.14 -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-building-entities-active-endpoint-info.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${notification_server_send_url} http://${notification_server_host}:${notification_server_port}/notify @@ -37,8 +36,8 @@ Before Test Setup Initial Subscriptions Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot index 885ebb79a..940ca5b08 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot @@ -2,8 +2,8 @@ Documentation The Notification content shall be JSON by default. Resource ${EXECDIR}/resources/ApiUtils/Common.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -13,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-building-entities-default.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${notification_server_send_url} http://${notification_server_host}:${notification_server_port}/notify @@ -41,8 +39,8 @@ Before Test Setup Initial Subscriptions Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot index b036cf949..c8d2ad243 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.info defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.14 -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-active.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_building_filepath}= building-simple-attributes.jsonld ${fragment_filename}= airQualityLevel-fragment.jsonld ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify @@ -48,7 +47,7 @@ Before Test Setup Initial Subscriptions Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} @@ -61,7 +60,7 @@ Setup Initial Subscriptions Set Suite Variable ${subscription_id} Add Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity ${entity_building_filepath} ${entity_id} Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot index d3569130d..26b3e43f4 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.info defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.14 -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-active.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_building_filepath}= building-simple-attributes.jsonld ${fragment_filename}= airQualityLevel-fragment.jsonld ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify @@ -56,13 +55,13 @@ Before Test Setup Initial Subscriptions Add Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} Check Response Status Code 201 ${create_response1.status_code} Set Suite Variable ${entity_id} Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot index 7f391cfd2..d07ebf64d 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot @@ -1,21 +1,20 @@ *** Settings *** Documentation If the response to the notification request is different than 200 OK then implementations shall: Update notification.lastFailure with a timestamp representing the current date and time, update notification.status to "failed" -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/MockServerUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource Suite Setup Before Test Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-active.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${entity_building_filepath}= building-simple-attributes.jsonld ${fragment_filename}= airQualityLevel-fragment.jsonld @@ -51,7 +50,7 @@ Before Test Add Initial Entity Setup Initial Subscription - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${create_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} @@ -60,7 +59,7 @@ Setup Initial Subscription Set Suite Variable ${subscription_id} Add Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity ${entity_building_filepath} ${entity_id} Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot index bd1584670..4f354b9e3 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation The Notification content shall be JSON-LD when endpoint.accept is set to JSON-LD -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-building-entities-accept-jsonld.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${notification_server_send_url} http://${notification_server_host}:${notification_server_port}/notify @@ -49,13 +48,13 @@ Before Test Sleep 1s Add Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${create_response}= Create Entity ${entity_building_filepath} ${entity_id} Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot index 951aa3192..6cc1d8023 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation If a Subscription defines a throttling member, a Notification shall not be sent if the throttling specified (in seconds) has not elapsed yet. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-valid-throttling.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify ${entity_building_filepath}= building-simple-attributes.jsonld ${fragment_filename}= airQualityLevel-fragment.jsonld @@ -40,8 +39,8 @@ Before Test Setup Initial Subscriptions Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_01.robot index 2ff7515ae..c9d538cac 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation If a subscription defines an entity type selection query, a notification shall be sent whenever an entity matches the query. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-type-selection.jsonld -${building_id_prefix}= urn:ngsi-ld:Building: ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify ${entity_building_filepath}= building-simple-attributes.jsonld ${content_type}= application/ld+json @@ -25,7 +24,7 @@ ${content_type}= application/ld+json [Documentation] If a subscription defines an entity type selection query, a notification shall be sent whenever an entity matches the query. [Tags] sub-notification 5_8_6 since_v1.5.1 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity Selecting Content Type ... ${entity_building_filepath} ... ${entity_id} @@ -42,7 +41,7 @@ ${content_type}= application/ld+json *** Keywords *** Setup Initial Subscription - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot index d9b6f08db..6598466e9 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation If a subscription defines an entity type selection query, a notification shall be sent whenever an entity matches the query. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-building-entities-type-selection.jsonld -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify ${entity_vehicle_filepath}= vehicle-simple-attributes.jsonld ${content_type}= application/ld+json @@ -25,7 +24,7 @@ ${content_type}= application/ld+json [Documentation] If a subscription defines an entity type selection query, a notification shall not be sent if the entity type does not match the query [Tags] sub-notification 5_8_6 since_v1.5.1 - ${vehicle_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${vehicle_id}= Generate Random Vehicle Entity Id ${response}= Create Entity Selecting Content Type ... ${entity_vehicle_filepath} ... ${vehicle_id} @@ -37,7 +36,7 @@ ${content_type}= application/ld+json *** Keywords *** Setup Initial Subscription - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_17.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_17.robot index faf298434..49e114a91 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_17.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_17.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation The system generated attributes are included in the response payload body of a notification if sysAttrs parameter is set to true. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-with-true-sysAttrs-parameter.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${notification_server_send_url} http://${notification_server_host}:${notification_server_port}/notify @@ -43,8 +42,8 @@ Before Test Setup Initial Subscriptions Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_18.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_18.robot index a1c6aea5b..02ad0c4a2 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_18.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_18.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation The system generated attributes are not included in the response payload body of a notification if sysAttrs parameter is set to false. -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,9 +13,7 @@ Suite Teardown After Test *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-with-false-sysAttrs-parameter.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${notification_server_send_url} http://${notification_server_host}:${notification_server_port}/notify @@ -43,8 +42,8 @@ Before Test Setup Initial Subscriptions Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_01.robot index 2e5b8f652..ea4be5c12 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_01.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent when an entity is deleted ... and entityDeleted notification trigger is configured -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_02.robot index 6138ce24e..acd4e36cc 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_02.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent with sysAttrs when an entity is deleted ... and entityDeleted notification trigger is configured -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_01.robot index 25ed9e54f..08ceb0bab 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_01.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent with keyValues when an attribute is deleted ... and attributeDeleted notification trigger is configured -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_02.robot index aeffec036..3639de288 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_02.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent with keyValues when an attribute is deleted ... and attributeDeleted notification trigger is configured for this specific attribute -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_03.robot index f7a5cf821..46f6df10b 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_03.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is not sent when an attribute is deleted ... and attributeDeleted notification trigger is not configured for this specific attribute -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_04.robot index ec7f5e8e0..0fd763b9f 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_04.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent in normalized format when an attribute is deleted ... and attributeDeleted notification trigger is configured for this specific attribute -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_05.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_05.robot index 5c0c837f5..f2748f01d 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_05.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_05.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent in normalized format with sysAttrs when an attribute is deleted ... and attributeDeleted notification trigger is configured for this specific attribute -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_06.robot index 09856c7d3..cf25e5c18 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_06.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent in normalized format when an attribute with a specific datasetId is deleted ... and attributeDeleted notification trigger is configured for this specific attribute -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_07.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_07.robot index 5d1f1e3b2..75319b91d 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_07.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_07.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent with keyValues when an attribute with a specific datasetId is deleted ... and attributeDeleted notification trigger is configured for this specific attribute -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot index caa9fd639..6b10cfa49 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent when all instances of an attribute are deleted ... and attributeDeleted notification trigger is configured for this specific attribute -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_09.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_09.robot index 3d9162c68..fa813da3e 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_09.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_09.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent in normalized format when an attribute is deleted via NGSI-LD Null ... in a Merge Entity operation and attributeDeleted notification trigger is configured for this specific attribute -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_10.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_10.robot index fd960fb8f..702addd6a 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_10.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_10.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent in normalized format when a relationship is deleted via NGSI-LD Null ... in a Merge Entity operation and attributeDeleted notification trigger is configured for this specific relationship -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_11.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_11.robot index 69d425a86..4bd8da924 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_11.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_11.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent in normalized format when a language property is deleted via NGSI-LD Null ... in a Merge Entity operation and attributeDeleted notification trigger is configured for this specific property -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_12.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_12.robot index 53d48aebb..6c5edab7d 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_12.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_12.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent in normalized format when an entity is deleted ... and attributeDeleted notification trigger is configured for a matching attribute in deleted entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_13.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_13.robot index dbe391b3c..24003f149 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_13.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_13.robot @@ -2,8 +2,8 @@ Documentation Check that a notification is sent in normalized format with sysAttrs when an entity is deleted ... and attributeDeleted notification trigger is configured for a matching attribute in deleted entity -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Resource ${EXECDIR}/resources/SubscriptionUtils.resource diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_01.robot index 2336b5615..82077ef4d 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the Mqtt Notification is received with different userInfo and port -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -13,9 +14,7 @@ Test Template Receive MQTT Notification *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-building-entities-default.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${topic} ngsild-test-suite/topic @@ -63,8 +62,8 @@ After Test Setup Mqtt Subscription [Arguments] ${endpoint_uri} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_02.robot index 8bc650943..f8d6c49e8 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the mqtt notification is received with different qos -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -14,9 +15,7 @@ Test Template Receive MQTT Notification *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-building-entities-default.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${topic} ngsild-test-suite/topic @@ -60,8 +59,8 @@ After Test Setup Mqtt Subscription [Arguments] ${endpoint_uri} ${qos}=${None} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_03.robot index 794cd76ad..c024d1cde 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that mqtt notification is received with different mqtt version -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -14,9 +15,7 @@ Test Template Receive Mqtt Notification *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-building-entities-default.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${topic} ngsild-test-suite/topic @@ -62,8 +61,8 @@ After Test Setup Mqtt Subscription [Arguments] ${endpoint_uri} ${version}=${None} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_04.robot index 3077e3c96..8452f4916 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/MQTT/058_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the mqtt notification payload is well formed -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -14,9 +15,7 @@ Test Template Receive Mqtt Notification *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription-building-entities-default.jsonld -${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${topic} ngsild-test-suite/topic @@ -65,8 +64,8 @@ After Test Setup Mqtt Subscription [Arguments] ${endpoint_uri} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${entity_id}= Generate Random Building Entity Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot index 31b5bceb9..06adbf1f5 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update a subscription: If the data types and restriction are not met by the Subscription Fragment, then an error of type BadRequestData shall be raised +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld ${subscription_update_fragment_file_path}= subscriptions/fragments/subscription-invalid-update.json @@ -32,7 +32,7 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${initial_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot index 8ca7ab552..15bb26002 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update a subscription: Any attempt to remove (by setting them to null in the Fragment) mandatory properties of a Subscription (clause 5.2.12) shall result in an error of type BadRequestData +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld ${subscription_update_fragment_file_path}= subscriptions/fragments/subscription-null-properties-update.json @@ -32,7 +32,7 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${initial_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot index f5100d6a8..b1c38a781 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can update a subcription: Term to URI expansion of Attribute names shall be observed +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld ${subscription_update_fragment_file_path}= subscriptions/fragments/subscription-vehicle-entities.json ${expected_subscription_payload_file_path}= subscriptions/expectations/subscription-vehicle.jsonld @@ -54,7 +54,7 @@ ${expected_expanded_subscription_payload_file_path}= subscriptions/expectatio *** Keywords *** Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${initial_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot index 45b847e29..003a5802a 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can update a subscription: The implementation shall modify the target Subscription +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld ${subscription_update_fragment_file_path}= subscriptions/fragments/subscription-update.json @@ -40,7 +40,7 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${initial_response}= Create Subscription ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot index d3f6278dc..6f7f021c3 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can update a subscription: If isActive is equal to true and expiresAt is not present, then status shall be updated to "active", if and only if, the previous value of status was different than "expired" +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Activate Paused Subscription With isActive Member *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-inactive.jsonld @@ -38,7 +38,7 @@ Activate Paused Subscription With isActive Member ... expected_attribute_value=active Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${initial_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot index 0a497a276..5ad4cbf5b 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can update a subscription: If isActive is equal to true and expiresAt corresponds to a DateTime in the future, then status shall be updated to "active" +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Activate Paused Subscription With isActive And ExpiresAt Mem *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription-inactive.jsonld @@ -38,7 +38,7 @@ Activate Paused Subscription With isActive And ExpiresAt Members ... expected_attribute_value=active Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${initial_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot index 4012ed415..2748e5ed6 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can update a subscription: If isActive is equal to false and expiresAt is not present, then status shall be updated to "paused", if and only if, the previous value of status was different than "expired" +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld ${subscription_update_fragment_file_path}= subscriptions/fragments/subscription-isActive-false-update.json @@ -34,7 +34,7 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${initial_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot index 5c4cebbc3..2d5ebb42c 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can update a subscription: If only expiresAt is included and refers to a DateTime in the future, then status shall be updated to "active", if and only if the previous value of status was "expired" +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix} urn:ngsi-ld:Subscription: ${subscription_payload_file_path} subscriptions/subscription.jsonld ${subscription_update_fragment_file_path} subscriptions/fragments/subscription-expiresAt-future-update.json @@ -45,7 +45,7 @@ ${subscription_update_fragment_file_path} subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${initial_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot index 52c642317..87ca08d4d 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update a subscription: If expiresAt is included but referring to a DateTime in the past, then a BadRequestData error shall be raised +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Initial Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= subscriptions/subscription.jsonld ${subscription_update_fragment_file_path}= subscriptions/fragments/subscription-expiresAt-update.json @@ -32,7 +32,7 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${initial_response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_01.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_01.robot index 5561471b2..3cd4d089a 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_01.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registrations if at least one of list of Entity Types or list of Attribute names is present +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Query A Context Source Registration *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${first_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${second_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-detailed-information.jsonld @@ -44,8 +44,8 @@ Query A Context Source Registration ... ${response.json()} Setup Initial Context Source Registrations - ${first_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${second_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${first_context_source_registration_id}= Generate Random CSR Id + ${second_context_source_registration_id}= Generate Random CSR Id ${first_context_source_registration_payload}= Load Test Sample ... ${first_context_source_registration_payload_file_path} ... ${first_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot index ce6506bee..2ad810467 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registrations. If a JSON-LD context is not provided, then all the query terms shall be resolved against the default JSON-LD @context +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Created Context Source Registration *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-detailed-information.jsonld ${expectation_file_path}= csourceRegistrations/expectations/context-source-registrations-037-04.json ${entity_type}= https://ngsi-ld-test-suite/context#Building @@ -32,7 +32,7 @@ ${entity_type}= https://ngsi-ld-test-sui *** Keywords *** Setup Initial Context Source Registration - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_05.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_05.robot index 64d0e75f8..1df96505b 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_05.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_05.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registrations matching EntityInfo of RegistrationInfo +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -10,10 +11,6 @@ Test Teardown Delete Created Context Source Registration Test Template Query Context Source Registration Matching EntityInfo of RegistrationInfo -*** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: - - *** Test Cases *** REGISTRATION_FILE_PATH EXPECTATION_FILE_PATH 037_05_01 Registration With EntityInfo Matching The Query [Tags] csr-query 5_10_2 @@ -43,7 +40,7 @@ Query Context Source Registration Matching EntityInfo of RegistrationInfo Setup Initial Context Source Registrations [Arguments] ${registration_file_path} - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${registration_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_06.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_06.robot index dbc54401b..14f86c9d9 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_06.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_06.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registrations matching property and relationship names of RegistrationInfo +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Query Context Source Registration Matching Properties And Re *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-detailed-information.jsonld @@ -41,7 +41,7 @@ Query Context Source Registration Matching Properties And Relationships Of Regis ... ${response.json()} Setup Initial Context Source Registration - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_07.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_07.robot index 6503341a1..712bba695 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_07.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_07.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registrations. If present, the geoquery is matched against the GeoProperty programmatic parameter identified in the geoquery +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Query Context Source Registration Matching Geoquery *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-location.jsonld ${expectation_file_path}= csourceRegistrations/expectations/context-source-registrations-037-07.json @@ -45,7 +45,7 @@ Query Context Source Registration Matching Geoquery ... ${response.json()} Setup Initial Context Source Registration - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_08.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_08.robot index 1cfc51405..3ada77bf3 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_08.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_08.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registrations. If no temporal query is present, only Context Source Registrations for Context Sources providing latest information are considered +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Created Context Source Registration *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${expectation_file_path}= csourceRegistrations/expectations/context-source-registrations-037-08.json @@ -31,7 +31,7 @@ ${expectation_file_path}= csourceRegistrations/exp *** Keywords *** Setup Initial Context Source Registration - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_09.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_09.robot index 46fed3a95..7db27322b 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_09.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_09.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registrations. If present, the temporal query is matched against the observationInterval or the managementInterval +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Test Template Query Context Source Registration Matching Temporal Query *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${context_source_registration_observation_interval_payload_file_path}= csourceRegistrations/context-source-registration-observationInterval.jsonld ${context_source_registration_management_interval_payload_file_path}= csourceRegistrations/context-source-registration-managementInterval.jsonld ${observation_interval_expectation_file_path}= csourceRegistrations/expectations/context-source-registrations-037-09-01.json @@ -56,7 +56,7 @@ Query Context Source Registration Matching Temporal Query Setup Initial Context Source Registrations [Arguments] ${payload_file_path} - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_10.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_10.robot index 5d6010a89..799d58c37 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_10.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_10.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registrations. If present, the conditions specified by the context source query match the respective Context Source Properties +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Query Context Source Registration With Query Params *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${first_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${second_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-detailed-information.jsonld ${third_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-csourceProperty.jsonld @@ -45,9 +45,9 @@ Query Context Source Registration With Query Params ... ${response.json()} Setup Initial Context Source Registrations - ${first_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${second_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${third_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${first_context_source_registration_id}= Generate Random CSR Id + ${second_context_source_registration_id}= Generate Random CSR Id + ${third_context_source_registration_id}= Generate Random CSR Id ${first_context_source_registration_payload}= Load Test Sample ... ${first_context_source_registration_payload_file_path} ... ${first_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_11.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_11.robot index 5de8035b2..d4d2796f1 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_11.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_11.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registrations with providing page and limit parameters, pagination logic shall be in place as mandated by clause 5.5.9. +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Query Context Source Registration With Limit And Offset Para *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${first_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${second_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-location.jsonld ${third_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-detailed-information.jsonld @@ -47,9 +47,9 @@ Query Context Source Registration With Limit And Offset Parameters Check Pagination Prev And Next Headers ${prev_link} ${next_link} ${response.json()} Setup Initial Context Source Registrations - ${first_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${second_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${third_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${first_context_source_registration_id}= Generate Random CSR Id + ${second_context_source_registration_id}= Generate Random CSR Id + ${third_context_source_registration_id}= Generate Random CSR Id ${first_context_source_registration_payload}= Load Test Sample ... ${first_context_source_registration_payload_file_path} ... ${first_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_03.robot b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_03.robot index 799b458eb..a71f978e1 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_03.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a Context Source Registration. Term to URI expansion of Attribute names shall be observed. +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Created Context Source Registration *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${expectation_file_path}= csourceRegistrations/expectations/context-source-registration-expanded-format.json @@ -31,7 +31,7 @@ ${expectation_file_path}= csourceRegistrations/exp *** Keywords *** Setup Initial Context Source Registration - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_04.robot b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_04.robot index 8036b1f1f..ed20f05bd 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_04.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a Context Source Registration +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Suite Teardown Delete Created Context Source Registration *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${expectation_file_path}= csourceRegistrations/expectations/context-source-registration.json @@ -32,7 +32,7 @@ ${expectation_file_path}= csourceRegistrations/exp *** Keywords *** Setup Initial Context Source Registration - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_05.robot b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_05.robot index 5b4f372e6..d143f9f22 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_05.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_05.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that the JSON-LD @context is obtained from a Link header if present and that the default JSON-LD @context is used if not present +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -12,7 +13,6 @@ Test Template Review JSON-LD resolution when retrieving a context source r *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${expectation_file_path_compacted}= csourceRegistrations/expectations/context-source-registration.json ${expectation_file_path_expanded}= csourceRegistrations/expectations/context-source-registration-expanded-format.json @@ -41,7 +41,7 @@ Review JSON-LD resolution when retrieving a context source registration ... ${response.json()} Setup Initial Context Source Registration - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot index 08bdca8a7..4db4751a9 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can delete a context source registration by id +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -11,7 +12,6 @@ Test Teardown Delete Created Context Source Registrations *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= context-source-registration.jsonld @@ -31,7 +31,7 @@ ${registration_payload_file_path}= context-source-registration.jsonld *** Keywords *** Setup Initial Context Source Registrations - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${create_response}= Create Context Source Registration With Return ${updated_payload} diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot index fef11c197..5c808ab2b 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot delete a context source registration under some conditions +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,8 +12,7 @@ Test Template Delete A Context Source *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: -${filename}= context-source-registration.jsonld +${filename}= context-source-registration.jsonld *** Test Cases *** INVALID_REGISTRATION_ID EXPECTED_STATUS_CODE PROBLEM_TYPE @@ -41,7 +41,7 @@ Delete Created Context Source Registrations Delete Context Source Registration ${registration_id} Create Initial Context Source Registration - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Test Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_03.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_03.robot index 444f867b7..83edff3ea 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_03.robot @@ -1,13 +1,13 @@ *** Settings *** Documentation Check that one cannot delete a context source registration by id if the id is not known to the system +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= context-source-registration-simple.jsonld @@ -15,7 +15,7 @@ ${registration_payload_file_path}= context-source-registration-simple.jsonl 035_03_01 Delete a context source registration by id [Documentation] Check that one cannot delete a context source registration by id if the id is not known to the system [Tags] csr-delete 5_9_4 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id ${response}= Delete Context Source Registration With Return ${registration_id} Check Response Status Code 404 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_01.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_01.robot index ac196405b..7d8cd5318 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can create a context source registration with specific ID and expiration date +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registrations *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration-with-expiration.jsonld @@ -18,7 +18,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_01_01 Create Context Source Registration With Specific Date Expiration Date [Documentation] Check that one can create a context source registration with specific ID and expiration date [Tags] csr-create 5_9_2 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${registration_payload}= Update Value To JSON ${payload} $..id ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_02.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_02.robot index 236dc7e6f..71ef3c4cd 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can create a context source registration that never expires -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registrations *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld @@ -18,7 +18,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_01_02 Create Context Source Registration That Never Expires [Documentation] Check that one can create a context source registration that never expires [Tags] csr-create 5_9_2 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${registration_payload}= Update Value To JSON ${payload} $..id ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_03.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_03.robot index 55d7e7938..0f3974d15 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_03.robot @@ -1,8 +1,8 @@ *** Settings *** Documentation Check that one can create a context source registration without specifying an ID -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +10,6 @@ Suite Teardown Delete Created Context Source Registrations *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration-no-id.jsonld diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_02.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_02.robot index b68aee121..03cfae802 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_02.robot @@ -8,7 +8,6 @@ Library OperatingSystem *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration-invalid.jsonld diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_03.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_03.robot index cc2b14ded..2be02a34e 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot create a context source registration that already exists +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,8 +11,7 @@ Test Teardown Delete Created Context Source Registrations *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: -${filename}= csourceRegistrations/context-source-registration.jsonld +${filename}= csourceRegistrations/context-source-registration.jsonld *** Test Cases *** @@ -28,7 +28,7 @@ Delete Created Context Source Registrations Delete Context Source Registration ${registration_id} Create New Context Source Registration - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Test Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/${filename} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_04.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_04.robot index 57019f01e..764c9c518 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_04.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registrations *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration.json @@ -18,7 +18,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_04_01 Create one context source registration using a provided Link header with JSON content type with Context [Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" [Tags] csr-create 6_3_5 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} @@ -38,7 +38,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_04_02 Create one context source registration using a provided Link header with JSON content type without Context [Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" [Tags] csr-create 6_3_5 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_05.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_05.robot index a53ca256c..4732aea51 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registrations *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration.json @@ -18,7 +18,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_05_01 Create one context source registration using the default context with JSON content type with Context [Documentation] Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context and retrieve the information with ngsild context [Tags] csr-create 6_3_5 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} @@ -37,7 +37,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_05_02 Create one context source registration using the default context with JSON content type without Context [Documentation] Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context and retrieve the information without ngsild context [Tags] csr-create 6_3_5 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_06.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_06.robot index 660538a59..14068f2ef 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_06.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_06.robot @@ -1,13 +1,13 @@ *** Settings *** Documentation Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld @@ -15,7 +15,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_06_01 Create one context source registration containing a JSON-LD @context with a JSON content type [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term [Tags] csr-create 6_3_5 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${response}= Create Context Source Registration With Return diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_07.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_07.robot index 74754b158..ed0689e12 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_07.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registrations *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld @@ -18,7 +18,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_07_01 Create one context source registration using a JSON-LD @context obtained from the request payload with Context [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" and retrieve the information with ngsild context [Tags] csr-create 6_3_5 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $.id ${registration_id} @@ -37,7 +37,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_07_02 Create one context source registration using a JSON-LD @context obtained from the request payload without Context [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" and retrieve the information without ngsild context [Tags] csr-create 6_3_5 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $.id ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_08.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_08.robot index e1fda0556..58e047144 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_08.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_08.robot @@ -1,13 +1,13 @@ *** Settings *** Documentation Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration.json @@ -15,7 +15,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_08_01 Create one context source registration not containing a JSON-LD @context with a JSON-LD content type [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term [Tags] csr-create 6_3_5 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${response}= Create Context Source Registration With Return diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_09.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_09.robot index e7c14fc04..fab0da5a7 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_09.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_09.robot @@ -1,13 +1,13 @@ *** Settings *** Documentation Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and a JSON-LD Link header is present in the incoming HTTP request +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld @@ -15,7 +15,7 @@ ${registration_payload_file_path}= csourceRegistrations/context-source-regi 033_09_01 Create one context source registration with a Link header and a JSON-LD content type [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and a JSON-LD Link header is present in the incoming HTTP request [Tags] csr-create 6_3_5 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id ${payload}= Load JSON From File ${EXECDIR}/data/${registration_payload_file_path} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${response}= Create Context Source Registration With Return diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_10.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_10.robot index 280fb4ddc..cb68ada92 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_10.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_10.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot create a context source with invalid content +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -8,10 +9,6 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Test Template Create Context Source With Invalid Content -*** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: - - *** Test Cases *** 033_10_01 Create a context source registration with a different data structure than CSourceRegistration data type csourceRegistrations/context-source-registration-invalid-structure.jsonld @@ -24,7 +21,7 @@ Create Context Source With Invalid Content [Documentation] Check that one cannot create a context source with invalid content [Tags] csr-create 6_3_5 [Arguments] ${filename} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id ${payload}= Load JSON From File ${EXECDIR}/data/${filename} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${response}= Create Context Source Registration With Return ${updated_payload} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot index a28c07efd..fb7043569 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can update a context source registration by id -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,10 +12,6 @@ Test Teardown Delete Updated Context Source Registration Test Template Update A Context Source -*** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: - - *** Test Cases *** FILENAME UPDATE_FILENAME 034_01_01 Update a context source registration by id [Tags] csr-update 5_9_3 @@ -44,7 +41,7 @@ Delete Updated Context Source Registration Delete Context Source Registration ${registration_id} Initialize the Test Case - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Test Variable ${registration_id} ${payload}= Load JSON From File ... ${EXECDIR}/data/csourceRegistrations/context-source-registration.jsonld diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot index 30f2a85a6..ea7c96136 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update a context source registration under some conditions +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Update A Context Source *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${filename}= context-source-registration.jsonld ${registration_payload_file_path}= context-source-registration-invalid.jsonld ${reason_400}= Bad Request @@ -42,7 +42,7 @@ Update A Context Source Check Response Body Containing ProblemDetails Element ${response.json()} ${problem_type} Create Initial Context Source Registration - ${valid_registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${valid_registration_id}= Generate Random CSR Id Set Suite Variable ${valid_registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} ${updated_payload}= Update Value To JSON ${payload} $.id ${valid_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_03.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_03.robot index 9505f6fa1..bd0b65258 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_03.robot @@ -1,22 +1,22 @@ *** Settings *** Documentation Check that one cannot update a context source registration by id if the id is not known to the system +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: -${filename}= context-source-registration.jsonld -${reason_404}= Not Found +${filename}= context-source-registration.jsonld +${reason_404}= Not Found *** Test Cases *** 034_03_01 Update a context source registration by id if the id is not known to the system [Documentation] Check that one cannot update a context source registration by id if the id is not known to the system [Tags] csr-update 5_9_3 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${fragment}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} ${fragment_with_id}= Update Value To JSON ${fragment} $.id ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_04.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_04.robot index 7f71d98dd..482aacd55 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_04.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update a context source registration under some conditions +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Test Teardown Delete Initial Context Source Registration *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${filename}= context-source-registration.jsonld ${registration_payload_file_path}= context-source-registration-invalid-json.json @@ -29,9 +29,9 @@ ${registration_payload_file_path}= context-source-registration-invalid-json *** Keywords *** Create Initial Context Source Registration - ${valid_registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${valid_registration_id}= Generate Random CSR Id Set Test Variable ${valid_registration_id} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Test Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} ${updated_payload}= Update Value To JSON ${payload} $.id ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_05.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_05.robot index 58a12db0b..2d4b4e7f4 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can update a context source registration by id -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,10 +12,6 @@ Test Teardown Delete Updated Context Source Registration Test Template Update A Context Source -*** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: - - *** Test Cases *** FILENAME UPDATE_FILENAME 034_05_01 Update a context source registration to never expire [Tags] csr-update 5_9_3 @@ -43,7 +40,7 @@ Delete Updated Context Source Registration Delete Context Source Registration ${registration_id} Initialize the Test Case - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Test Variable ${registration_id} ${payload}= Load JSON From File ... ${EXECDIR}/data/csourceRegistrations/context-source-registration.jsonld diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_06.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_06.robot index e1383a393..050817ac8 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_06.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_06.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update a context source registration if the Id is not present +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Update A Context Source *** Variables *** -${registration_id_prefix}= urn:ngsi-ld:Registration: ${filename}= context-source-registration.jsonld ${registration_payload_file_path}= context-source-registration-invalid.jsonld ${reason_405}= Method Not Allowed @@ -38,7 +38,7 @@ Update A Context Source Check Response Does Not Contain Body ${response} Create Initial Context Source Registration - ${valid_registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${valid_registration_id}= Generate Random CSR Id Set Suite Variable ${valid_registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} ${updated_payload}= Update Value To JSON ${payload} $.id ${valid_registration_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_01.robot index 60ec46593..8049e275a 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_01.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that if the created context source registration subscription defines a timeInterval member, a cSourceNotification will be sent periodically, initially on subscription and when the time interval is reached -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Suite Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription-timeInterval.jsonld @@ -22,7 +21,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub 047_01_01 Receive cSourceNotification Periodically And Initially On Subscription [Documentation] Check that if the created context source registration subscription defines a timeInterval member, a cSourceNotification will be sent periodically, initially on subscription and when the time interval is reached [Tags] csrsub-notification 5_11_7 - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} @@ -35,7 +34,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub *** Keywords *** Setup Initial Context Source Registration Start Local Server - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_02.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_02.robot index 6b92474ac..8b7866e0e 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_02.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_02.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that if the created context source registration subscription does not define a timeInterval member, a cSourceNotification, with the appropriate trigger reason in the "triggerReason" member, will be sent initially on subscription and whenever there is a change of a matching Context Source Registration -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Context Sourc *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${update_fragment_file_path}= csourceRegistrations/fragments/context-source-registration-update.json @@ -35,8 +34,8 @@ ${update_fragment_file_path}= csourceRegistrations/fra Create Initial Context Source Registration and Context Source Registration Subscription Start Local Server - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${context_source_registration_id} Set Suite Variable ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_03.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_03.robot index 748b0d27c..aba0140ad 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_03.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_03.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that instead of providing the original context source registration, implementations should return context source registration information relevant for the subscription, in particular only matching RegistrationInfo elements -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-building-and-bus-entities.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -22,7 +21,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub 047_03_01 Receive cSourceNotification With Relevant Information [Documentation] Check that instead of providing the original context source registration, implementations should return context source registration information relevant for the subscription, in particular only matching RegistrationInfo elements [Tags] csrsub-notification 5_11_7 - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -40,7 +39,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub *** Keywords *** Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_04.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_04.robot index 4de52e9ca..596b6123e 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_04.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_04.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation The structure of the csource notification message shall be as mandated by clause 5.3.2 -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -22,7 +21,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub 047_04_01 Receive cSourceNotification With Compliant Structure [Documentation] The structure of the csource notification message shall be as mandated by clause 5.3.2 [Tags] csrsub-notification 5_11_7 - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -38,7 +37,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub *** Keywords *** Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_05.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_05.robot index 1c2af17a6..59dedb857 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_05.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_05.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that if a cSourceNotification is sent successfully to the "endpoint" member, the "notification.timesSent" member shall be incremented by one and the "notification.lastSuccess" and "notification.lastNotification" members shall be updated with the current timestamp and the status of the context source registration subscription shall be updated to "ok" -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${notification_expectation_file_path}= notifications/expectations/1-timesSent-ok.json @@ -23,7 +22,7 @@ ${notification_expectation_file_path}= notifications/expectatio 047_05_01 If A cSourceNotification Is Successfully Sent The Notification Member Shall Be Updated [Documentation] Check that if a cSourceNotification is sent successfully to the "endpoint" member, the "notification.timesSent" member shall be incremented by one and the "notification.lastSuccess" and "notification.lastNotification" members shall be updated with the current timestamp and the status of the context source registration subscription shall be updated to "ok" [Tags] csrsub-notification 5_11_7 - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -42,7 +41,7 @@ ${notification_expectation_file_path}= notifications/expectatio *** Keywords *** Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_06.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_06.robot index 48d4fcc0c..6cca67d9b 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_06.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_06.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that if a cSourceNotification is not sent successfully, the "notification.timesSent" member shall be incremented by one and the notification.lastFailure" and "notification.lastNotification" members shall be updated with the current timestamp and the status of the context source registration subscription shall be updated to "failed" -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription-unreachable-endpoint.jsonld ${notification_expectation_file_path}= notifications/expectations/1-timesSent-failed.json @@ -23,7 +22,7 @@ ${notification_expectation_file_path}= notifications/expectatio 047_06_01 If A cSourceNotification Is Not Successfully Sent The Notification Member Shall Be Updated [Documentation] Check that if a cSourceNotification is not sent successfully, the "notification.timesSent" member shall be incremented by one and the notification.lastFailure" and "notification.lastNotification" members shall be updated with the current timestamp and the status of the context source registration subscription shall be updated to "failed" [Tags] csrsub-notification 5_11_7 - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -42,7 +41,7 @@ ${notification_expectation_file_path}= notifications/expectatio *** Keywords *** Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${create_response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 201 ${create_response.status_code} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_07.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_07.robot index 5491a36ba..5a6ac9484 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_07.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that a cSourceNotification shall only be sent if and only if the status of the corresponding subscription is active, neither paused or expired -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -13,8 +14,6 @@ Test Template Do Not Receive cSourceNotification If Subscription Status Is *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -37,7 +36,7 @@ Do Not Receive cSourceNotification If Subscription Status Is Not Active ... ${subscription_id} ... ${subscription_update_fragment} - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -47,7 +46,7 @@ Do Not Receive cSourceNotification If Subscription Status Is Not Active Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_08.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_08.robot index 5beccbae5..339e067d6 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_08.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_08.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check if a context source registration subscription does not define a temporalQ member, a CsourceNotification will be triggered from matching context source registrations for context sources providing latest information -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Context Sourc *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${update_fragment_file_path}= csourceRegistrations/fragments/context-source-registration-update.json @@ -35,8 +34,8 @@ ${update_fragment_file_path}= csourceRegistrations/fra *** Keywords *** Create Initial Context Source Registration and Context Source Registration Subscription Start Local Server - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id + ${subscription_id}= Generate Random Subscription Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_09.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_09.robot index ef6575b16..40edd77fa 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_09.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_09.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check if a context source registration subscription defines an "entities" member, a CsourceNotification will be triggered from context source registrations with information member matching the described "entities" -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Suite Teardown Delete Created Context Source Registration And Context Sourc *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${update_fragment_file_path}= csourceRegistrations/fragments/context-source-registration-update-information.json @@ -35,8 +34,8 @@ ${update_fragment_file_path}= csourceRegistrations/fra *** Keywords *** Create Initial Context Source Registration And Context Source Registration Subscription Start Local Server - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id + ${subscription_id}= Generate Random Subscription Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_10.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_10.robot index bb549e928..4d14cd60a 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_10.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_10.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check if a context source registration subscription defines temporalQ member with timeproperty observedAt, the temporal query is matched against the observationInterval of matching context source registrations -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-observationInterval.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription-temporalQ-observedAt.jsonld @@ -22,7 +21,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub 047_10_01 Receive cSourceNotification For Matching Context Source Registrations On Observation Interval [Documentation] Check if a context source registration subscription defines temporalQ member with timeproperty observedAt, the temporal query is matched against the observationInterval of matching context source registrations [Tags] csrsub-notification 5_11_7 - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -38,7 +37,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub *** Keywords *** Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_11.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_11.robot index b3d487d3e..f94d450fa 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_11.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_11.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check if a context source registration subscription defines temporalQ member with timeproperty createdAt or modifiedAt, the temporal query is matched against the managementInterval of matching context source registrations -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -14,8 +15,6 @@ Test Template Receive cSourceNotification For Matching Context Source Regi *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-managementInterval.jsonld @@ -30,12 +29,12 @@ ${context_source_registration_payload_file_path}= csourceRegistrations/con Receive cSourceNotification For Matching Context Source Registrations On Management Interval [Documentation] Check if a context source registration subscription defines temporalQ member with timeproperty createdAt or modifiedAt, the temporal query is matched against the managementInterval of matching context source registrations [Arguments] ${filepath} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${subscription_id} ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ${filepath} ${subscription_id} ${response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 201 ${response.status_code} - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id Set Suite Variable ${context_source_registration_id} ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_12.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_12.robot index e09fbf9bb..b957620c1 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_12.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_12.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check if a context source registrations subscription defines entities member and watchedAttributes member, a CsourceNotification will be triggered from context source registrations with information member matching the described "entities" and "attributes" -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-detailed-information.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription-watchedAttributes.jsonld @@ -22,7 +21,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub 047_12_01 Receive cSourceNotification For Matching Context Source Registrations On Watched Attributes [Documentation] Check if a context source registrations subscription defines entities member and watchedAttributes member, a CsourceNotification will be triggered from context source registrations with information member matching the described "entities" and "attributes" [Tags] csrsub-notification 5_11_7 - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -38,7 +37,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub *** Keywords *** Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_13.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_13.robot index 1d8a23253..5645f358b 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_13.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_13.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check if a context source registrations subscription does not define watchedAttributes member, a CsourceNotification will be triggered from context source registrations with information member matching all attributes of the described entities -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-detailed-information.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -22,7 +21,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub 047_13_01 Receive cSourceNotification For Matching Context Source Registrations On Any watchedAttribute [Documentation] Check if a context source registrations subscription does not define watchedAttributes member, a CsourceNotification will be triggered from context source registrations with information member matching all attributes of the described entities [Tags] csrsub-notification 5_11_7 - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -38,7 +37,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub *** Keywords *** Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_14.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_14.robot index 1334f778d..4914bd29b 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_14.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_14.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check if a context source registrations subscription defines a geoQ member, a CsourceNotification will be triggered from matching context source registrations with a matching location member -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-location.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription-geoQ.jsonld @@ -22,7 +21,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub 047_14_01 Receive cSourceNotification For Matching Context Source Registrations On Location [Documentation] Check if a context source registrations subscription defines a geoQ member, a CsourceNotification will be triggered from matching context source registrations with a matching location member [Tags] csrsub-notification 5_11_7 - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -38,7 +37,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub *** Keywords *** Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_15.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_15.robot index b2d6176b0..625b59652 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_15.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_15.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check if a context source registrations subscription does not define a geoproperty in the geoQ member, a CsourceNotification will be triggered from matching context source registrations with a matching location member -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -12,8 +13,6 @@ Test Teardown Delete Created Context Source Registration And Subscription *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-location.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription-geoQ-without-geoproperty.jsonld @@ -22,7 +21,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub 047_15_01 Receive cSourceNotification For Matching Context Source Registrations On Location As Default [Documentation] Check if a context source registrations subscription does not define a geoproperty in the geoQ member, a CsourceNotification will be triggered from matching context source registrations with a matching location member [Tags] csrsub-notification 5_11_7 - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} @@ -38,7 +37,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/sub *** Keywords *** Setup Initial Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_16.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_16.robot index 435363dbb..537b33199 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_16.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_16.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check if one updates a context source registration subscription, a CsourceNotification will be sent with all currently matching context source registrations -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource @@ -13,8 +14,6 @@ Test Template Receive cSourceNotification For Newly Matching Context Sourc *** Variables *** -${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${first_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-vehicle-entities.jsonld ${second_context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-bus-entities.jsonld ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -47,9 +46,9 @@ Receive cSourceNotification For Newly Matching Context Source Registrations Create Initial Context Source Registrations And Context Source Registration Subscription Start Local Server - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${first_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${second_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${subscription_id}= Generate Random Subscription Id + ${first_context_source_registration_id}= Generate Random CSR Id + ${second_context_source_registration_id}= Generate Random CSR Id ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot index d8e75e0b5..58762a262 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can create a minimal context source registration subscription +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registration Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -51,8 +51,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld *** Keywords *** Generate Random Ids For Context Source Registration Subscriptions - # TODO: Refactor Generate Random Entity Id to Generate Random Test Sample Id - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${subscription_id} Delete Created Context Source Registration Subscriptions diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_03.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_03.robot index 9a933e4c1..9019a2cd1 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_03.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can create a context source registration subscription without providing isActive member and will be active by default +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registration Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -32,7 +32,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld *** Keywords *** Generate Random Ids For Context Source Registration Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${subscription_id} Delete Created Context Source Registration Subscriptions diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_04.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_04.robot index 7f72e6864..0a2691235 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_04.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can create a context source registration subscription with isActive member set to false and it's initial status will be set to "paused" +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registration Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription-inactive.jsonld @@ -39,7 +39,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-inacti *** Keywords *** Generate Random Ids For Context Source Registration Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${subscription_id} Delete Created Context Source Registration Subscriptions diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot index 5a5107a4f..9a251162a 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can create a context source registration subscription with an expiresAt member and when it is due the status of the subscription changes to "expired" +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registration Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription-expiresAt.jsonld @@ -43,7 +43,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-expire *** Keywords *** Generate Random Ids For Context Source Registration Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${subscription_id} Delete Created Context Source Registration Subscriptions diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_06.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_06.robot index 43232eadc..1ce57412a 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_06.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_06.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can create a context source registration subscription without an expiresAt member and it will be considered as perpetual +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Suite Teardown Delete Created Context Source Registration Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -34,7 +34,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld *** Keywords *** Generate Random Ids For Context Source Registration Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${subscription_id} Delete Created Context Source Registration Subscriptions diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot index 6f23bf1b1..e13bae568 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot create a context source registration subscription where another context source registration subscription whose id is equivalent exists +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Test Teardown Delete Initial Context Source Registration Subscription *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -28,7 +28,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld *** Keywords *** Setup Initial Context Source Registration Subscription - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 201 ${create_csrsub_response.status_code} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_08.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_08.robot index 32b69a6d6..07819a08c 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_08.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_08.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot create a context source registration subscription If the data types, cardinalities and restrictions expressed by clause 5.2.12 are not met +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -9,7 +10,6 @@ Test Template Create Invalid Context Source Registration Subscription *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= ${EMPTY} @@ -32,7 +32,7 @@ ${subscription_payload_file_path}= ${EMPTY} Create Invalid Context Source Registration Subscription [Documentation] Check that one cannot create a context source registration subscription If the data types, cardinalities and restrictions expressed by clause 5.2.12 are not met [Arguments] ${filepath} - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${filepath} ${subscription_id} ${response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 400 ${response.status_code} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_09.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_09.robot index dfc61917d..11cbd3d5b 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_09.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_09.robot @@ -1,13 +1,13 @@ *** Settings *** Documentation Check that one cannot create a context source registration subscription with an expiration timestamp representing a moment before the current date and time +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription-expired.jsonld @@ -15,7 +15,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-expire 038_09_01 Create Expired Context Source Registration Subscription [Documentation] Check that one cannot create a context source registration subscription with an expiration timestamp representing a moment before the current date and time [Tags] csrsub-create 5_11_2 - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 400 ${response.status_code} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot index 9211f0977..22580179f 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can delete a context source registration subscription +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -9,7 +10,6 @@ Test Setup Setup Initial Context Source Registration Subscription *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -27,7 +27,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld *** Keywords *** Setup Initial Context Source Registration Subscription - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 201 ${create_csrsub_response.status_code} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot index da7ef3929..ec42d77d7 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registration subscriptions +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Test Teardown Delete Created Context Source Registration Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${first_subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${second_subscription_payload_file_path}= csourceSubscriptions/subscription-watchedAttributes.jsonld ${expectation_file_path}= csourceSubscriptions/expectations/subscriptions-035-01.json @@ -31,8 +31,8 @@ ${expectation_file_path}= csourceSubscriptions/expectation *** Keywords *** Setup Initial Context Source Registration Subscriptions - ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${second_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${first_subscription_id}= Generate Random Subscription Id + ${second_subscription_id}= Generate Random Subscription Id ${first_subscription_payload}= Load Test Sample ... ${first_subscription_payload_file_path} ... ${first_subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot index 2a0c803e4..7b6f2b6a7 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registration subscriptions with a limit parameter and it will be the maximum number of subscriptions to be retrieved +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Query Context Source Registration Subscriptions With Limit P *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${first_subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${second_subscription_payload_file_path}= csourceSubscriptions/subscription-watchedAttributes.jsonld ${third_subscription_payload_file_path}= csourceSubscriptions/subscription-geoQ.jsonld @@ -44,9 +44,9 @@ Query Context Source Registration Subscriptions With Limit Parameter ... ${response.json()} Setup Initial Context Source Registration Subscriptions - ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${second_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${third_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${first_subscription_id}= Generate Random Subscription Id + ${second_subscription_id}= Generate Random Subscription Id + ${third_subscription_id}= Generate Random Subscription Id ${first_subscription_payload}= Load Test Sample ... ${first_subscription_payload_file_path} ... ${first_subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot index a239006b1..b2bfbdcd5 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can query context source registration subscriptions with providing page and limit parameters for pagination +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Query Context Source Registration Subscriptions With Limit A *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${first_subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${second_subscription_payload_file_path}= csourceSubscriptions/subscription-watchedAttributes.jsonld ${third_subscription_payload_file_path}= csourceSubscriptions/subscription-geoQ.jsonld @@ -45,9 +45,9 @@ Query Context Source Registration Subscriptions With Limit And Page Parameters Check Pagination Prev And Next Headers ${prev_link} ${next_link} ${response.headers} Setup Initial Context Source Registration Subscriptions - ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${second_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${third_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${first_subscription_id}= Generate Random Subscription Id + ${second_subscription_id}= Generate Random Subscription Id + ${third_subscription_id}= Generate Random Subscription Id ${first_subscription_payload}= Load Test Sample ... ${first_subscription_payload_file_path} ... ${first_subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot index 060950e4f..fff70391c 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot @@ -11,7 +11,6 @@ Test Teardown Delete Created Context Source Registration Subscription *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${expectation_file_path}= csourceSubscriptions/expectations/subscriptions-040-01.json @@ -58,7 +57,7 @@ ${expectation_file_path}= csourceSubscriptions/expectations/subscr *** Keywords *** Setup Initial Context Source Registration Subscription - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 201 ${create_csrsub_response.status_code} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot index 7f4e6e219..21c60e734 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can update a context source registration subscription +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Test Teardown Delete Initial Context Source Registration Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${subscription_update_fragment_file_path}= csourceSubscriptions/fragments/subscription-update.json @@ -39,7 +39,7 @@ ${subscription_update_fragment_file_path}= csourceSubscriptions/fragments/s *** Keywords *** Setup Initial Context Source Registration Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 201 ${create_csrsub_response.status_code} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot index f3fdf28aa..60bd8fe49 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update a context source registration subscription with a fragment that does not meet the data types and restrictions expressed by clause 5.2.12 +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -11,7 +12,6 @@ Test Template Update Context Source Registration Subscription With Invalid *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld @@ -38,7 +38,7 @@ Update Context Source Registration Subscription With Invalid Fragment ... problem_type=${ERROR_TYPE_BAD_REQUEST_DATA} Setup Initial Context Source Registration Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} Check Response Status Code 201 ${create_csrsub_response.status_code} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot index 10f0799bb..190741272 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one cannot update a context source registration subscription with an invalid request body (invalid JSON document) +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +11,6 @@ Test Teardown Delete Initial Context Source Registration Subscriptions *** Variables *** -${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_payload_file_path}= csourceSubscriptions/subscription.jsonld ${subscription_update_fragment_file_path}= csourceSubscriptions/fragments/subscription-update-invalid-json.json @@ -30,7 +30,7 @@ ${subscription_update_fragment_file_path}= csourceSubscriptions/fragments/s *** Keywords *** Setup Initial Context Source Registration Subscriptions - ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${subscription_id}= Generate Random Subscription Id ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} Create Context Source Registration Subscription ${subscription_payload} Set Suite Variable ${subscription_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_01_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_01_inc.robot index c3ac9e555..9a0b6e1eb 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_01_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_01_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker and an entity only on a Context Source, if one queries the Context Broker the query gets forwarded to the Context Source correctly -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entity And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -31,12 +30,12 @@ D011_01_01_inc Query The Context Broker With Type *** Keywords *** Setup Entity On Remote And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_02_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_02_inc.robot index 89c5c9d26..61e6adebf 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_02_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_02_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker and an entity only on a Context Source, if one queries the Context Broker the query gets forwarded to the Context Source correctly -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entity And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -30,12 +29,12 @@ D011_01_02_inc Query The Context Broker With Type And Missing Attribute *** Keywords *** Setup Entity On Remote And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_03_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_03_inc.robot index b41290936..66fecce4e 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_03_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_03_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker, one entity on it and another on a Context Source, if one queries the Context Broker the query gets forwarded to the Context Source correctly -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,10 +14,8 @@ Test Teardown Delete Created Entities And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld ${entity_payload_filename2} vehicle-simple-attributes-second.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -32,17 +31,17 @@ D011_01_03_inc Query The Context Broker With Type and Attribute *** Keywords *** Create Entities With Different Payloads And Registration - ${first_entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${first_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${first_entity_id} ${response}= Create Entity ${entity_payload_filename} ${first_entity_id} Check Response Status Code 201 ${response.status_code} - ${second_entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${second_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${second_entity_id} ${response1}= Create Entity ${entity_payload_filename2} ${second_entity_id} base_url=${remote_url} Check Response Status Code 201 ${response1.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_04_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_04_inc.robot index 4a9fd8cac..005cd4881 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_04_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_04_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker, one entity on it and another on a Context Source, if one queries the Context Broker the query gets forwarded to the Context Source correctly -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,10 +14,8 @@ Test Teardown Delete Created Entities And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld ${entity_payload_filename2} vehicle-simple-attributes-second.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -31,17 +30,17 @@ D011_01_04_inc Query The Context Broker With Type and Attribute In Neither *** Keywords *** Create Entities With Different Payloads And Registration - ${first_entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${first_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${first_entity_id} ${response}= Create Entity ${entity_payload_filename} ${first_entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${second_entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${second_entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${second_entity_id} ${response1}= Create Entity ${entity_payload_filename2} ${second_entity_id} Check Response Status Code 201 ${response1.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_05_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_05_inc.robot index ce4f5539f..857d349dd 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_05_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_01_05_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker, entities with same id on the Context Broker and on a Context Source, if one queries the Context Broker the query gets forwarded to the Context Source correctly -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,10 +14,8 @@ Test Teardown Delete Created Entities And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld ${entity_payload_filename2} vehicle-simple-different-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -38,7 +37,7 @@ D011_01_05_inc Query The Context Broker With Type *** Keywords *** Create Entities With Different Payloads And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} @@ -46,7 +45,7 @@ Create Entities With Different Payloads And Registration ${response}= Create Entity ${entity_payload_filename2} ${entity_id} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_02_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_02_inc.robot index 1bf3a5c2a..16e71d605 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_02_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/QueryEntities/D011_02_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker and an entity only on a Context Source, if one queries the Context Broker with local flag entity not found error is raised -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entity And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -30,12 +29,12 @@ D011_02_inc Query The Context Broker With Local Flag *** Keywords *** Setup Entity On Remote And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_inc.robot index 4905c505b..3e33837ee 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_01_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker and an entity only on a Context Source, if one retrieves entity from the Context Broker the request gets forwarded to the Context Source correctly -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entity And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -30,12 +29,12 @@ D010_01_inc Retrieve entity on a Context Source from the Context Broker *** Keywords *** Setup Entity On Remote And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_inc.robot b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_inc.robot index 6f0a6add6..240c05c55 100644 --- a/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Consumption/Entity/RetrieveEntity/D010_02_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker and an entity only on a Context Source, if one retrieves entity from the Context Broker with local flag entity not found error is raised -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entity And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-complete.jsonld @@ -29,12 +28,12 @@ D010_02_inc Retrieve entity on a Context Source from the Context Broker with loc *** Keywords *** Setup Entity On Remote And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_01_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_01_inc.robot index c6af44fac..9c242aaf4 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_01_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_01_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker, one is able to create entities on both Context Broker and Context Source -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entities And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -36,10 +35,10 @@ D001_01_inc Create Entity On Both Context Broker and Context Source *** Keywords *** Setup Entity Id And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_02_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_02_inc.robot index 6e34b123d..aa6822582 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_02_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_02_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Check that if one requests the Context Broker to create an entity that matches an inclusive registration but is malformed, this is created neither on the Context Broker nor on the Context Source -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -14,9 +15,7 @@ Test Teardown Delete Created Registration *** Variables *** ${entity_id} InvalidUriExample -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${context_source_registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -37,7 +36,7 @@ D001_02_inc Request to create an entity with a malformed id on both Context Brok *** Keywords *** Setup Initial Context Source Registration - ${context_source_registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${context_source_registration_id}= Generate Random CSR Id Set Suite Variable ${context_source_registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${context_source_registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_01_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_01_inc.robot index b6278f521..3a46a3e7a 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_01_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_01_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an entity and an inclusive registration on a Context Broker, one is able to create that entity on a Context Source from the Context Broker but gets an error for the Context Broker -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entities And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -35,12 +34,12 @@ D001_03_01_inc Create entity already existing locally on a Context Source *** Keywords *** Setup Entity On Local And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_02_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_02_inc.robot index d403306c1..8df22d6fa 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_02_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_02_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an entity on a Context Broker and on a Context Source and an inclusive registration on the Context Broker, one is not able to create that entity on the Context Source from the Context Broker -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entities And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -33,14 +32,14 @@ D001_03_02_inc Create entity already existing on both Context Broker and Context *** Keywords *** Setup Entities And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} Check Response Status Code 201 ${response.status_code} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_03_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_03_inc.robot index 3fcc270e3..44f6b4d6f 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_03_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/CreateEntity/D001_03_03_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an entity on a Context Source and an inclusive registration on a Context Broker, one is not able to create that entity on the Context Source from the Context Broker but one is able to create it on the Context Broker -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entities And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -35,12 +34,12 @@ D001_03_03_inc Create entity already existing remotely on the Context Broker *** Keywords *** Setup Entity On Remote And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_01_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_01_inc.robot index 164315717..afe32c149 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_01_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_01_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker, one is able to delete entities on both Context Broker and Context Source -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entities And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -32,14 +31,14 @@ D002_01_inc Delete Entities On Both Context Broker and Context Source *** Keywords *** Setup Entities And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} Check Response Status Code 201 ${response.status_code} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_01_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_01_inc.robot index 9b25cf1ab..788314e82 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_01_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_01_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker, one is able to delete entities locally and should get a BatchOperationResult structure -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entity And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -30,12 +29,12 @@ D002_02_01_inc Delete Entity On The Context Broker *** Keywords *** Setup Entity On Local And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_02_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_02_inc.robot index aa00071a8..4bb886596 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_02_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/Entities/DeleteEntity/D002_02_02_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker, one is able to delete entities on a Context Source and should get a BatchOperationResult structure -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entity And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld @@ -30,12 +29,12 @@ D002_02_02_inc Delete Entity On a Context Source *** Keywords *** Setup Entity On Remote And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/UpdateEntityAttributes/D004_01_inc.robot b/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/UpdateEntityAttributes/D004_01_inc.robot index 22997bd03..f92d7d7c5 100644 --- a/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/UpdateEntityAttributes/D004_01_inc.robot +++ b/TP/NGSI-LD/DistributedOperations/Provision/EntityAttributes/UpdateEntityAttributes/D004_01_inc.robot @@ -1,10 +1,11 @@ *** Settings *** Documentation Verify that, when one has an inclusive registration on a Context Broker with redirectionOps, one is able to update entities on a Context Source -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -13,9 +14,7 @@ Test Teardown Delete Created Entity And Registration *** Variables *** -${entity_id_prefix} urn:ngsi-ld:Vehicle: ${entity_payload_filename} vehicle-simple-attributes.jsonld -${registration_id_prefix} urn:ngsi-ld:Registration: ${registration_payload_file_path} csourceRegistrations/context-source-registration-vehicle-redirection-ops.jsonld ${fragment_filename} vehicle-brandname-fragment.jsonld @@ -39,12 +38,12 @@ D004_01_inc Query The Context Broker With Type *** Keywords *** Setup Entity On Remote And Registration - ${entity_id}= Generate Random Entity Id ${entity_id_prefix} + ${entity_id}= Generate Random Vehicle Entity Id Set Suite Variable ${entity_id} ${response}= Create Entity ${entity_payload_filename} ${entity_id} base_url=${remote_url} Check Response Status Code 201 ${response.status_code} - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${registration_id}= Generate Random CSR Id Set Suite Variable ${registration_id} ${registration_payload}= Prepare Context Source Registration From File ... ${registration_id} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot index 0c4e0db5c..6a8658992 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot @@ -1,9 +1,9 @@ *** Settings *** Documentation Check that one can list all the @context available in the broker with no previous add @context +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Test Setup Create initial ImplicitlyCreated @context Test Teardown Delete Initial @context Data diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_07.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_07.robot index 61993134c..da5ca903a 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_07.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_07.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that one can list all the cached @context entries -Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource @@ -12,12 +13,11 @@ Test Template List @contexts with several previous created @context *** Variables *** -${entity_filename}= building-simple-attributes.json -${contextUri}= https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite.jsonld -${reason_200}= OK -${reason_204}= No Content -${building_id_prefix}= urn:ngsi-ld:Building: -${content_type}= application/json +${entity_filename}= building-simple-attributes.json +${contextUri}= https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite.jsonld +${reason_200}= OK +${reason_204}= No Content +${content_type}= application/json *** Test Cases *** DETAILS KIND @@ -31,7 +31,7 @@ ${content_type}= application/json *** Keywords *** Create Initial Cached @context from entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${entity_filename} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot index ff52723b7..3df4ab434 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot @@ -1,9 +1,9 @@ *** Settings *** Documentation Check that one can get an increase numberOfHits after creation of a Hosted @context and using it +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create Initial @context condition from an external server diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot index 45bf249cd..1105951ee 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot @@ -1,12 +1,12 @@ *** Settings *** Documentation Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true -Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/HttpUtils.resource Resource ${EXECDIR}/resources/ContextServerUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource Library Collections Library String Variables ${EXECDIR}/resources/variables.py diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot index d93da4623..1ab214884 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot @@ -1,12 +1,13 @@ *** Settings *** Documentation Check that the numberOfHits is increased after using a Cached context -Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/HttpUtils.resource Resource ${EXECDIR}/resources/ContextServerUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource Library Collections Library String Variables ${EXECDIR}/resources/variables.py @@ -30,7 +31,7 @@ ${testing_id_prefix}= urn:ngsi-ld:Testing: [Documentation] Check that the numberOfHits is increased after using a Cached context [Tags] ctx-serve 5_13_4 since_v1.5.1 - ${second_existing_entity_id}= Generate Random Entity Id ${testing_id_prefix} + ${second_existing_entity_id}= Generate Random Id ${testing_id_prefix} Set Global Variable ${first_existing_entity_id} Create Entity selecting @context ${entityfile} ${uri} ${second_existing_entity_id} @@ -47,7 +48,7 @@ ${testing_id_prefix}= urn:ngsi-ld:Testing: Create Initial @context condition from an external server Start @context Local Server - ${first_existing_entity_id}= Generate Random Entity Id ${testing_id_prefix} + ${first_existing_entity_id}= Generate Random Id ${testing_id_prefix} Set Global Variable ${first_existing_entity_id} # ${uri}= Catenate http://${context_server_host}:${context_server_port}${uri} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot index 07555bc58..db51b16f0 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot @@ -1,8 +1,9 @@ *** Settings *** Documentation Check that the numberOfHits is increased after using a ImplicitlyCreated context -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -22,7 +23,7 @@ ${entityfile}= minimal-entity-using-@context.jsonld [Documentation] Check that the numberOfHits is increased after using a ImplicitlyCreated context [Tags] ctx-serve 5_13_4 since_v1.5.1 - ${entity_id}= Generate Random Entity Id ${testing_id_prefix} + ${entity_id}= Generate Random Id ${testing_id_prefix} Set Global Variable ${entity_id} Create Entity selecting @context ${entityfile} ${implicit_id_full} ${entity_id} diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot index b6f2132c8..8de4524a3 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot @@ -1,22 +1,22 @@ *** Settings *** Documentation Check that one can add a hosted @context with list of URIs and each of them are cached @coxtexts -Variables ${EXECDIR}/resources/variables.py -Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource +Variables ${EXECDIR}/resources/variables.py Test Teardown Delete Initial @context *** Variables *** -${filename_list}= @context-cached-valid.json -${entity_filename}= building-simple-attributes.json -${reason_201}= Created -${reason_204}= No Content -${building_id_prefix}= urn:ngsi-ld:Building: -${content_type}= application/json +${filename_list}= @context-cached-valid.json +${entity_filename}= building-simple-attributes.json +${reason_201}= Created +${reason_204}= No Content +${content_type}= application/json *** Test Cases *** @@ -39,7 +39,7 @@ ${content_type}= application/json # Need to check that the kind value of the created context is "hosted" ${response_serve}= Serve a @context ${uri} true Check Response Kind set to ${response_serve.json()} Hosted - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id Create Entity Selecting Content Type ... ${entity_filename} ... ${entity_id} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot index 1e7ab985e..5de3ac093 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot @@ -1,22 +1,22 @@ *** Settings *** Documentation Check that one can delete a previous created cached @context without reload param -Variables ${EXECDIR}/resources/variables.py -Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource +Variables ${EXECDIR}/resources/variables.py Test Setup Create Initial cached @context Test Teardown Delete Initial @context *** Variables *** -${filename}= @context-cached-one-valid.json -${entity_filename}= building-simple-attributes.json -${building_id_prefix}= urn:ngsi-ld:Building: -${content_type}= application/json -${reason_204}= No Content +${filename}= @context-cached-one-valid.json +${entity_filename}= building-simple-attributes.json +${content_type}= application/json +${reason_204}= No Content *** Test Cases *** @@ -40,7 +40,7 @@ Create Initial cached @context ${response}= Add a new @context ${filename} Check Response Status Code 201 ${response.status_code} ${uri}= Fetch Id From Response Location Header ${response.headers} - ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${entity_id}= Generate Random Building Entity Id ${response}= Create Entity Selecting Content Type ... ${entity_filename} ... ${entity_id} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot index c63d2aff0..9cc8910b4 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot @@ -1,12 +1,12 @@ *** Settings *** Documentation Check that one gets an error if one created an entity with a context (Cached context) and one tries to delete it with reload=true -Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource -Resource ${EXECDIR}/resources/HttpUtils.resource Resource ${EXECDIR}/resources/ContextServerUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource Library Collections Library String Variables ${EXECDIR}/resources/variables.py diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot index 9545f14ae..f9df65d8b 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot @@ -1,9 +1,9 @@ *** Settings *** Documentation Delete a @context whose kind is ImplicitlyCreated without reload param +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/HttpUtils.resource Test Setup Create initial ImplicitlyCreated @context diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot index bef55e677..d5e72752a 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_07.robot @@ -1,9 +1,9 @@ *** Settings *** Documentation Check that one cannot delete a ImplicitlyCreated @context with reload set to true +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Test Setup Create initial ImplicitlyCreated @context Test Teardown Delete Initial @context Data diff --git a/resources/ApiUtils/Common.resource b/resources/ApiUtils/Common.resource index 0626613ef..2ce37ff88 100644 --- a/resources/ApiUtils/Common.resource +++ b/resources/ApiUtils/Common.resource @@ -1,11 +1,53 @@ +*** Settings *** +Library String + + *** Variables *** -${BUILDING_ID_PREFIX} urn:ngsi-ld:Building: -${BUS_ID_PREFIX} urn:ngsi-ld:Bus: -${CITY_ID_PREFIX} urn:ngsi-ld:City: -${VEHICLE_ID_PREFIX} urn:ngsi-ld:Vehicle: +${BUILDING_ID_PREFIX} urn:ngsi-ld:Building: +${BUS_ID_PREFIX} urn:ngsi-ld:Bus: +${CITY_ID_PREFIX} urn:ngsi-ld:City: +${PARKING_ID_PREFIX} urn:ngsi-ld:OffStreetParking: +${VEHICLE_ID_PREFIX} urn:ngsi-ld:Vehicle: + +${SUBSCRIPTION_ID_PREFIX}= urn:ngsi-ld:Subscription: + +${CSR_ID_PREFIX}= urn:ngsi-ld:ContextSourceRegistration: *** Keywords *** Build Context Link [Arguments] ${context} RETURN <${context}>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json" + +Generate Random Id + [Arguments] ${id_prefix} + + ${random_id}= Generate Random String 16 [NUMBERS] + ${entity_id}= Catenate ${id_prefix}${random_id} + RETURN ${entity_id} + +Generate Random Building Entity Id + ${entity_id}= Generate Random Id ${BUILDING_ID_PREFIX} + RETURN ${entity_id} + +Generate Bus Entity Id + [Arguments] ${id_suffix} + + ${entity_id}= Catenate ${BUS_ID_PREFIX}${id_suffix} + RETURN ${entity_id} + +Generate Random Parking Entity Id + ${entity_id}= Generate Random Id ${VEHICLE_ID_PREFIX} + RETURN ${entity_id} + +Generate Random Vehicle Entity Id + ${entity_id}= Generate Random Id ${PARKING_ID_PREFIX} + RETURN ${entity_id} + +Generate Random Subscription Id + ${entity_id}= Generate Random Id ${SUBSCRIPTION_ID_PREFIX} + RETURN ${entity_id} + +Generate Random CSR Id + ${entity_id}= Generate Random Id ${CSR_ID_PREFIX} + RETURN ${entity_id} diff --git a/resources/JsonUtils.resource b/resources/JsonUtils.resource index 10f4d2759..3f3f332e6 100644 --- a/resources/JsonUtils.resource +++ b/resources/JsonUtils.resource @@ -15,19 +15,17 @@ ${context_source_url}= http://${context_source_host}:${context_source_p Load Entity [Arguments] ${entity_file_name} ${entity_id} - ${entity_payload}= Load JSON From File ${EXECDIR}/data/entities/${entity_file_name} - ${entity}= Update Value To JSON ${entity_payload} $.id ${entity_id} + ${entity}= Load Test Sample entities/${entity_file_name} ${entity_id} RETURN ${entity} Load Test Sample [Arguments] ${test_sample_file_path} ${test_sample_id}=${EMPTY} - ${test_sample_payload}= Load JSON From File ${EXECDIR}/data/${test_sample_file_path} - ${test_sample}= Update Value To JSON ${test_sample_payload} $.id ${test_sample_id} - - IF '${test_sample_id}'=='' - Delete Object From JSON ${test_sample} $.id + ${test_sample}= Load JSON From File ${EXECDIR}/data/${test_sample_file_path} + IF '${test_sample_id}'!='' + ${test_sample}= Update Value To JSON ${test_sample} $.id ${test_sample_id} END + RETURN ${test_sample} Load Subscription Sample With Reachable Endpoint @@ -46,7 +44,7 @@ Load Subscription Sample With Reachable Endpoint Set Entity Id In Subscription [Arguments] ${subscription_payload} ${entity_id} ${dict}= Create Dictionary id=${entity_id} - ${subscription}= Add Object To JSON ${subscription_payload} $..entities[0] ${dict} + ${subscription}= Add Object To JSON ${subscription_payload} $.entities[0] ${dict} RETURN ${subscription} Load Context Source Registration Sample With Reachable Context Source @@ -60,23 +58,10 @@ Load Context Source Registration Sample With Reachable Context Source ... ${context_source_registration_id} ${context_source_registration}= Update Value To JSON ... ${context_source_registration_payload} - ... $..endpoint + ... $.endpoint ... ${context_source_endpoint_uri} RETURN ${context_source_registration} -Remove Entity Type - [Arguments] ${entity} - - ${invalid_entity}= Delete Object From JSON ${entity} $..type - RETURN ${invalid_entity} - -Generate Random Entity Id - [Arguments] ${id_prefix} - - ${random_id}= Generate Random String 16 [NUMBERS] - ${entity_id}= Catenate ${id_prefix}${random_id} - RETURN ${entity_id} - Create Batch Operation Result [Arguments] ${success} ${errors} diff --git a/resources/SubscriptionUtils.resource b/resources/SubscriptionUtils.resource index 84bba3cf9..d38d55a19 100644 --- a/resources/SubscriptionUtils.resource +++ b/resources/SubscriptionUtils.resource @@ -12,7 +12,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Create Subscription And Entity [Arguments] ${subscription_payload_file_path} ${building_filename} - ${entity_id}= Generate Random Entity Id ${BUILDING_ID_PREFIX} + ${entity_id}= Generate Random Building Entity Id Set Suite Variable ${entity_id} ${create_entity_response}= Create Entity Selecting Content Type ... ${building_filename} @@ -20,7 +20,7 @@ Create Subscription And Entity ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_entity_response.status_code} - ${subscription_id}= Generate Random Entity Id ${SUBSCRIPTION_ID_PREFIX} + ${subscription_id}= Generate Random Subscription Id Set Suite Variable ${subscription_id} ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} -- GitLab