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 6c60bf128bec899d44c214ae5cbd3b4e9b7fbed6..28be18f167376f9c6c5ca5be68c9173348fc2c0a 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 3f8cd47c700a8c8e9ac747226250844025d15cf6..1dfeced9a0622ee2f8b9ced96468ce3b6e1632a2 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 557cc53d6d70eb301069269ba80de958e63939d1..409aeb3925bc587337d70ee7ba0162e130d0ac53 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 c9b55e302147a06b1b7d5d089b1428ececaae6f4..e75e1f36bb5fb02150d41efd8d6c405610fe82e5 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 d09a2f728aa9d98e603ec480aed20bc83fc1325b..c5e99b57f593fb28ecc58108e57ff486de397675 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 5656a2ff5c350a3f11a592ffcd30fe468308c59c..c6b3284adfc53db2146db55bbec800a66ae1d5ec 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 fbd386434d463eb8f44bf327a0263ce37720b72b..f14f2d82ada00b5e7fec5210b347127624bdebf6 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 064080b45b68969cce57dcd2f17f725912034e40..e4a4b8ed53ad1008f5544fea0e3afd69161bdee4 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 84abf53912ba2f689f9748fe59b8ee6f58826ecf..fe67c7dbe864e1c8f08baed120d0eaa789f7de8b 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 dbb050fb16b0ff46db0e1035d3de533fc4df188e..4121d010c5f9832b87bc58f8c6dd190b37bf96d0 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 edf911adf2dfccbdc1ef206e3e1ece2a68772dc6..e258d4481c32cc36cc80041f26de90b913ee59a9 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 6643c88e89a48fc5dd7bd0c730cb44a70c0618c9..3e99510f13e952b61f6c5e063c931258af880eac 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 90fbe9b16a90a7cce01b38aaa7e25b7272b2dbc4..12dc6cbc9493b1c78340d4a257a4b7dc3573fec1 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 9b5473cf9f5da362c049f2e629396d22edc2f0c1..0a9f36bf74f2fabe922a3091fb99d4ac04d351df 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 23f067acc4c046822fe0cd58ba284887eb59313d..4a67b778c97fff9693d1633e5377d5761d72f491 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 e324a59711ceb279ff64f4179b113b080910ba04..d6b7d2f4432e166f56933e96010c5588bc6f9a62 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 64d4749a6d9549704c4efe3ff0cc34da17b3a33b..1a204195315814050ce23d457d2d10443c6f4307 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 3e1334d6774b79323345e9da6a6e8bdc488cb62f..2b54552247cb2cb2b186e4145f262034e268d429 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 a3bc398783d88c9f38ef43bb84d3cf750c596bd6..190d8a8af079a5d42e88fd851e1a62ae742091d2 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 fdf6a3b96a100c14ad23fe812dd02578afb16f07..6d84cd572a561ea5c32397dab40f8b62ffd46ed7 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 65a42cffd276d43a8b7c8ce34124dfd4b71affbd..f2f0e28051d0e37b236ceec4e777f8ab82e7854f 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 fc5f301825d1ae7cb3ac274c2fb4ff43e43ff6d7..f2bd2ebd6397b9a22f2a8fd642d2ee8152636fa0 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 aa405bc92e28efa0a951a9e884a9206979dd6a5e..78fe56375aefc667f083db6e77cdb48176a262b5 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 b7fbc456635eda5e3ea1b3e0890c4d7856c664a8..9140d75b30b62e3fc38b02762c3c7335da66c119 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 a8fa27b2989ab5852b93a1ce5e90e9017ae0d1d4..f255e10c413dff85e63593d5d8458d70286663c9 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 1e3d05d1d6838333de5d9f7a15f27b955d09f78f..4878648e65a0a9944909ad91a9524499fd69443b 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 75c6fd20f9c86ef3d7b2fb2d4be1b1929144c313..6d09205240e44156e96491c002933a48fde125b7 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 45cfc1e89a7067b231b516e6d645979f65b3c299..57caabf53875d7e8f117164136321f1aca0c14f5 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 00915f13a2f66c5000e886eea8476a883b9ba49f..574aeb461f784d7d1ad2e7dcfe7670f95da20ef4 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 3ed7c3af22bd3b882df4afbe1885c58b118de7ed..8e7af97821ba672ab2548a7238d9540f56a1dd43 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 5a485e319cea3b327de7f0c55b4c0bc69e8d5122..bc43971603c31051a0db3effa46e83734f995be3 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 6880dde957231c594d8912f21876fa2e6d25e579..c50219081d6b95177cca4660639afe3768759c38 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 0bb09a1f648ec96c96f9e0b029fca2952f919d8c..a16d151da2c89051a4c06b4ba483e52ae5faed3b 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 5a2082f2635dfe77438ac0e3fc140b2974eec199..e7dff655266bfbfcc5a4cc7855a2f10c4efce10d 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 2b226d09d3cdf058b465a8ab01fe2676418067ab..6789badcdb13d9185058457cdf36ea3d095421ba 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 c536d78bb45e5ac9f3001346f867ae4759cff069..809f9461741a99d35a4ab1a659e7489a5951014a 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 d0ae37d41588c381e53df595270a993b0008cfd4..e47d28628e9ef80a60fc4c82fc81b6ac4cd7ebc0 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 f4461c6628a53884bd682fbd98136c7af7014b51..df636156bb99cd6350915374200111c5ee4b6829 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 f49cea34bb6443a5379b49efad5472b2fb456c73..4c0bbceb0e648bc16c7817aa8a393e5f6f3b2df8 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 7e314ac10361295d68af243217a084a0ea2fc0ba..33ab8280083b384b831c8677be3d2b601e2d8f96 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 f63251f18493a069c11b88cc7e610cc7215de4ba..4f8c24fbed8340849a6b8c0433e077eb7854ea94 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 ab6cf54abd587b40bc07d6b8b0997a2c82be3f3f..f6483c89f8a9040e270c257250ccf34a80c022aa 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 685a3c799ca12a5db71205f9010d832ed4ae42ea..99d1e0d95bb0f69d5af6ebee26f19a26215190f3 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 afe3e325f2e4a3b89a7c9cc1a80df1f25540fdf9..3bc7f37c8d00c6f24f4584b452b7c82e9d02c72a 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 a7043f5a468c381c0e346069a3263d123f8daabe..f85bb2c1da008970663b4aa4ba048278facbff1e 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 19822b2c486594424c1020cda11b067ec87f1fd1..ae1b57d112f2f591aa4f2255f28111eb3478d26f 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 583cd1d87be6e4ba731d864399eac95d195a71ac..15a695211c7236181359534734ebd08f10d04f4a 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 5015d1fa7abf0f3b39b3ce5af14a425982ceec45..ce6c20002095eceafbad6107567bf17de2d98795 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 3d17cc43a1047093da159431c27e71e9fcce7620..4305ae5975594655604f4c3525cbee9b890decaa 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 c100cba88f206c99da7c93a0a9509530461de125..c99dbf73b64769b047a713dc779621d970950bed 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 95e649077cf9332f2fd5f3ce8d8331063f9c1dd9..4d78ea05b043a43e9d6bd0fe65b80f1dffb7b841 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 25978e8cdc0c33e791f41b9687600de5adba79ab..e0835f6229d8192d5b46633be5ba124fdd558bff 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 5a665fbe697f203b8ec7eda0cbfe711aabaf4b45..2aba5e756f9405c508ad30f3b0af9aca4db8f7d2 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 d41856d2b4c33183754e50e82708f9c08481316d..975a3ba85854b388203aeede25402cd83e37b25c 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 82ed9453952aceaaec2e88a8001626602a8ffe7e..44ebeccd6549916a1945eb831954667e59f14faa 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 626ec9bae03403670fad3e1f002671abb04a3afd..ac541919cfdcb3a0342b7d85f169164cf9ee000a 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 cc3175e212e4a15ac8bd7529dad7b8902804c9e1..13dfe7f13cd9f21ab74280a45416bc872436b209 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 2801cba5ce9a4bf21849fbb5a48da556ad0d48bd..bece855024fc6c784dab01bd886a5afaefc498e3 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 144d50265349241130e341abaf37151aca34b127..9fe8b4b13d113fbae9745952aa095496b9ccac44 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 e52305a8c5651ffcdd590203a7c1e5e0338eb00f..8ab2e248682390740441b17a1f55338a96c87360 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 b04ba70795e9e4a6544ce0535d82ddd473b31475..3bef8b4f16ac53f3ed05b42d0c4ecf3da582b0a7 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 4e6ea7f97fce5b4851626b767fec84916bbf67a4..bee4c7e2a1f7d1246a679e856c1033aa19cbe59f 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 c1d3a16aae225ffdaa2115dbb40ad18a0e6dd238..9a21c5aa66470a66109b3a435633b3cd617112fb 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 9b2064090d48cca5aae6b6b06b5682f61b6dfb2c..fa70be39056e66a11e392190a04e44e0eef5595b 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 def7efd25a374659fb6866fc5e72a7a2c6d20d90..54fbb57ecf4e48e39f7cd6b35a86ceb116cd2930 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 7ae8d891e2f43ec097551979ea200c3f6eabcf8f..6d77421f953e021121dd4eb2ad77ae9946e27ff0 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 e3ef12a6ef9db7bde755735ae924e5a9fe443a7b..c09b96af43444f4df9a991d2dbb8397d33f9cfcb 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 6909b2a6b6d517731e97b5b906b72fb8464f1840..e155542e061016d5dc10bd05a8130c867ce53ae4 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 8629a98d3420e7278a4271a5941dd8304e2dc857..480d92d3f0a27a76114be1d71b523d21bd74fda1 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 19ad0a2c17eefeca8c4604162d5195c313197f20..0b9a64f44afa232b2c3a11e3f74214f33382eda6 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 0fd7114af7b22159d4d05e2d92da7e5be7fa44ad..7933a5b725ae137ed9de2ebff8b213719d4e15c5 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 0433ba9d759802c68e668311d3fe27598d0c6d20..34bc191c07ca3f25e9cf6d6c7ebbde2e712e2b3c 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 0df8209603d05fb6df0cbd070a9d0a0832092e08..7b2569d2d68de68df903c38e21346c14c71c49cd 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 906c79f26d26449f1c6225e32881caae11ac6520..4a85209ccc3ca129e564f9818d61a5599e28b421 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 379e27e8130eec7373e4750e28af69cc23ffb27c..8af0f6e33c0a261a853c0ebbffa539ff0b7f69cc 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 7cb6507231be6902c11aa60cf93023d94f8cbab4..bf56923cf4fb6ec0c46d8f895b331b35ade2d5f1 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 51a25ad2c004cd4858982ea5e0fdebaafe03aa35..b2b2aba7f31eee1e9d79c69b97935e510f698296 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 87917bd3d620fed2fc7bb4964a109fd9a4bfa6e4..2f6edc2453054c6d9b98bbb52d381f41ba42eed3 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 1ba8d35cd954d86610251fe70f0828977aa7b5aa..3af5ee3bc97d3a399204296352bde79926727a8c 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 a035d1420b7ef005b48342321887f261a838be7d..ead33a0632e0062117090fed1ff1ba7b71f167a7 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 0f0eb20165b4c71d74e084a18aed8457aeed3cb6..7a4ac3e658455228a909173f598b2a560f016028 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 f486086c27b7aa7bbda6b89504a7ee08da50c69b..a22690bf6ba23a0c4df38c83320067e09cd3332b 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 77b28786822253c1f21291de019b523db4886e3c..7af118db1ba5c32536bee28991e0b66301356741 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 67753a4d8481b22411385313264849626a3088dd..b2990bd17dadbc13cb0911eeb05b1885b4a0001b 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 3448461581112e473bcff6cd17cf846f7206c7ae..31f846be1afa497455fa0386e764eec96f2126d8 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 22b7a7cadedb15a2deb941fe85f7efd8df6e591a..97e3074b033766485e3cb05c4a2d60b56028bc16 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 7f803e348b8756d3d3f2423b4d2e7a1c659a3b45..770221b186a3bd4443d92df8da9e972045a9b967 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 6cb09ceb9b51c271a97b171dd496e12b20b95484..59b262363c99ec101c551915fd61d3dc96d91507 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 f5170635d895d3c1debb89bb3595d250ec743111..8108216df1f1c5b8ec58603ae7f77f3d7a54b4da 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 0becb0ad5ac007238dfa8e2a50a536dda7958ebf..b82e5b1c443d743ed69b18fdaecdf71248117676 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 4708063fe161c5ff841223adb020abe244ddfe30..285bdf69cc2d47baf62ec41882c344bcc0e4339f 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 37be8a913ccc9cbe1b1d369f599758bbeacd9688..87a9e9a72d745f2d7ff044c9711d87403e741b4a 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 3050f041d94a3bd4c39b61478b4a16a30eeabb20..97c3c5d8c9172fd38b8a3289d7d23884368ca98f 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 89d5e80b3e7a6ace668e554b9a79375eeb1d6780..519e3bbf7816f062a5408841366382dfacaaf594 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 e2c586b43e3bbb1f993ae406504953726b670f97..df5f1481bd92dc8ffb4991bc60a52a95211af9c3 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 e680609dd9086f32f181d2d88ce9ca07b2b64196..d7760fcd714d62556ef021ce6d452b1e4b4168f5 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 64c0a02702386ad63206328afeefda9f67e8f94e..5635ce3992d6a3729b396abfe4d09d7fe1c36f83 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 f435b3ab65d38d0bf0c9599a5b6dc4a08a00e1bd..5eb55de7dd34d2e1ca1760bacef8033e51afd3ef 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 9d21c33a3a6b68735cec54dfabc1bb76882749fb..750e03f359960fb65f6e3ccbb7bf6590bde57353 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 c6dd0a8978806388d8f5620a2b8742e2c6d0fe13..7bb0f037e3eb09c354f04692620cafb1db205f3a 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}