From 635d2c5747a07e696ff541804f4e1219f091afba Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Sat, 6 May 2023 09:33:27 +0200 Subject: [PATCH] chore: review all set up and teardown with a common behaviour --- .../RetrieveAvailableAttributes/025_01.robot | 6 +++--- .../RetrieveAvailableEntityTypes/022_01.robot | 8 ++++---- .../026_01.robot | 6 +++--- .../023_01.robot | 8 ++++---- .../Entity/QueryEntities/019_01_01.robot | 8 ++++++-- .../Entity/QueryEntities/019_01_02.robot | 8 ++++++-- .../Entity/QueryEntities/019_01_03.robot | 7 +++++-- .../Entity/QueryEntities/019_01_04.robot | 11 ++++++++++- .../Entity/QueryEntities/019_01_05.robot | 7 +++++-- .../Entity/QueryEntities/019_02_01.robot | 13 +++++++++++-- .../Entity/QueryEntities/019_02_02.robot | 8 ++++++-- .../Entity/QueryEntities/019_02_03.robot | 7 +++++-- .../Entity/QueryEntities/019_02_04.robot | 7 +++++-- .../Entity/QueryEntities/019_02_05.robot | 7 +++++-- .../Entity/QueryEntities/019_03_01.robot | 7 +++++-- .../Entity/QueryEntities/019_03_02.robot | 7 +++++-- .../Entity/QueryEntities/019_03_03.robot | 7 +++++-- .../Entity/QueryEntities/019_03_04.robot | 7 +++++-- .../Entity/QueryEntities/019_03_05.robot | 7 +++++-- .../Consumption/Entity/QueryEntities/019_04.robot | 8 ++++++-- .../Consumption/Entity/QueryEntities/019_05.robot | 8 ++++++-- .../Consumption/Entity/QueryEntities/019_06.robot | 8 ++++++-- .../Entity/RetrieveEntity/018_01_01.robot | 9 ++++++++- .../Entity/RetrieveEntity/018_01_02.robot | 9 ++++++++- .../Entity/RetrieveEntity/018_01_03.robot | 9 ++++++++- .../Entity/RetrieveEntity/018_03_02.robot | 9 ++++++++- .../Consumption/Entity/RetrieveEntity/018_04.robot | 8 ++++++++ .../Consumption/Entity/RetrieveEntity/018_05.robot | 9 ++++++++- .../Consumption/Entity/RetrieveEntity/018_06.robot | 6 +++--- .../QueryTemporalEvolutionOfEntities/021_01.robot | 10 +++++----- .../QueryTemporalEvolutionOfEntities/021_09.robot | 8 ++++---- .../QueryTemporalEvolutionOfEntities/021_11.robot | 10 +++++----- .../QueryTemporalEvolutionOfEntities/021_13.robot | 8 ++++---- .../RetrieveTemporalEvolutionOfEntity/020_04.robot | 6 +++--- .../RetrieveTemporalEvolutionOfEntity/020_05.robot | 6 +++--- .../RetrieveTemporalEvolutionOfEntity/020_09.robot | 6 +++--- .../CreateBatchOfEntities/003_01.robot | 6 +++++- .../CreateBatchOfEntities/003_02.robot | 9 +++++++-- .../CreateBatchOfEntities/003_04.robot | 7 +++++++ .../CreateBatchOfEntities/003_05.robot | 7 +++++++ .../CreateBatchOfEntities/003_07.robot | 7 +++++++ .../UpdateBatchOfEntities/005_01.robot | 6 +++--- .../UpdateBatchOfEntities/005_02.robot | 6 +++--- .../UpdateBatchOfEntities/005_03.robot | 6 +++++- .../UpsertBatchOfEntities/004_01.robot | 5 +++++ .../UpsertBatchOfEntities/004_02.robot | 11 ++++++----- .../UpsertBatchOfEntities/004_03.robot | 6 +++--- .../UpsertBatchOfEntities/004_04.robot | 9 +++++---- .../Provision/Entities/CreateEntity/001_01.robot | 6 +++++- .../Provision/Entities/CreateEntity/001_03.robot | 9 ++++++++- .../AppendEntityAttributes/010_03.robot | 6 +++++- .../DeleteEntityAttribute/013_01.robot | 6 +++++- .../DeleteEntityAttribute/013_02.robot | 9 ++++++--- .../DeleteEntityAttribute/013_03.robot | 7 +++---- .../PartialAttributeUpdate/012_01.robot | 6 +++++- .../PartialAttributeUpdate/012_02.robot | 9 ++++++--- .../PartialAttributeUpdate/012_03.robot | 11 +++++++---- .../UpdateEntityAttributes/011_01.robot | 6 +++++- .../UpdateEntityAttributes/011_03.robot | 7 +++++-- .../007_01.robot | 6 +++++- .../008_01.robot | 9 ++++++++- .../AppendAttributes/014_01.robot | 9 ++++++++- .../AppendAttributes/014_03.robot | 9 ++++++++- .../DeleteAttribute/015_01.robot | 6 +++++- .../DeleteAttribute/015_02.robot | 6 +++--- .../DeleteAttribute/015_03.robot | 11 +++++++---- .../DeleteAttributeInstance/017_01.robot | 8 +++++++- .../DeleteAttributeInstance/017_02.robot | 8 ++++---- .../DeleteAttributeInstance/017_03.robot | 13 ++++++++----- .../ModifyAttributeInstance/016_01.robot | 8 +++++++- .../ModifyAttributeInstance/016_02.robot | 8 ++++---- .../ModifyAttributeInstance/016_03.robot | 8 ++++---- .../Subscription/CreateSubscription/028_01.robot | 7 ++++++- .../Subscription/CreateSubscription/028_03.robot | 6 +++++- .../Subscription/CreateSubscription/028_04.robot | 7 ++++++- .../Subscription/QuerySubscriptions/031_02.robot | 10 +++++----- .../CreateContextSourceRegistration/033_01_01.robot | 9 ++++++++- .../CreateContextSourceRegistration/033_01_02.robot | 9 ++++++++- .../CreateContextSourceRegistration/033_01_03.robot | 9 ++++++++- .../CreateContextSourceRegistration/033_03.robot | 9 ++++++++- .../CreateContextSourceRegistration/033_04.robot | 9 ++++++++- .../CreateContextSourceRegistration/033_05.robot | 9 ++++++++- .../CreateContextSourceRegistration/033_07.robot | 9 ++++++++- .../DeleteContextSourceRegistration/035_02.robot | 5 +++++ .../QueryContextSourceRegistrations/037_01.robot | 8 ++++---- .../QueryContextSourceRegistrations/037_05.robot | 5 ++++- .../QueryContextSourceRegistrations/037_06.robot | 6 +++--- .../QueryContextSourceRegistrations/037_07.robot | 6 +++--- .../QueryContextSourceRegistrations/037_09.robot | 5 ++++- .../QueryContextSourceRegistrations/037_10.robot | 10 +++++----- .../QueryContextSourceRegistrations/037_11.robot | 10 +++++----- .../RetrieveContextSourceRegistration/036_05.robot | 6 +++--- .../UpdateContextSourceRegistration/034_01.robot | 6 +++++- .../UpdateContextSourceRegistration/034_03.robot | 9 ++++++++- .../NotificationBehaviour/047_11.robot | 11 +++++------ .../NotificationBehaviour/047_16.robot | 10 +++++----- .../041_02.robot | 6 +++--- .../041_03.robot | 10 +++++----- .../039_04.robot | 6 +++--- resources/AssertionUtils.resource | 8 ++++++++ 100 files changed, 556 insertions(+), 223 deletions(-) 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 6c60bf12..28be18f1 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Retrieve Available Attributes @@ -38,7 +38,7 @@ Setup Initial Entities ... ${entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Set Suite Variable ${entity_id} + Set Test Variable ${entity_id} Delete Initial Entities Delete Entity by Id Returning Response ${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 3f8cd47c..1dfeced9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Retrieve Available Entity Types @@ -46,8 +46,8 @@ Setup Initial Entities ... ${second_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Set Suite Variable ${first_entity_id} - Set Suite Variable ${second_entity_id} + Set Test Variable ${first_entity_id} + Set Test Variable ${second_entity_id} Delete Initial Entities Delete Entity by Id Returning Response ${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 557cc53d..409aeb39 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Retrieve Details Of Available Attributes @@ -38,7 +38,7 @@ Setup Initial Entities ... ${entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Set Suite Variable ${entity_id} + Set Test Variable ${entity_id} Delete Initial Entities Delete Entity by Id Returning Response ${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 c9b55e30..e75e1f36 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Retrieve Details Of Available Entity Types @@ -46,8 +46,8 @@ Setup Initial Entities ... ${second_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Set Suite Variable ${first_entity_id} - Set Suite Variable ${second_entity_id} + Set Test Variable ${first_entity_id} + Set Test Variable ${second_entity_id} Delete Initial Entities Delete Entity by Id Returning Response ${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 d09a2f72..c5e99b57 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -18,18 +20,21 @@ Query several entities based on ids [Documentation] Check that you can query several entities based on ids [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + 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} + Set Suite Variable ${third_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${third_entity_id} @@ -46,12 +51,11 @@ Query several entities based on ids ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} ${third_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} ${third_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} Delete Entity by Id Returning Response ${third_entity_id} 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 5656a2ff..c6b3284a 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -24,18 +26,21 @@ Query several entities based on the entities types [Documentation] Check that you can query several entities based on the entities types [Tags] e-query 5_7_2 ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${vehicle_entity_id} ${response}= Create Entity Selecting Content Type ... ${vehicle_filename} ... ${vehicle_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} ${parking_entity_id}= Generate Random Entity Id ${parking_id_prefix} + Set Suite Variable ${parking_entity_id} ${response}= Create Entity Selecting Content Type ... ${parking_filename} ... ${parking_entity_id} @@ -49,12 +54,11 @@ Query several entities based on the entities types ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${building_entity_id} ${vehicle_entity_id} ${parking_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${building_entity_id} ${vehicle_entity_id} ${parking_entity_id} Delete Entity by Id Returning Response ${building_entity_id} Delete Entity by Id Returning Response ${vehicle_entity_id} Delete Entity by Id Returning Response ${parking_entity_id} 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 fbd38643..f14f2d82 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,12 +21,14 @@ Query several entities based on the given id pattern [Documentation] Check that you can query several entities based on the given id pattern [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} @@ -40,11 +44,10 @@ Query several entities based on the given id pattern ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 064080b4..e4a4b8ed 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -21,12 +23,14 @@ Query several entities based on attribute names [Documentation] Check that you can query several entities based on attribute names [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename2} ... ${second_entity_id} @@ -38,6 +42,12 @@ Query several entities based on attribute names ... ${attribute_subcategory} @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${response}= Query Entities attrs=${attributes_to_be_retrieved} + Check Response Status Code 200 ${response.status_code} + Check Response Body Containing List Containing Entity elements + ... ${expectation_filename} + ... ${entities_ids_to_be_compared} + ... ${response.json()} + Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing Entity elements ... ${expectation_filename} @@ -48,6 +58,5 @@ Query several entities based on attribute names *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 84abf539..fe67c7db 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,12 +21,14 @@ Query several entities based on a list of properties [Documentation] Check that you can query entitites based on a list of properties [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} @@ -42,11 +46,10 @@ Query several entities based on a list of properties ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 dbb050fb..4121d010 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -18,18 +20,26 @@ Query several entities via POST Interaction based on ids [Documentation] Check that you can query several entities via POST Interaction based on ids [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} ${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} + 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} + Set Suite Variable ${third_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${third_entity_id} @@ -46,12 +56,11 @@ Query several entities via POST Interaction based on ids ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} ${third_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} ${third_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} Delete Entity by Id Returning Response ${third_entity_id} 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 edf911ad..e258d448 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -24,18 +26,21 @@ Query several entities via POST Interaction based on the entities types [Documentation] Check that you can query several entities via POST Interaction based on the entities types [Tags] e-query 5_7_2 ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${vehicle_entity_id} ${response}= Create Entity Selecting Content Type ... ${vehicle_filename} ... ${vehicle_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} ${parking_entity_id}= Generate Random Entity Id ${parking_id_prefix} + Set Suite Variable ${parking_entity_id} ${response}= Create Entity Selecting Content Type ... ${parking_filename} ... ${parking_entity_id} @@ -49,12 +54,11 @@ Query several entities via POST Interaction based on the entities types ... ${expectation_filename} ... ${entity_types_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${building_entity_id} ${vehicle_entity_id} ${parking_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${building_entity_id} ${vehicle_entity_id} ${parking_entity_id} Delete Entity by Id Returning Response ${building_entity_id} Delete Entity by Id Returning Response ${vehicle_entity_id} Delete Entity by Id Returning Response ${parking_entity_id} 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 6643c88e..3e99510f 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,12 +21,14 @@ Query several entities via POST Interaction based on the given id pattern [Documentation] Check that you can query several entities via POST Interaction based on the given id pattern [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} @@ -40,11 +44,10 @@ Query several entities via POST Interaction based on the given id pattern ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 90fbe9b1..12dc6cbc 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,12 +21,14 @@ Query several entities via POST Interaction based on attribute names [Documentation] Check that you can query several entities via POST Interaction based on attribute names [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} @@ -41,11 +45,10 @@ Query several entities via POST Interaction based on attribute names ... ${expectation_filename} ... ${entities_ids_to_be_retrieved} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 9b5473cf..0a9f36bf 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,12 +21,14 @@ Query several entities via POST Interaction based on a list of properties [Documentation] Check that you can query entitites via POST Interaction based on a list of properties [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} @@ -40,11 +44,10 @@ Query several entities via POST Interaction based on a list of properties ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 23f067ac..4a67b778 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,12 +21,14 @@ Query entities based on incorrect ids [Documentation] Check that you cannot query entities if the requested ids are incorrect [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} @@ -40,11 +44,10 @@ Query entities based on incorrect ids ... ${response.json()} ... ${ERROR_TYPE_BAD_REQUEST_DATA} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 e324a597..d6b7d2f4 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -20,12 +22,14 @@ Query entities based on incorrect entity types [Documentation] Check that you cannot query entities if the requested entity types are incorrect [Tags] e-query 5_7_2 ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${vehicle_entity_id} ${response}= Create Entity Selecting Content Type ... ${vehicle_filename} ... ${vehicle_entity_id} @@ -41,11 +45,10 @@ Query entities based on incorrect entity types ... ${response.json()} ... ${ERROR_TYPE_BAD_REQUEST_DATA} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Entities ${building_entity_id} ${vehicle_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${building_entity_id} ${vehicle_entity_id} Delete Entity by Id Returning Response ${building_entity_id} Delete Entity by Id Returning Response ${vehicle_entity_id} 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 64d4749a..1a204195 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -18,12 +20,14 @@ Query several entities based on incorrect id pattern [Documentation] Check that you cannot query entities if the requested id pattern is incorrect [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} @@ -38,11 +42,10 @@ Query several entities based on incorrect id pattern ... ${response.json()} ... ${ERROR_TYPE_BAD_REQUEST_DATA} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 3e1334d6..2b545522 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,12 +21,14 @@ Query several entities based on incorrect attribute names [Documentation] Check that you cannot query entities if the requested attribute names are incorrect [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} @@ -37,11 +41,10 @@ Query several entities based on incorrect attribute names ... ${response.json()} ... ${ERROR_TYPE_BAD_REQUEST_DATA} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 a3bc3987..190d8a8a 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -21,12 +23,14 @@ Query entitites when the request has a wrong geometryProperty [Documentation] Check that you cannot query entitites if the request has a wrong geometryProperty [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + Set Suite Variable ${second_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} @@ -45,11 +49,10 @@ Query entitites when the request has a wrong geometryProperty ... ${response.json()} ... ${ERROR_TYPE_BAD_REQUEST_DATA} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} 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 fdf6a3b9..6d84cd57 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,18 +21,21 @@ Query entities in a simplified representation [Documentation] Check that the queried entities by Id can be returned in a simplified representation [Tags] e-query 6_3_7 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + 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} + Set Suite Variable ${third_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${third_entity_id} @@ -48,12 +53,11 @@ Query entities in a simplified representation ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} ${third_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} ${third_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} Delete Entity by Id Returning Response ${third_entity_id} 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 65a42cff..f2f0e280 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,18 +21,21 @@ Get an entity by id that can be returned in a geoJSON format [Documentation] Check that the queried entities by id can be returned in a geoJSON format [Tags] e-query 6_3_7 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + 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} + Set Suite Variable ${third_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${third_entity_id} @@ -48,12 +53,11 @@ Get an entity by id that can be returned in a geoJSON format ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} ${third_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} ${third_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} Delete Entity by Id Returning Response ${third_entity_id} 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 fc5f3018..f2bd2ebd 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -18,18 +20,21 @@ Query entities specifying a maximum number of results [Documentation] Check that you can query entities specifying a maximum number of results [Tags] e-query 6_3_10 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + 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} + 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} + Set Suite Variable ${third_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${third_entity_id} @@ -48,12 +53,11 @@ Query entities specifying a maximum number of results Check Response Status Code 200 ${response.status_code} @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} Check Response Body Containing Number Of Entities ${entity_type} ${2} ${response.json()} - [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} ${third_entity_id} + *** Keywords *** Delete Entities - [Arguments] ${first_entity_id} ${second_entity_id} ${third_entity_id} Delete Entity by Id Returning Response ${first_entity_id} Delete Entity by Id Returning Response ${second_entity_id} Delete Entity by Id Returning Response ${third_entity_id} 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 aa405bc9..78fe5637 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Entity + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -17,6 +19,7 @@ ${expectation_filename}= building-simple-attributes-expectation.jsonld [Documentation] Check that you can get an entity by id [Tags] e-retrieve 5_7_1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -25,4 +28,8 @@ ${expectation_filename}= building-simple-attributes-expectation.jsonld ${response}= Query Entity ${entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 200 ${response.status_code} Check Response Body Containing Entity element ${expectation_filename} ${entity_id} ${response.json()} - [Teardown] Delete Entity by Id Returning Response ${entity_id} + + +*** Keywords *** +Delete Created Entity + Delete Entity by Id Returning Response ${entity_id} 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 b7fbc456..9140d75b 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Entity + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,6 +21,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego [Documentation] Check that you can query some attributes from an entity [Tags] e-retrieve 5_7_1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -34,4 +37,8 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego ... attrs=${attributes_to_be_retrieved} Check Response Status Code 200 ${response.status_code} Check Response Body Containing Entity element ${expectation_filename} ${entity_id} ${response.json()} - [Teardown] Delete Entity by Id Returning Response ${entity_id} + + +*** Keywords *** +Delete Created Entity + Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_03.robot index a8fa27b2..f255e10c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_03.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Entity + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -18,6 +20,7 @@ ${geometry_property}= location [Documentation] Check that you can query the geometry property from an entity [Tags] e-retrieve 5_7_1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -29,4 +32,8 @@ ${geometry_property}= location ... geoproperty=${geometry_property} Check Response Status Code 200 ${response.status_code} Check Response Body Containing Entity element ${expectation_filename} ${entity_id} ${response.json()} - [Teardown] Delete Entity by Id Returning Response ${entity_id} + + +*** Keywords *** +Delete Created Entity + Delete Entity by Id Returning Response ${entity_id} 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 1e3d05d1..4878648e 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 @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Entity + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -17,6 +19,7 @@ Get an entity if an attribute is not known to the system [Documentation] Check that you cannot get an entity if an attribute is not known to the system [Tags] e-retrieve 5_6_6 ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -32,4 +35,8 @@ Get an entity if an attribute is not known to the system ... ${response.json()} ... ${ERROR_TYPE_RESOURCE_NOT_FOUND} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Entity by Id Returning Response ${entity_id} + + +*** Keywords *** +Delete Created Entity + Delete Entity by Id Returning Response ${entity_id} 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 75c6fd20..6d092052 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Entity + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -18,6 +20,7 @@ Get an entity in a simplified representation [Documentation] Check that the queried entity by Id can be returned in a simplified representation [Tags] e-retrieve 6_3_7 ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -30,3 +33,8 @@ Get an entity in a simplified representation Check Response Status Code 200 ${response.status_code} Check Response Body Containing Entity element ${expectation_filename} ${entity_id} ${response.json()} [Teardown] Delete Entity by Id Returning Response ${entity_id} + + +*** Keywords *** +Delete Created Entity + Delete Entity by Id Returning Response ${entity_id} 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 45cfc1e8..57caabf5 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Entity + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -19,6 +21,7 @@ Get an entity by id that can be returned in a geoJSON format [Documentation] Check that the queried entity by id can be returned in a geoJSON format [Tags] e-retrieve 6_3_7 ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -27,4 +30,8 @@ Get an entity by id that can be returned in a geoJSON format ${response}= Query Entity ${entity_id} ${accept_header} options=${options_parameter} Check Response Status Code 200 ${response.status_code} Check Response Body Containing Entity element ${expectation_filename} ${entity_id} ${response.json()} - [Teardown] Delete Entity by Id Returning Response ${entity_id} + + +*** Keywords *** +Delete Created Entity + Delete Entity by Id Returning Response ${entity_id} 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 00915f13..574aeb46 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entity -Suite Teardown Delete Created Entity +Test Setup Setup Initial Entity +Test Teardown Delete Created Entity Test Template Check JSON-LD Resolution When retrieving an entity @@ -41,7 +41,7 @@ Setup Initial Entity ... ${entity_id} ... ${CONTENT_TYPE_JSON} ... context=${ngsild_test_suite_context} - Set Suite Variable ${entity_id} + Set Test Variable ${entity_id} Delete Created Entity Delete Entity by Id Returning Response ${entity_id} 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 3ed7c3af..8e7af978 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Query the temporal evolution of entities @@ -55,9 +55,9 @@ Setup Initial Entities ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} Create Temporal Representation Of Entity ${bus_payload_file} ${third_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} - Set Suite Variable ${second_temporal_entity_representation_id} - Set Suite Variable ${third_temporal_entity_representation_id} + Set Test Variable ${first_temporal_entity_representation_id} + Set Test Variable ${second_temporal_entity_representation_id} + Set Test Variable ${third_temporal_entity_representation_id} Delete Initial Entities Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot index 5a485e31..bc439716 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Query the temporal evolution of entities matching the given NGSI-LD geo-query @@ -54,8 +54,8 @@ Setup Initial Entities Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} - Set Suite Variable ${second_temporal_entity_representation_id} + Set Test Variable ${first_temporal_entity_representation_id} + Set Test Variable ${second_temporal_entity_representation_id} Delete Initial Entities Delete Temporal Representation Of Entity ${first_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 6880dde9..c5021908 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Query the temporal evolution of entities with a limit to the number of entities to be retrieved @@ -52,9 +52,9 @@ Setup Initial Entities Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${third_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} - Set Suite Variable ${second_temporal_entity_representation_id} - Set Suite Variable ${third_temporal_entity_representation_id} + Set Test Variable ${first_temporal_entity_representation_id} + Set Test Variable ${second_temporal_entity_representation_id} + Set Test Variable ${third_temporal_entity_representation_id} Delete Initial Entities Delete Temporal Representation Of Entity ${first_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 0bb09a1f..a16d151d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Query the temporal evolution of entities using the entityOperations method @@ -48,8 +48,8 @@ Setup Initial Entities Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} - Set Suite Variable ${second_temporal_entity_representation_id} + Set Test Variable ${first_temporal_entity_representation_id} + Set Test Variable ${second_temporal_entity_representation_id} Delete Initial Entities Delete Temporal Representation Of Entity ${first_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 5a2082f2..e7dff655 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Retrieve the temporal evolution of an entity matching the given NGSI-LD temporal query @@ -43,7 +43,7 @@ Retrieve the temporal evolution of an entity matching the given NGSI-LD temporal Setup Initial Entities ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} - Set Suite Variable ${temporal_entity_representation_id} + Set Test Variable ${temporal_entity_representation_id} Delete Initial Entities Delete Temporal Representation Of Entity ${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 2b226d09..6789badc 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Retrieve the temporal evolution of the last N instances of entity attributes @@ -41,7 +41,7 @@ Retrieve the temporal evolution of the last N instances of entity attributes Setup Initial Entities ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} - Set Suite Variable ${temporal_entity_representation_id} + Set Test Variable ${temporal_entity_representation_id} Delete Initial Entities Delete Temporal Representation Of Entity ${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 c536d78b..809f9461 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Retrieve the temporal evolution of an entity with an invalid request content @@ -42,7 +42,7 @@ Retrieve the temporal evolution of an entity with an invalid request content Setup Initial Entities ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} - Set Suite Variable ${temporal_entity_representation_id} + Set Test Variable ${temporal_entity_representation_id} Delete Initial Entities Delete Temporal Representation Of Entity ${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 d0ae37d4..e47d2862 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Initial Entities Test Template Batch Create Entity Scenarios @@ -37,6 +38,7 @@ Batch Create Entity Scenarios @{entities_to_be_created}= Create List ${first_entity} ${second_entity} ${response}= Batch Create Entities @{entities_to_be_created} @{expected_entities_ids}= Create List ${first_entity_id} ${second_entity_id} + Set Test Variable @{expected_entities_ids} ${entities_to_be_queried}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} Check Response Status Code 201 ${response.status_code} Check Response Body Containing Array Of URIs set to ${expected_entities_ids} ${response.json()} @@ -46,4 +48,6 @@ Batch Create Entity Scenarios ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} Check Created Resources Set To ${entities_to_be_created} ${response.json()} - ${response}= Batch Delete Entities @{expected_entities_ids} + +Delete Initial Entities + Batch Delete Entities @{expected_entities_ids} 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 f4461c66..df636156 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities *** Variables *** @@ -17,7 +18,9 @@ Create a batch of two valid entities and one invalid entity [Documentation] Check that you 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} + Set Suite Variable ${first_entity_id} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${second_entity_id} # TODO: Use Load Test Sample keyword instead ${first_entity}= Load Entity building-minimal-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-minimal-sample.jsonld ${second_entity_id} @@ -39,8 +42,6 @@ Create a batch of two valid entities and one invalid entity ... accept=${CONTENT_TYPE_LD_JSON} @{created_entities}= Create List ${first_entity} ${second_entity} Check Created Resources Set To ${created_entities} ${response.json()} - @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} ${existing_entity_id} - ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** @@ -48,3 +49,7 @@ Setup Initial Entities ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity building-minimal-sample.jsonld ${existing_entity_id} Set Suite Variable ${existing_entity_id} + +Delete Initial Entities + @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} ${existing_entity_id} + Batch Delete Entities @{entities_ids_to_be_deleted} 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 f49cea34..4c0bbceb 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Initial Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -15,6 +17,7 @@ Create a batch of one entity using a provided Link header with JSON content type [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} + Set Suite Variable ${entity_id} ${entity}= Load Entity building-simple-attributes-sample.json ${entity_id} @{entities_to_be_created}= Create List ${entity} ${response}= Batch Create Entities @@ -30,5 +33,9 @@ Create a batch of one entity using a provided Link header with JSON content type Check Response Body Containing an Attribute set to ... https://ngsi-ld-test-suite/context#almostFull ... ${response.json()} + + +*** Keywords *** +Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${entity_id} ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} 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 7e314ac1..33ab8280 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Initial Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -15,6 +17,7 @@ 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 [Tags] be-create 6_3_5 ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} ${entity}= Load Entity building-simple-attributes-sample.json ${entity_id} @{entities_to_be_created}= Create List ${entity} ${response}= Batch Create Entities @{entities_to_be_created} content_type=${CONTENT_TYPE_JSON} @@ -25,5 +28,9 @@ Create a batch of one entity using the default context with JSON content type ${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} # Attribute should not be compacted as we did not provide a context containing this term Check Response Body Containing an Attribute set to ngsi-ld:default-context/almostFull ${response.json()} + + +*** Keywords *** +Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${entity_id} ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} 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 f63251f1..4f8c24fb 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Initial Entities + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -15,6 +17,7 @@ Create a batch of one entity using a JSON-LD @context obtained from the request [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" [Tags] be-create 6_3_5 ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} ${entity}= Load Entity building-simple-attributes-sample.jsonld ${entity_id} @{entities_to_be_created}= Create List ${entity} ${response}= Batch Create Entities @{entities_to_be_created} content_type=${CONTENT_TYPE_LD_JSON} @@ -27,5 +30,9 @@ Create a batch of one entity using a JSON-LD @context obtained from the request Check Response Body Containing an Attribute set to ... https://ngsi-ld-test-suite/context#almostFull ... ${response.json()} + + +*** Keywords *** +Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${entity_id} ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} 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 ab6cf54a..f6483c89 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot @@ -56,9 +56,9 @@ Setup Initial Entities ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity ${entity_payload_filename} ${first_entity_id} Create Entity ${entity_payload_filename} ${second_entity_id} - Set Suite Variable ${first_entity_id} - Set Suite Variable ${second_entity_id} + Set Test Variable ${first_entity_id} + Set Test Variable ${second_entity_id} Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} - Batch Delete Entities @{entities_ids_to_be_deleted} teardown=True + Batch Delete Entities @{entities_ids_to_be_deleted} 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 685a3c79..99d1e0d9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot @@ -56,9 +56,9 @@ Setup Initial Entities ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity ${entity_payload_filename} ${first_entity_id} Create Entity ${entity_payload_filename} ${second_entity_id} - Set Suite Variable ${first_entity_id} - Set Suite Variable ${second_entity_id} + Set Test Variable ${first_entity_id} + Set Test Variable ${second_entity_id} Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} - Batch Delete Entities @{entities_ids_to_be_deleted} teardown=True + Batch Delete Entities @{entities_ids_to_be_deleted} 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 afe3e325..3bc7f37c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities *** Variables *** @@ -29,6 +30,7 @@ Update a batch of non-existing and existing entities @{entities_to_be_updated}= Create List ${first_existing_entity} ${second_existing_entity} ${new_entity} ${response}= Batch Update Entities @{entities_to_be_updated} @{expected_successful_entities_ids}= Create List ${first_existing_entity_id} ${second_existing_entity_id} + Set Suite Variable @{expected_successful_entities_ids} @{expected_failed_entities_ids}= Create List ${new_entity_id} &{expected_batch_operation_result}= Create Batch Operation Result ... ${expected_successful_entities_ids} @@ -50,7 +52,6 @@ Update a batch of non-existing and existing entities ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} Check Updated Resources Set To ${updated_entities} ${response.json()} - ${response}= Batch Delete Entities @{expected_successful_entities_ids} *** Keywords *** @@ -61,3 +62,6 @@ Setup Initial Entities Create Entity ${entity_payload_filename} ${second_existing_entity_id} Set Suite Variable ${first_existing_entity_id} Set Suite Variable ${second_existing_entity_id} + +Delete Initial Entities + Batch Delete Entities @{expected_successful_entities_ids} 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 a7043f5a..f85bb2c1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Initial Entities Test Template Batch Upsert Entity Scenarios @@ -35,6 +36,7 @@ Batch Upsert Entity Scenarios @{entities_to_be_upserted}= Create List ${first_entity} ${second_entity} ${response}= Batch Upsert Entities @{entities_to_be_upserted} @{expected_entities_ids}= Create List ${first_entity_id} ${second_entity_id} + Set Test Variable @{expected_entities_ids} Check Response Status Code 201 ${response.status_code} Check Response Body Containing Array Of URIs set to ${expected_entities_ids} ${response.json()} ${expected_updated_entities_ids}= Catenate SEPARATOR=, @{expected_entities_ids} @@ -45,3 +47,6 @@ Batch Upsert Entity Scenarios ... accept=${CONTENT_TYPE_LD_JSON} Check Updated Resources Set To ${entities_to_be_upserted} ${response.json()} ${response}= Batch Delete Entities @{expected_entities_ids} + +Delete Initial Entities + Batch Delete Entities @{expected_entities_ids} 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 19822b2c..ae1b57d1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot @@ -31,6 +31,7 @@ Batch Upsert Non-existing And Existing Entities Scenarios [Documentation] Check that you can upsert a batch of non-existing and existing entities [Arguments] ${filename} ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Test Variable ${new_entity_id} ${new_entity}= Load Entity ${filename} ${new_entity_id} ${first_existing_entity}= Load Entity ${filename} ${first_existing_entity_id} ${second_existing_entity}= Load Entity ${filename} ${second_existing_entity_id} @@ -53,17 +54,17 @@ Batch Upsert Non-existing And Existing Entities Scenarios ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} Check Updated Resources Set To ${entities_to_be_upserted} ${response.json()} - @{entities_ids_to_be_deleted}= Create List ${new_entity_id} - ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} 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} Create Entity building-minimal-sample.jsonld ${first_existing_entity_id} Create Entity building-minimal-sample.jsonld ${second_existing_entity_id} - Set Suite Variable ${first_existing_entity_id} - Set Suite Variable ${second_existing_entity_id} + Set Test Variable ${first_existing_entity_id} + Set Test Variable ${second_existing_entity_id} Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${first_existing_entity_id} ${second_existing_entity_id} - Batch Delete Entities @{entities_ids_to_be_deleted} teardown=True + Batch Delete Entities @{entities_ids_to_be_deleted} + @{entities_ids_to_be_deleted}= Create List ${new_entity_id} + Batch Delete Entities @{entities_ids_to_be_deleted} 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 583cd1d8..15a69521 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot @@ -49,9 +49,9 @@ Setup Initial Entities ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity building-minimal-sample.jsonld ${first_existing_entity_id} Create Entity building-minimal-sample.jsonld ${second_existing_entity_id} - Set Suite Variable ${first_existing_entity_id} - Set Suite Variable ${second_existing_entity_id} + Set Test Variable ${first_existing_entity_id} + Set Test Variable ${second_existing_entity_id} Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${first_existing_entity_id} ${second_existing_entity_id} - Batch Delete Entities @{entities_ids_to_be_deleted} teardown=True + Batch Delete Entities @{entities_ids_to_be_deleted} 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 5015d1fa..ce6c2000 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot @@ -32,6 +32,7 @@ Batch Upsert Entities With Update Option Scenarios [Documentation] Check that you can upsert a batch of entities with update option [Arguments] ${filename} ${update_fragment_filename} ${new_entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Test Variable ${new_entity_id} ${new_entity}= Load Entity ${filename} ${new_entity_id} ${existing_entity}= Load Entity ${filename} ${existing_entity_id} @{entities_to_be_upserted}= Create List ${new_entity} ${existing_entity} @@ -51,14 +52,14 @@ Batch Upsert Entities With Update Option Scenarios ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} Check Updated Resources Set To ${updated_entities} ${response.json()} - @{entities_ids_to_be_deleted}= Create List ${new_entity_id} - ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} Setup Initial Entities ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} Create Entity ${existing_entity_payload_filename} ${existing_entity_id} - Set Suite Variable ${existing_entity_id} + Set Test Variable ${existing_entity_id} Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${existing_entity_id} - Batch Delete Entities @{entities_ids_to_be_deleted} teardown=True + Batch Delete Entities @{entities_ids_to_be_deleted} + @{entities_ids_to_be_deleted}= Create List ${new_entity_id} + Batch Delete Entities @{entities_ids_to_be_deleted} 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 3d17cc43..4305ae59 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Initial Entity Test Template Create Entity Scenarios @@ -29,6 +30,7 @@ Create Entity Scenarios [Tags] e-create 5_6_1 [Arguments] ${filename} ${content_type} ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -46,4 +48,6 @@ Create Entity Scenarios ... context=${ngsild_test_suite_context} END Check Created Resource Set To ${created_entity} ${response.json()} - [Teardown] Delete Entity by Id ${entity_id} + +Delete Initial Entity + Delete Entity by Id ${entity_id} 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 c100cba8..c99dbf73 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_03.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Initial Entity + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -17,6 +19,7 @@ Create one valid entity and one invalid entity [Documentation] Check that you cannot create an entity with an existing id [Tags] e-create 5_6_1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -31,4 +34,8 @@ Create one valid entity and one invalid entity ... ${response.json()} ... ${ERROR_TYPE_ALREADY_EXISTS} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Entity by Id ${entity_id} + + +*** Keywords *** +Delete Initial Entity + Delete Entity by Id ${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 95e64907..4d78ea05 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Initial Entities + *** Variables *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -16,6 +18,7 @@ Append entity attributes when the entity id is not known to the system [Documentation] Check that you cannot append entity attributes if the entity id is not known to the system [Tags] ea-append 5_6_3 ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + 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} Check Response Body Containing ProblemDetails Element Containing Type Element set to @@ -25,4 +28,5 @@ Append entity attributes when the entity id is not known to the system *** Keywords *** - [Teardown] Delete Entity by Id Returning Response ${entity_id} +Delete Initial Entities + Delete Entity by Id Returning Response ${entity_id} 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 25978e8c..e0835f62 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Initial Entities Test Template Delete Attributes @@ -30,6 +31,7 @@ Delete Attributes [Tags] ea-delete 5_6_5 [Arguments] ${datasetId} ${deleteAll} ${expectation_filename} ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -49,4 +51,6 @@ Delete Attributes ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context Check Updated Resource Set To ${entity_expectation_payload} ${response.json()} ${ignored_attributes} - [Teardown] Delete Entity by Id Returning Response ${entity_id} + +Delete Initial Entities + Delete Entity by Id Returning Response ${entity_id} 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 5a665fbe..2aba5e75 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_02.robot @@ -5,7 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Delete Attributes @@ -36,8 +37,10 @@ Delete Attributes Check Response Status Code 201 ${response.status_code} ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${EMPTY} false Check Response Status Code ${status_code} ${response.status_code} - [Teardown] Delete Entity by Id Returning Response ${valid_entity_id} Setup Initial Entities ${valid_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${valid_entity_id} + Set Test Variable ${valid_entity_id} + +Delete Initial Entities + Delete Entity by Id Returning Response ${valid_entity_id} 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 d41856d2..975a3ba8 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_03.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities -Suite Teardown Delete Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Delete Attributes @@ -32,11 +32,10 @@ Delete Attributes [Arguments] ${entity_id} ${attribute_id} ${datasetId} ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${datasetId} false Check Response Status Code ${status_code} ${response.status_code} - [Teardown] Delete Entity by Id Returning Response ${entity_id} Setup Initial Entities ${valid_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${valid_entity_id} + Set Test Variable ${valid_entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${valid_entity_id} 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 82ed9453..44ebeccd 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Initial Entities Test Template Update Attributes @@ -27,6 +28,7 @@ Update Attributes [Tags] ea-partial-update 5_6_4 [Arguments] ${fragment_filename} ${attribute_id} ${expectation_filename} ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -45,4 +47,6 @@ Update Attributes ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context Check Updated Resource Set To ${entity_expectation_payload} ${response.json()} ${ignored_attributes} - [Teardown] Delete Entity by Id Returning Response ${entity_id} + +Delete Initial Entities + Delete Entity by Id Returning Response ${entity_id} 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 626ec9ba..ac541919 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_02.robot @@ -5,7 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Update Attributes @@ -48,8 +49,10 @@ Update Attributes ... ${response.json()} ... ${ERROR_TYPE_BAD_REQUEST_DATA} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Entity by Id Returning Response ${valid_entity_id} Setup Initial Entities ${valid_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${valid_entity_id} + Set Test Variable ${valid_entity_id} + +Delete Initial Entities + Delete Entity by Id Returning Response ${valid_entity_id} 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 cc3175e2..13dfe7f1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_03.robot @@ -5,7 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Entities +Test Setup Setup Initial Entities +Test Teardown Delete Initial Entities Test Template Partial Update Attributes @@ -47,10 +48,12 @@ Partial Update Attributes ... ${response.json()} ... ${ERROR_TYPE_RESOURCE_NOT_FOUND} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Entity by Id Returning Response ${valid_entity_id} Setup Initial Entities ${valid_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${valid_entity_id} + Set Test Variable ${valid_entity_id} ${not_found_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${not_found_entity_id} + Set Test Variable ${not_found_entity_id} + +Delete Initial Entities + Delete Entity by Id Returning Response ${valid_entity_id} 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 2801cba5..bece8550 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Initial Entities Test Template Update Attributes @@ -32,6 +33,7 @@ Update Attributes ... ${expectation_response_filename} ... ${expectation_filename} ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} ${response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} @@ -49,4 +51,6 @@ Update Attributes ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context Check Updated Resource Set To ${entity_expectation_payload} ${response.json()} ${ignored_attributes} - [Teardown] Delete Entity by Id Returning Response ${entity_id} + +Delete Initial Entities + Delete Entity by Id Returning Response ${entity_id} 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 144d5026..9fe8b4b1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Initial Entities + *** Variables *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -16,7 +18,7 @@ Update entity attributes when the entity id is not known to the system [Documentation] Check that you cannot update entity attributes if the entity id or attributes are not known to the system [Tags] ea-update 5_6_2 ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Test Variable ${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} Check Response Body Containing ProblemDetails Element Containing Type Element set to @@ -26,4 +28,5 @@ Update entity attributes when the entity id is not known to the system *** Keywords *** - [Teardown] Delete Entity by Id Returning Response ${entity_id} +Delete Initial Entities + Delete Entity by Id Returning Response ${entity_id} 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 e52305a8..8ab2e248 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Temporal Entity Test Template Create Temporal Entity @@ -25,6 +26,7 @@ Create Temporal Entity [Tags] te-create 5_6_11 [Arguments] ${filename} ${expectation_filename} ${content_type} ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... ${temporal_entity_representation_id} ... ${filename} @@ -49,4 +51,6 @@ Create Temporal Entity ... ${temporal_entity_expectation_payload} ... ${response.json()} ... ${ignored_attributes} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} + +Delete Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} 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 b04ba707..3bef8b4f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Temporal Entity + *** Variables *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -18,6 +20,7 @@ ${expectation_filename}= vehicle-temporal-representation-update-expectation.j [Documentation] Check that you can update a temporal representation of an entity with simple temporal properties [Tags] te-update 5_6_11 ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Suite Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... ${temporal_entity_representation_id} ... ${filename} @@ -40,4 +43,8 @@ ${expectation_filename}= vehicle-temporal-representation-update-expectation.j ... ${temporal_entity_expectation_payload} ... ${response.json()} ... ${ignored_attributes} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} + + +*** Keywords *** +Delete Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_01.robot index 4e6ea7f9..bee4c7e2 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_01.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Temporal Entity + *** Variables *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -18,6 +20,7 @@ ${expectation_filename}= vehicle-temporal-representation-added-attribute-expe [Documentation] Check that you can add a simple temporal attribute to a temporal representation of an entity [Tags] tea-append 5_6_12 ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Suite Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... ${temporal_entity_representation_id} ... ${filename} @@ -40,4 +43,8 @@ ${expectation_filename}= vehicle-temporal-representation-added-attribute-expe ... ${temporal_entity_expectation_payload} ... ${response.json()} ... ${ignored_attributes} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} + + +*** Keywords *** +Delete Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_03.robot index c1d3a16a..9a21c5aa 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_03.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Temporal Entity + *** Variables *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -18,6 +20,7 @@ Add Attribute To Temporal Entity [Documentation] Check that an error is raised if you add an attribute to a non-existent entity [Tags] tea-append 5_6_12 ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Suite Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... ${temporal_entity_representation_id} ... ${filename} @@ -29,4 +32,8 @@ Add Attribute To Temporal Entity ... ${fragment_filename} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response.status_code} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} + + +*** Keywords *** +Delete Temporal Entity + Delete Temporal Representation Of Entity ${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 9b206409..fa70be39 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Temporal Entity Test Template Delete Attribute From A Temporal Entity @@ -30,6 +31,7 @@ Delete Attribute From A Temporal Entity [Tags] tea-delete 5_6_13 [Arguments] ${deleteAll} ${datasetId} ${expectation_filename} ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... ${temporal_entity_representation_id} ... ${filename} @@ -55,4 +57,6 @@ Delete Attribute From A Temporal Entity ... ${temporal_entity_expectation_payload} ... ${response.json()} ... ${ignored_attributes} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} + +Delete Temporal Entity + Delete Temporal Representation Of Entity ${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 def7efd2..54fbb57e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_02.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Create Temporal Entity -Suite Teardown Delete Temporal Entity +Test Setup Create Temporal Entity +Test Teardown Delete Temporal Entity Test Template Delete attribute from temporal entity with unknow entity/attribute id @@ -49,7 +49,7 @@ Create Temporal Entity ... ${filename} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - Set Suite Variable ${valid_temporal_entity_id} + Set Test Variable ${valid_temporal_entity_id} Delete Temporal Entity Delete Temporal Representation Of Entity ${valid_temporal_entity_id} 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 7ae8d891..6d77421f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_03.robot @@ -5,7 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Create Id +Test Setup Create Id +Test Teardown Delete Temporal Entity Test Template Delete Attribute @@ -44,10 +45,12 @@ Delete Attribute ... ${response.json()} ... ${ERROR_TYPE_RESOURCE_NOT_FOUND} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Temporal Representation Of Entity ${valid_temporal_entity_id} Create Id ${valid_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${valid_temporal_entity_id} - Set Suite Variable ${unknown_temporal_entity_id} + Set Test Variable ${valid_temporal_entity_id} + Set Test Variable ${unknown_temporal_entity_id} + +Delete Temporal Entity + Delete Temporal Representation Of Entity ${valid_temporal_entity_id} 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 e3ef12a6..c09b96af 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Temporal Entity + *** Variables *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -48,4 +50,8 @@ ${expectation_filename}= vehicle-temporal-representation-delete-speed-instanc ... ${temporal_entity_expectation_payload} ... ${response.json()} ... ${ignored_attributes} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} + + +*** Keywords *** +Delete Temporal Entity + Delete Temporal Representation Of Entity ${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 6909b2a6..e155542e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_02.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Create Temporal Entity -Suite Teardown Delete Temporal Entity +Test Setup Create Temporal Entity +Test Teardown Delete Temporal Entity Test Template Delete attribute instance @@ -44,7 +44,7 @@ Delete attribute instance Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${temporal_entity_representation_id} + Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... ${temporal_entity_representation_id} ... ${filename} @@ -56,7 +56,7 @@ Create Temporal Entity ... sysAttrs ... ${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response.json()['speed'][0]['instanceId']} - Set Suite Variable ${valid_instanceId} + Set Test Variable ${valid_instanceId} Delete Temporal Entity Delete Temporal Representation Of Entity ${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 8629a98d..480d92d3 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot @@ -5,7 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Create Id +Test Setup Create Id +Test Teardown Delete Intitial Temporal Representation Of Entity Test Template Delete Attribute Instance @@ -36,22 +37,24 @@ Delete Attribute Instance ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} Check Response Status Code ${status_code} ${response.status_code} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} Create Id ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${temporal_entity_representation_id} + Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... ${temporal_entity_representation_id} ... ${filename} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${unknown_temporal_entity_id} + Set Test Variable ${unknown_temporal_entity_id} ${response}= Get Temporal Representation Of Entity ... ${temporal_entity_representation_id} ... ${CONTENT_TYPE_LD_JSON} ... sysAttrs ... ${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response.json()['speed'][0]['instanceId']} - Set Suite Variable ${valid_instanceId} + Set Test Variable ${valid_instanceId} + +Delete Intitial Temporal Representation Of Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot index 19ad0a2c..0b9a64f4 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Intitial Temporal Representation Of Entity + *** Variables *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -61,4 +63,8 @@ ${attributeId}= speed ... ${temporal_entity_expectation_payload} ... ${response.json()} ... ${ignored_attributes} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} + + +*** Keywords *** +Delete Intitial Temporal Representation Of Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_02.robot index 0fd7114a..7933a5b7 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_02.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Create Id -Suite Teardown Delete Temporal Entity +Test Setup Create Id +Test Teardown Delete Temporal Entity Test Template Modify Attribute Instance Temporal Entity @@ -48,7 +48,7 @@ Modify Attribute Instance Temporal Entity Create Id ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${temporal_entity_representation_id} + Set Test Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... ${temporal_entity_representation_id} ... ${filename} @@ -60,7 +60,7 @@ Create Id ... sysAttrs ... ${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response.json()['speed'][0]['instanceId']} - Set Suite Variable ${valid_instanceId} + Set Test Variable ${valid_instanceId} Delete Temporal Entity Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_03.robot index 0433ba9d..34bc191c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_03.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Create Id -Suite Teardown Delete Temporal Entity +Test Setup Create Id +Test Teardown Delete Temporal Entity Test Template Modify Attribute Instance Temporal Entity @@ -49,14 +49,14 @@ Create Id ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${unknown_temporal_entity_id} + Set Test Variable ${unknown_temporal_entity_id} ${response}= Get Temporal Representation Of Entity ... ${temporal_entity_representation_id} ... ${CONTENT_TYPE_LD_JSON} ... sysAttrs ... ${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response.json()['speed'][0]['instanceId']} - Set Suite Variable ${valid_instanceId} + Set Test Variable ${valid_instanceId} Delete Temporal Entity Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot index 0df82096..7b2569d2 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Initial Subscriptions + *** Variables *** ${subscription_id_prefix}= urn:ngsi-ld:Subscription: @@ -17,6 +19,7 @@ Create Subscription [Documentation] Check that you can create a subscription [Tags] sub-create 5_8_1 ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + Set Suite Variable ${subscription_id} ${response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} @@ -27,4 +30,6 @@ Create Subscription ... accept=${CONTENT_TYPE_LD_JSON} ... context=${ngsild_test_suite_context} Check Created Resource Set To ${expected_subscription} ${response.json()} - [Teardown] Delete Subscription ${subscription_id} + +Delete Initial Subscriptions + Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_03.robot index 906c79f2..4a85209c 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_03.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Initial Subscriptions Test Template Create Subscription With Invalid/Empty Id @@ -23,6 +24,7 @@ Create Subscription With Invalid/Empty Id [Documentation] Check that you cannot create a subscription with an invalid/empty id [Tags] sub-create 5_8_1 [Arguments] ${subscription_id} + Set Suite Variable ${subscription_id} ${response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} @@ -32,4 +34,6 @@ Create Subscription With Invalid/Empty Id ... ${response.json()} ... ${ERROR_TYPE_BAD_REQUEST_DATA} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Subscription ${subscription_id} + +Delete Initial Subscriptions + Delete 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 379e27e8..8af0f6e3 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Initial Subscriptions + *** Variables *** ${subscription_id_prefix}= urn:ngsi-ld:Subscription: @@ -16,6 +18,7 @@ Create a subscription with an id known to the system [Documentation] Check that you cannot create a subscription with an existing id [Tags] sub-create 5_8_1 ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + Set Suite Variable ${subscription_id} ${response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} @@ -29,4 +32,6 @@ Create a subscription with an id known to the system ... ${response.json()} ... ${ERROR_TYPE_ALREADY_EXISTS} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Subscription ${subscription_id} + +Delete Initial Subscriptions + Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot index 7cb65072..bf56923c 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Subscriptions -Suite Teardown Delete Initial Subscriptions +Test Setup Setup Initial Subscriptions +Test Teardown Delete Initial Subscriptions Test Template Query Subscriptions With Limit And Page Parameters @@ -61,9 +61,9 @@ Setup Initial Subscriptions ... ${third_subscription_id} ... ${third_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - Set Suite Variable ${first_subscription_id} - Set Suite Variable ${second_subscription_id} - Set Suite Variable ${third_subscription_id} + Set Test Variable ${first_subscription_id} + Set Test Variable ${second_subscription_id} + Set Test Variable ${third_subscription_id} Delete Initial Subscriptions Delete Subscription ${first_subscription_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot index 51a25ad2..b2b2aba7 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Context Source Registrations + *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: @@ -16,6 +18,7 @@ Create Context Source Registration With Specific Date Expiration Date [Documentation] Check that you can create a context source registration with specific ID and expiration date [Tags] csr-create ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + 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} ${response}= Create Context Source Registration With Return ${registration_payload} @@ -26,4 +29,8 @@ Create Context Source Registration With Specific Date Expiration Date ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} Check Created Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} - [Teardown] Delete Context Source Registration ${registration_id} + + +*** Keywords *** +Delete Created Context Source Registrations + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot index 87917bd3..2f6edc24 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Context Source Registrations + *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: @@ -16,6 +18,7 @@ Create Context Source Registration That Never Expires [Documentation] Check that you can create a context source registration that never expires [Tags] csr-create ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + 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} ${response}= Create Context Source Registration With Return ${registration_payload} @@ -27,4 +30,8 @@ Create Context Source Registration That Never Expires ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} Check Created Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} - [Teardown] Delete Context Source Registration ${registration_id} + + +*** Keywords *** +Delete Created Context Source Registrations + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot index 1ba8d35c..3af5ee3b 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Context Source Registrations + *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: @@ -19,6 +21,7 @@ Create Context Source Registration Without A Sprecified ID ${response}= Create Context Source Registration With Return ${payload} Check Response Status Code 201 ${response.status_code} ${registration_id}= Check Response Headers ID Not Empty ${response.headers} + Set Suite Variable ${registration_id} ${registration_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${response}= Retrieve Context Source Registration ... ${registration_id} @@ -26,4 +29,8 @@ Create Context Source Registration Without A Sprecified ID ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} Check Created Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} - [Teardown] Delete Context Source Registration ${registration_id} + + +*** Keywords *** +Delete Created Context Source Registrations + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_03.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_03.robot index a035d142..ead33a06 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_03.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Context Source Registrations + *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: @@ -16,6 +18,7 @@ Create a context source registration that already exists [Documentation] Check that you cannot create a context source registration that already exists [Tags] csr-create ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + Set Suite Variable ${registration_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} @@ -23,4 +26,8 @@ Create a context source registration that already exists ${response}= Create Context Source Registration With Return ${updated_payload} Check Response Status Code 409 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Context Source Registration ${registration_id} + + +*** Keywords *** +Delete Created Context Source Registrations + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot index 0f0eb201..7a4ac3e6 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Context Source Registrations + *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: @@ -16,6 +18,7 @@ Create one context source registration using a provided Link header with JSON co [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} + 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} ${response}= Create Context Source Registration With Return @@ -30,4 +33,8 @@ Create one context source registration using a provided Link header with JSON co ... ['information']['entities'][0]['type'] ... https://ngsi-ld-test-suite/context#Building ... ${response.json()} - [Teardown] Delete Context Source Registration ${registration_id} + + +*** Keywords *** +Delete Created Context Source Registrations + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot index f486086c..a22690bf 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Context Source Registrations + *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: @@ -16,6 +18,7 @@ Create one context source registration using the default context with JSON conte [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 [Tags] csr-create 6_3_5 ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + 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} ${response}= Create Context Source Registration With Return @@ -29,4 +32,8 @@ Create one context source registration using the default context with JSON conte ... ${response.json()} ${response}= Retrieve Context Source Registration ${registration_id} Check JSON Value In Response Body ['information']['entities'][0]['type'] Building ${response.json()} - [Teardown] Delete Context Source Registration ${registration_id} + + +*** Keywords *** +Delete Created Context Source Registrations + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot index 77b28786..7af118db 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Context Source Registrations + *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: @@ -16,6 +18,7 @@ Create one context source registration using a JSON-LD @context obtained from th [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" [Tags] csr-create 6_3_5 ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + 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} ${response}= Create Context Source Registration With Return @@ -29,4 +32,8 @@ Create one context source registration using a JSON-LD @context obtained from th ... ['information']['entities'][0]['type'] ... https://ngsi-ld-test-suite/context#Building ... ${response.json()} - [Teardown] Delete Context Source Registration ${registration_id} + + +*** Keywords *** +Delete Created Context Source Registrations + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot index 67753a4d..b2990bd1 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_02.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Created Context Source Registrations Test Template Delete Context Source @@ -26,6 +27,7 @@ Delete Context Source [Tags] csr-delete [Arguments] ${invalid_registration_id} ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + Set Test Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${response}= Create Context Source Registration With Return ${updated_payload} @@ -34,3 +36,6 @@ Delete Context Source Check Response Status Code 400 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} [Teardown] Delete Context Source Registration ${registration_id} + +Delete Created Context Source Registrations + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_01.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_01.robot index 34484615..31f846be 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_01.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Context Source Registrations -Suite Teardown Delete Created Context Source Registrations +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Created Context Source Registrations Test Template Query Context Source Registration @@ -53,8 +53,8 @@ Setup Initial Context Source Registrations ... ${second_context_source_registration_id} Create Context Source Registration ${first_context_source_registration_payload} Create Context Source Registration ${second_context_source_registration_payload} - Set Suite Variable ${first_context_source_registration_id} - Set Suite Variable ${second_context_source_registration_id} + Set Test Variable ${first_context_source_registration_id} + Set Test Variable ${second_context_source_registration_id} Delete Created Context Source Registrations Delete Context Source Registration ${first_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_05.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_05.robot index 22b7a7ca..97e3074b 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_05.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Created Context Source Registration Test Template Query Context Source Registration Matching EntityInfo of RegistrationInfo @@ -41,4 +42,6 @@ Query Context Source Registration Matching EntityInfo of RegistrationInfo ... ${expectation_file_path} ... ${expected_context_source_registration_ids} ... ${response.json()} - [Teardown] Delete Context Source Registration ${context_source_registration_id} + +Delete Created Context Source Registration + Delete Context Source Registration ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_06.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_06.robot index 7f803e34..770221b1 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_06.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_06.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Context Source Registration -Suite Teardown Delete Created Context Source Registration +Test Setup Setup Initial Context Source Registration +Test Teardown Delete Created Context Source Registration Test Template Query Context Source Registration Matching Properties And Relationships Of RegistrationInfo @@ -45,7 +45,7 @@ Setup Initial Context Source Registration ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} Create Context Source Registration ${context_source_registration_payload} - Set Suite Variable ${context_source_registration_id} + Set Test Variable ${context_source_registration_id} Delete Created Context Source Registration Delete Context Source Registration ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_07.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_07.robot index 6cb09ceb..59b26236 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_07.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_07.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Context Source Registration -Suite Teardown Delete Created Context Source Registration +Test Setup Setup Initial Context Source Registration +Test Teardown Delete Created Context Source Registration Test Template Query Context Source Registration Matching Geoquery @@ -47,7 +47,7 @@ Setup Initial Context Source Registration ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} Create Context Source Registration ${context_source_registration_payload} - Set Suite Variable ${context_source_registration_id} + Set Test Variable ${context_source_registration_id} Delete Created Context Source Registration Delete Context Source Registration ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_09.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_09.robot index f5170635..8108216d 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_09.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_09.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Created Context Source Registrations Test Template Query Context Source Registration Matching Temporal Query @@ -53,4 +54,6 @@ Query Context Source Registration Matching Temporal Query ... ${expectation_file_path} ... ${expected_context_source_registration_ids} ... ${response.json()} - [Teardown] Delete Context Source Registration ${context_source_registration_id} + +Delete Created Context Source Registrations + Delete Context Source Registration ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_10.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_10.robot index 0becb0ad..b82e5b1c 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_10.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_10.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Context Source Registrations -Suite Teardown Delete Created Context Source Registrations +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Created Context Source Registrations Test Template Query Context Source Registration With Query Params @@ -62,9 +62,9 @@ Setup Initial Context Source Registrations Create Context Source Registration ${first_context_source_registration_payload} Create Context Source Registration ${second_context_source_registration_payload} Create Context Source Registration ${third_context_source_registration_payload} - Set Suite Variable ${first_context_source_registration_id} - Set Suite Variable ${second_context_source_registration_id} - Set Suite Variable ${third_context_source_registration_id} + Set Test Variable ${first_context_source_registration_id} + Set Test Variable ${second_context_source_registration_id} + Set Test Variable ${third_context_source_registration_id} Delete Created Context Source Registrations Delete Context Source Registration ${first_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_11.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_11.robot index 4708063f..285bdf69 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_11.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_11.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Context Source Registrations -Suite Teardown Delete Created Context Source Registrations +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Created Context Source Registrations Test Template Query Context Source Registration With Limit And Page Parameters @@ -61,9 +61,9 @@ Setup Initial Context Source Registrations Create Context Source Registration ${first_context_source_registration_payload} Create Context Source Registration ${second_context_source_registration_payload} Create Context Source Registration ${third_context_source_registration_payload} - Set Suite Variable ${first_context_source_registration_id} - Set Suite Variable ${second_context_source_registration_id} - Set Suite Variable ${third_context_source_registration_id} + Set Test Variable ${first_context_source_registration_id} + Set Test Variable ${second_context_source_registration_id} + Set Test Variable ${third_context_source_registration_id} Delete Created Context Source Registrations Delete Context Source Registration ${first_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_05.robot b/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_05.robot index 37be8a91..87a9e9a7 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_05.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Context Source Registration -Suite Teardown Delete Created Context Source Registration +Test Setup Setup Initial Context Source Registration +Test Teardown Delete Created Context Source Registration Test Template Check JSON-LD resolution when retrieving a context source registration @@ -43,7 +43,7 @@ Setup Initial Context Source Registration ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} Create Context Source Registration ${context_source_registration_payload} - Set Suite Variable ${context_source_registration_id} + Set Test Variable ${context_source_registration_id} Delete Created Context Source Registration Delete Context Source Registration ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot index 3050f041..97c3c5d8 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Teardown Delete Updated Context Source Registration Test Template Update Context Source @@ -25,6 +26,7 @@ Update Context Source [Tags] csr-update [Arguments] ${filename} ${update_filename} ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + Set Test Variable ${registration_id} ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${filename} ${registration_payload}= Update Value To JSON ${payload} $..id ${registration_id} ${response}= Create Context Source Registration With Return ${registration_payload} @@ -42,4 +44,6 @@ Update Context Source ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} @context Check Updated Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} - [Teardown] Delete Context Source Registration ${registration_id} + +Delete Updated Context Source Registration + Delete Context Source Registration ${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 89d5e80b..519e3bbf 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_03.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Teardown Delete Updated Context Source Registration + *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: @@ -16,6 +18,7 @@ Update a context source registration by id if the id is not known to the system [Documentation] Check that you cannot update a context source registration by id if the id is not known to the system [Tags] csr-update ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + 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} ${response}= Update Context Source Registration With Return @@ -24,4 +27,8 @@ Update a context source registration by id if the id is not known to the system ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 404 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - [Teardown] Delete Context Source Registration ${registration_id} + + +*** Keywords *** +Delete Updated Context Source Registration + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_11.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_11.robot index e2c586b4..df5f1481 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_11.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_11.robot @@ -7,7 +7,8 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource Suite Setup Start Local Server -Suite Teardown Delete Created Context Source Registrations +Suite Teardown Stop Local Server +Test Teardown Delete Created Context Source Registrations Test Template Receive cSourceNotification For Matching Context Source Registrations On Management Interval @@ -29,23 +30,21 @@ Receive cSourceNotification For Matching Context Source Registrations On Managem [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} + Set Suite Variable ${subscription_id} ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ${filepath} ${subscription_id} ${response}= Create Context Source Registration Subscription ${subscription_payload} - Set Suite Variable ${subscription_id} ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + Set Suite Variable ${context_source_registration_id} ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Set Suite Variable ${context_source_registration_id} ${response}= Create Context Source Registration ${context_source_registration_payload} @{expected_context_source_registration_ids}= Create List ${context_source_registration_id} Wait for notification and validate it ... ${subscription_id} ... ${expected_context_source_registration_ids} ... newlyMatching - # Moved here since each test case creates a subscription - [Teardown] Delete Context Source Registration Subscription ${subscription_id} Delete Created Context Source Registrations - Stop Local Server + Delete Context Source Registration Subscription ${subscription_id} Delete Context Source Registration ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_16.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_16.robot index e680609d..d7760fcd 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_16.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_16.robot @@ -6,8 +6,8 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Resource ${EXECDIR}/resources/NotificationUtils.resource -Suite Setup Setup Initial Context Source Registrations And Subscriptions -Suite Teardown Delete Created Context Source Registrations And Subscriptions +Test Setup Setup Initial Context Source Registrations And Subscriptions +Test Teardown Delete Created Context Source Registrations And Subscriptions Test Template Receive cSourceNotification For Newly Matching Context Source Registrations @@ -58,9 +58,9 @@ Setup Initial Context Source Registrations And Subscriptions Create Context Source Registration Subscription ${subscription_payload} Create Context Source Registration ${first_context_source_registration_payload} Create Context Source Registration ${second_context_source_registration_payload} - Set Suite Variable ${subscription_id} - Set Suite Variable ${first_context_source_registration_id} - Set Suite Variable ${second_context_source_registration_id} + Set Test Variable ${subscription_id} + Set Test Variable ${first_context_source_registration_id} + Set Test Variable ${second_context_source_registration_id} Delete Created Context Source Registrations And Subscriptions Stop Local Server diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot index 64c0a027..5635ce39 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Context Source Registration Subscriptions -Suite Teardown Delete Created Context Source Registration Subscriptions +Test Setup Setup Initial Context Source Registration Subscriptions +Test Teardown Delete Created Context Source Registration Subscriptions Test Template Query Context Source Registration Subscriptions With Limit Parameter @@ -61,7 +61,7 @@ Setup Initial Context Source Registration Subscriptions Create Context Source Registration Subscription ${third_subscription_payload} Set Suite Variable ${first_subscription_id} Set Suite Variable ${second_subscription_id} - Set Suite Variable ${third_subscription_id} + Set Test Variable ${third_subscription_id} Delete Created Context Source Registration Subscriptions Delete Context Source Registration Subscription ${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 f435b3ab..5eb55de7 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Context Source Registration Subscriptions -Suite Teardown Delete Created Context Source Registration Subscriptions +Test Setup Setup Initial Context Source Registration Subscriptions +Test Teardown Delete Created Context Source Registration Subscriptions Test Template Query Context Source Registration Subscriptions With Limit And Page Parameters @@ -60,9 +60,9 @@ Setup Initial Context Source Registration Subscriptions Create Context Source Registration Subscription ${first_subscription_payload} Create Context Source Registration Subscription ${second_subscription_payload} Create Context Source Registration Subscription ${third_subscription_payload} - Set Suite Variable ${first_subscription_id} - Set Suite Variable ${second_subscription_id} - Set Suite Variable ${third_subscription_id} + Test Suite Variable ${first_subscription_id} + Test Suite Variable ${second_subscription_id} + Test Suite Variable ${third_subscription_id} Delete Created Context Source Registration Subscriptions Delete Context Source Registration Subscription ${first_subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot index 9d21c33a..750e03f3 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot @@ -5,8 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Setup Setup Initial Context Source Registration Subscriptions -Suite Teardown Delete Initial Context Source Registration Subscriptions +Test Setup Setup Initial Context Source Registration Subscriptions +Test Teardown Delete Initial Context Source Registration Subscriptions Test Template Update Context Source Registration Subscription With Invalid Fragment @@ -41,7 +41,7 @@ Setup Initial Context Source Registration Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} ${response}= Create Context Source Registration Subscription ${subscription_payload} - Set Suite Variable ${subscription_id} + Set Test Variable ${subscription_id} Delete Initial Context Source Registration Subscriptions Delete Context Source Registration Subscription ${subscription_id} diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index c6dd0a89..7bb0f037 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -26,6 +26,14 @@ Check Response Body Containing Array Of URIs set to Lists Should Be Equal ${expected_entities_ids} ${response_body} ignore_order=True Check Response Body Content + [Arguments] ${expectation_filename} ${response_body} ${additional_ignored_path}=${EMPTY} + ${entity_payload}= Load Json From File ${EXECDIR}/data/entities/expectations/${expectation_filename} + ${all_ignored_paths}= Create List ${instance_id_regex_expr} ${additional_ignored_path} + ${comparison_result}= Compare Dictionaries Ignoring Keys + ... ${entity_payload} + ... ${response_body} + ... ${all_ignored_paths} + Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} [Arguments] ${expectation_filename} ${response_body} ${additional_ignored_path}=${EMPTY} ${entity_payload}= Load JSON From File ${EXECDIR}/data/entities/expectations/${expectation_filename} ${all_ignored_paths}= Create List ${instance_id_regex_expr} ${additional_ignored_path} -- GitLab