diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot index 13de02085ec33f30da8311bbc8690ec43901fdce..7b589b0a8d2c39eddbf30be22c17deb206079178 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot @@ -30,11 +30,12 @@ ${filename}= building-simple-attributes-sample.json *** Keywords *** Setup Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity Selecting Content Type + ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} Delete Initial Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot index f4298288e4be9f18471d3846234649118184857b..b81f7f8f0c53cd38ae4200d67ec60ed29fe54be7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot @@ -28,11 +28,12 @@ ${expectation_file}= types/expectations/attribute-027-01-expectation.json *** Keywords *** Setup Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity Selecting Content Type + ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} Delete Initial Entity 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 05096b7e35f9c35e9eb53d3e7e6534635034c152..f51e3ee3d306be615edc7b14f887cfc1efa78023 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot @@ -36,11 +36,12 @@ Retrieve Available Attributes Setup Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity Selecting Content Type + ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${entity_id} Delete Initial Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot index 8b5c51cb480a6ac69bd7e5933cd9b71058ea34cf..8c77aa1bea7003ed45f9282e229ba68c17360c03 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot @@ -31,17 +31,19 @@ ${filename}= building-simple-attributes-sample.json Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity Selecting Content Type + ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Create Entity Selecting Content Type + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${first_entity_id} + ${create_response2}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Set Suite Variable ${first_entity_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_entity_id} Delete Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot index 6ebc8c6ae5bb8fda9de426062e45619281d145f6..5416a277cb5a5056ecce67c114fdc2d6fd26fa78 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot @@ -29,17 +29,19 @@ ${expectation_file}= types/expectations/entity-type-info-024-01-expectati Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity Selecting Content Type + ${create_response1}= Create Entity Selecting Content Type ... ${filename} ... ${first_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Create Entity Selecting Content Type + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${first_entity_id} + ${create_response2}= Create Entity Selecting Content Type ... ${filename} ... ${second_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Set Suite Variable ${first_entity_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_entity_id} Delete Initial Entities 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 93dc63ae97ab97387acb97bc6768b94bd4d4d44b..efc8b6261dec33ec3e12cb74aada2902bbab4e0c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot @@ -39,17 +39,19 @@ Retrieve Available Entity Types Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Create Entity Selecting Content Type + ${create_response1}= Create Entity Selecting Content Type ... ${first_filename} ... ${first_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Create Entity Selecting Content Type + Check Response Status Code 201 ${create_response1.status_code} + Set Test Variable ${first_entity_id} + ${create_response2}= Create Entity Selecting Content Type ... ${second_filename} ... ${second_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Set Test Variable ${first_entity_id} + Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_entity_id} Delete Initial Entities 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 035213c2594805596b9601cb96f4af04a9f829cb..d5ebd20bdf065279037c4a131c3b383decdb8230 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot @@ -37,11 +37,12 @@ Retrieve Details Of Available Attributes Setup Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity Selecting Content Type + ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${entity_id} Delete Initial Entity 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 e983ecfab71f16ab56f97ba647de847f6e67252b..a1b62ddbe395dda2d80a27d404b223a9eab0a7fd 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot @@ -40,17 +40,19 @@ Retrieve Details Of Available Entity Types Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Create Entity Selecting Content Type + ${create_response1}= Create Entity Selecting Content Type ... ${first_filename} ... ${first_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Create Entity Selecting Content Type + Check Response Status Code 201 ${create_response1.status_code} + Set Test Variable ${first_entity_id} + ${create_response2}= Create Entity Selecting Content Type ... ${second_filename} ... ${second_entity_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Set Test Variable ${first_entity_id} + Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_entity_id} Delete Initial Entities 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 557217f75a41773e7bee5d68748aa197cb6f216a..cf39e2211ea9f94ddb299998d267f4169582fb3f 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Setup Initial Entities Suite Teardown Delete Entities @@ -20,6 +21,23 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building 019_01_01 Query several entities based on ids [Documentation] Check that one can query several entities based on ids [Tags] e-query 5_7_2 + @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} + ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} + + ${response}= Query Entities + ... entity_ids=${entities_ids_to_be_retrieved} + ... entity_types=${entity_types_to_be_retrieved} + + Check Response Status Code 200 ${response.status_code} + Check Response Body Containing List Containing Entity Elements + ... expectation_filename=${expectation_filename} + ... entities_ids=${entities_ids_to_be_compared} + ... response_body=${response.json()} + + +*** Keywords *** +Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -41,20 +59,7 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building ... ${third_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response3.status_code} - @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} - ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} - ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} - ${response}= Query Entities - ... entity_ids=${entities_ids_to_be_retrieved} - ... entity_types=${entity_types_to_be_retrieved} - Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity Elements - ... expectation_filename=${expectation_filename} - ... entities_ids=${entities_ids_to_be_compared} - ... response_body=${response.json()} - -*** Keywords *** Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${second_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 b5293c3005c05bf9e70be627a086a44f1f1ef6a2..8c8476ea45de9c4780600f2fc7ebc47ed152750e 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Setup Initial Entities Suite Teardown Delete Entities @@ -26,6 +27,21 @@ ${parking_entity_type}= https://ngsi-ld-test-suite/context#OffStreetParking 019_01_02 Query several entities based on the entities types [Documentation] Check that one can query several entities based on the entities types [Tags] e-query 5_7_2 + @{entities_ids_to_be_compared}= Create List ${vehicle_entity_id} ${parking_entity_id} + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${vehicle_entity_type} ${parking_entity_type} + + ${response}= Query Entities entity_types=${entity_types_to_be_retrieved} accept=${CONTENT_TYPE_LD_JSON} + + Check Response Status Code 200 ${response.status_code} + Check Response Body Containing List Containing Entity Elements With Different Types + ... filename=${expectation_filename} + ... entities_representation_ids=${entities_ids_to_be_compared} + ... response_body=${response.json()} + ... ignore_core_context_version=${True} + + +*** Keywords *** +Setup Initial Entities ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${building_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -47,18 +63,7 @@ ${parking_entity_type}= https://ngsi-ld-test-suite/context#OffStreetParking ... ${parking_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response3.status_code} - ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${vehicle_entity_type} ${parking_entity_type} - ${response}= Query Entities entity_types=${entity_types_to_be_retrieved} accept=${CONTENT_TYPE_LD_JSON} - Check Response Status Code 200 ${response.status_code} - @{entities_ids_to_be_compared}= Create List ${vehicle_entity_id} ${parking_entity_id} - Check Response Body Containing List Containing Entity Elements With Different Types - ... filename=${expectation_filename} - ... entities_representation_ids=${entities_ids_to_be_compared} - ... response_body=${response.json()} - ... ignore_core_context_version=${True} - -*** Keywords *** Delete Entities Delete Entity by Id ${building_entity_id} Delete Entity by Id ${vehicle_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 6b293b767ed291a5d7ee9d3f68bcf12924d2686b..1c044f6ebfdaf733f7ff691c35feab57fd776728 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Setup Initial Entities Suite Teardown Delete Entities @@ -21,6 +22,22 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.* 019_01_03 Query several entities based on the given id pattern [Documentation] Check that one can query several entities based on the given id pattern [Tags] e-query 5_7_2 + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} + @{entities_ids_to_be_compared}= Create List ${second_entity_id} ${first_entity_id} + + ${response}= Query Entities + ... entity_id_pattern=${entity_id_pattern} + ... entity_types=${entity_types_to_be_retrieved} + + Check Response Status Code 200 ${response.status_code} + Check Response Body Containing List Containing Entity Elements + ... expectation_filename=${expectation_filename} + ... entities_ids=${entities_ids_to_be_compared} + ... response_body=${response.json()} + + +*** Keywords *** +Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -35,19 +52,7 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.* ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} - @{entities_ids_to_be_compared}= Create List ${second_entity_id} ${first_entity_id} - ${response}= Query Entities - ... entity_id_pattern=${entity_id_pattern} - ... entity_types=${entity_types_to_be_retrieved} - Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity Elements - ... expectation_filename=${expectation_filename} - ... entities_ids=${entities_ids_to_be_compared} - ... response_body=${response.json()} - -*** Keywords *** Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${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 a0acab89875c44379855ab5ec7ade6263e862b10..bc942adb827527eb9882394e2ea0d160e27d8fa6 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Setup Initial Entities Suite Teardown Delete Entities @@ -23,6 +24,23 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego 019_01_04 Query several entities based on attribute names [Documentation] Check that one can query several entities based on attribute names [Tags] e-query 5_7_2 + ${attributes_to_be_retrieved}= Catenate + ... SEPARATOR=, + ... ${attribute_airqualitylevel} + ... ${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()} + + +*** Keywords *** +Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -37,20 +55,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${attributes_to_be_retrieved}= Catenate - ... SEPARATOR=, - ... ${attribute_airqualitylevel} - ... ${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()} - -*** Keywords *** Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${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 97c771e48736ba30a5db5a28a3bc3d87a57c1dc6..8b699c8fff1f146136865919a739ed7f47263ce7 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Setup Initial Entities Suite Teardown Delete Entities @@ -23,29 +24,16 @@ ${coordinates}= [13.3986, 52.5547] 019_01_05 Query several entities based on a geoquery [Documentation] Check that one can query entities based on a geoquery [Tags] e-query 5_7_2 - ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - Set Suite Variable ${first_entity_id} - ${create_response1}= Create Entity Selecting Content Type - ... ${filename} - ... ${first_entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} - Set Suite Variable ${second_entity_id} - ${create_response2}= Create Entity Selecting Content Type - ... ${filename} - ... ${second_entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response2.status_code} @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} - ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} + ${response}= Query Entities ... entity_types=${entity_types_to_be_retrieved} ... accept=${CONTENT_TYPE_LD_JSON} ... georel=${georal} ... geometry=${geometry} ... coordinates=${coordinates} + Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} @@ -55,6 +43,22 @@ ${coordinates}= [13.3986, 52.5547] *** Keywords *** +Setup Initial Entities + ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${first_entity_id} + ${create_response1}= Create Entity Selecting Content Type + ... ${filename} + ... ${first_entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response1.status_code} + ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${second_entity_id} + ${create_response2}= Create Entity Selecting Content Type + ... ${filename} + ... ${second_entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} + Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${second_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_06.robot index b691af533c22319fbcf34ace0aeca0cbab12fe73..ead347f546721e9c385d452aaaef4aa753ab6838 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_06.robot @@ -52,18 +52,20 @@ Query several entities based on scopes Setup Initial Entities ${entity_one_scope_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${entity_one_scope_id} - Create Entity Selecting Content Type + ${create_response1}= Create Entity Selecting Content Type ... ${entity_one_scope} ... ${entity_one_scope_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} + Check Response Status Code 201 ${create_response1.status_code} ${entity_many_scopes_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${entity_many_scopes_id} - Create Entity Selecting Content Type + ${create_response2}= Create Entity Selecting Content Type ... ${entity_many_scopes} ... ${entity_many_scopes_id} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} + Check Response Status Code 201 ${create_response2.status_code} Delete Entities Delete Entity by Id ${entity_one_scope_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 d5f651c32a353bc834fe7a92c633208b082869b3..d07d7d5c0129de0c09954cb0d3e2065845efecb3 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entities Suite Teardown Delete Entities @@ -21,6 +22,22 @@ ${entity_invalid_id_two}= thisisaninvaliduri2 019_03_01 Query entities based on incorrect ids [Documentation] Check that one cannot query entities if the requested ids are incorrect [Tags] e-query 5_7_2 + ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${entity_invalid_id_one} ${entity_invalid_id_two} + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} + + ${response}= Query Entities + ... entity_ids=${entities_ids_to_be_retrieved} + ... entity_types=${entity_types_to_be_retrieved} + + Check Response Status Code 400 ${response.status_code} + Check Response Body Containing ProblemDetails Element Containing Type Element set to + ... ${response.json()} + ... ${ERROR_TYPE_BAD_REQUEST_DATA} + Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} + + +*** Keywords *** +Create Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -35,19 +52,7 @@ ${entity_invalid_id_two}= thisisaninvaliduri2 ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${entity_invalid_id_one} ${entity_invalid_id_two} - ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} - ${response}= Query Entities - ... entity_ids=${entities_ids_to_be_retrieved} - ... entity_types=${entity_types_to_be_retrieved} - Check Response Status Code 400 ${response.status_code} - Check Response Body Containing ProblemDetails Element Containing Type Element set to - ... ${response.json()} - ... ${ERROR_TYPE_BAD_REQUEST_DATA} - Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - -*** Keywords *** Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${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 7ce3496d26d03625dc2a8fabd6930e0daeff796f..4aebd02f15b4c7ecd4739d4feb162ea3a4b98e4e 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entities Suite Teardown Delete Entities @@ -22,6 +23,22 @@ ${invalid_entity_type_two}= invalid_entity_type_two 019_03_02 Query entities based on incorrect entity types [Documentation] Check that one cannot query entities if the requested entity types are incorrect [Tags] e-query 5_7_2 + ${entity_types_to_be_retrieved}= Catenate + ... SEPARATOR=, + ... ${invalid_entity_type_one} + ... ${invalid_entity_type_two} + + ${response}= Query Entities entity_types=${entity_types_to_be_retrieved} + + Check Response Status Code 400 ${response.status_code} + Check Response Body Containing ProblemDetails Element Containing Type Element set to + ... ${response.json()} + ... ${ERROR_TYPE_BAD_REQUEST_DATA} + Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} + + +*** Keywords *** +Create Entities ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${building_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -36,19 +53,7 @@ ${invalid_entity_type_two}= invalid_entity_type_two ... ${vehicle_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${entity_types_to_be_retrieved}= Catenate - ... SEPARATOR=, - ... ${invalid_entity_type_one} - ... ${invalid_entity_type_two} - ${response}= Query Entities entity_types=${entity_types_to_be_retrieved} - Check Response Status Code 400 ${response.status_code} - Check Response Body Containing ProblemDetails Element Containing Type Element set to - ... ${response.json()} - ... ${ERROR_TYPE_BAD_REQUEST_DATA} - Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - -*** Keywords *** Delete Entities Delete Entity by Id ${building_entity_id} Delete Entity by Id ${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 1068173edf1c0e2feafbc6d20a31ab5184c08b81..a61ec755870e5e935dbe6532d533c2fae843f1eb 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entities Suite Teardown Delete Entities @@ -20,6 +21,21 @@ ${invalid_entity_id_pattern}= invalid_entity_id_pattern** 019_03_03 Query several entities based on incorrect id pattern [Documentation] Check that one cannot query entities if the requested id pattern is incorrect [Tags] e-query 5_7_2 + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} + + ${response}= Query Entities + ... entity_id_pattern=${invalid_entity_id_pattern} + ... entity_types=${entity_types_to_be_retrieved} + + Check Response Status Code 400 ${response.status_code} + Check Response Body Containing ProblemDetails Element Containing Type Element set to + ... ${response.json()} + ... ${ERROR_TYPE_BAD_REQUEST_DATA} + Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} + + +*** Keywords *** +Create Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -34,18 +50,7 @@ ${invalid_entity_id_pattern}= invalid_entity_id_pattern** ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} - ${response}= Query Entities - ... entity_id_pattern=${invalid_entity_id_pattern} - ... entity_types=${entity_types_to_be_retrieved} - Check Response Status Code 400 ${response.status_code} - Check Response Body Containing ProblemDetails Element Containing Type Element set to - ... ${response.json()} - ... ${ERROR_TYPE_BAD_REQUEST_DATA} - Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - -*** Keywords *** Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${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 9871e7f63e1dae30a1c4ef4c0d1e55b3e83492dd..edd0084fc0d5c3d4f8351772c67c069c25371089 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entities Suite Teardown Delete Entities @@ -21,6 +22,19 @@ ${invalid_attribute_two}= type 019_03_04 Query several entities based on incorrect attribute names [Documentation] Check that one cannot query entities if the requested attribute names are incorrect [Tags] e-query 5_7_2 + ${attributes_to_be_retrieved}= Catenate SEPARATOR=, ${invalid_attribute_one} ${invalid_attribute_two} + + ${response}= Query Entities attrs=${attributes_to_be_retrieved} + + Check Response Status Code 400 ${response.status_code} + Check Response Body Containing ProblemDetails Element Containing Type Element set to + ... ${response.json()} + ... ${ERROR_TYPE_BAD_REQUEST_DATA} + Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} + + +*** Keywords *** +Create Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -35,16 +49,7 @@ ${invalid_attribute_two}= type ... ${second_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response2.status_code} - ${attributes_to_be_retrieved}= Catenate SEPARATOR=, ${invalid_attribute_one} ${invalid_attribute_two} - ${response}= Query Entities attrs=${attributes_to_be_retrieved} - Check Response Status Code 400 ${response.status_code} - Check Response Body Containing ProblemDetails Element Containing Type Element set to - ... ${response.json()} - ... ${ERROR_TYPE_BAD_REQUEST_DATA} - Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - -*** Keywords *** Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${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 522142183586c92b9279e9c1b0f835b5f889a0b6..570a7570122d02c172a27ea6df07a7fe6c5c1cc0 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entities Suite Teardown Delete Entities @@ -23,21 +24,8 @@ ${geoproperty}= location 019_03_05 Query entities when the request has a wrong geometryProperty [Documentation] Check that one cannot query entities 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} - ${create_response1}= Create Entity Selecting Content Type - ... ${filename} - ... ${first_entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response1.status_code} - ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} - Set Suite Variable ${second_entity_id} - ${create_response2}= Create Entity Selecting Content Type - ... ${filename} - ... ${second_entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response2.status_code} ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} + ${response}= Query Entities ... entity_types=${entity_types_to_be_retrieved} ... geoproperty=${geoproperty} @@ -45,6 +33,7 @@ ${geoproperty}= location ... geometry=${geometry} ... coordinates=${coordinates} ... context=${ngsild_test_suite_context} + Check Response Status Code 400 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to ... ${response.json()} @@ -53,6 +42,22 @@ ${geoproperty}= location *** Keywords *** +Create Entities + ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${first_entity_id} + ${create_response1}= Create Entity Selecting Content Type + ... ${filename} + ... ${first_entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response1.status_code} + ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${second_entity_id} + ${create_response2}= Create Entity Selecting Content Type + ... ${filename} + ... ${second_entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} + Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${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 b729cb9588d5cf7017e1a1a999f4c9d3e79b484f..4a1110498d6028073b6f1ed9892b89a34149f5de 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entities Suite Teardown Delete Entities @@ -21,6 +22,24 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building 019_04_01 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 + @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} + ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} + + ${response}= Query Entities + ... entity_ids=${entities_ids_to_be_retrieved} + ... entity_types=${entity_types_to_be_retrieved} + ... options=${options_parameter} + + Check Response Status Code 200 ${response.status_code} + Check Response Body Containing List Containing Entity Elements + ... ${expectation_filename} + ... ${entities_ids_to_be_compared} + ... ${response.json()} + + +*** Keywords *** +Create Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -42,21 +61,7 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building ... ${third_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response3.status_code} - @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id} - ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} - ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} - ${response}= Query Entities - ... entity_ids=${entities_ids_to_be_retrieved} - ... entity_types=${entity_types_to_be_retrieved} - ... options=${options_parameter} - Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity Elements - ... ${expectation_filename} - ... ${entities_ids_to_be_compared} - ... ${response.json()} - -*** Keywords *** Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${second_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 a963fa843776b3739704ba89b8532a078d43c62d..788e593cff42cf0c5fb1ca13987956bc7be5c906 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot @@ -23,11 +23,13 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building [Tags] e-query 6_3_7 ${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} + ${response}= Query Entities ... entity_ids=${entities_ids_to_be_retrieved} ... entity_types=${entity_types_to_be_retrieved} ... accept=${CONTENT_TYPE_GEOJSON} ... context=${ngsild_test_suite_context} + Check Response Status Code 200 ${response.status_code} Check Response Body Content ... expectation_filename=${expectation_filename} 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 8d136195c84d0c831a3583db2ee355263d2a18b9..091bdce4544ef68537c4b6812e6773932170891d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entities Suite Teardown Delete Entities @@ -20,6 +21,25 @@ ${limit}= 2 019_06_01 Query entities specifying a maximum number of results [Documentation] Check that one can query entities specifying a maximum number of results [Tags] e-query 6_3_10 + ${entities_ids_to_be_retrieved}= Catenate + ... SEPARATOR=, + ... ${first_entity_id} + ... ${second_entity_id} + ... ${third_entity_id} + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} + + ${response}= Query Entities + ... entity_ids=${entities_ids_to_be_retrieved} + ... entity_types=${entity_types_to_be_retrieved} + ... limit=${limit} + + Check Response Status Code 200 ${response.status_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()} + + +*** Keywords *** +Create Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} ${create_response1}= Create Entity Selecting Content Type @@ -41,22 +61,7 @@ ${limit}= 2 ... ${third_entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response3.status_code} - ${entities_ids_to_be_retrieved}= Catenate - ... SEPARATOR=, - ... ${first_entity_id} - ... ${second_entity_id} - ... ${third_entity_id} - ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type} - ${response}= Query Entities - ... entity_ids=${entities_ids_to_be_retrieved} - ... entity_types=${entity_types_to_be_retrieved} - ... limit=${limit} - Check Response Status Code 200 ${response.status_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()} - -*** Keywords *** Delete Entities Delete Entity by Id ${first_entity_id} Delete Entity by Id ${second_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 cada5b4b7aacf5cdb1557332d74eac836b28ee44..b6884f885f377e829d57920f489493a5f3abed93 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entity Suite Teardown Delete Created Entity @@ -19,16 +20,10 @@ ${expectation_filename}= building-simple-attributes-expectation.jsonld 018_01_01 Get an entity by id [Documentation] Check that one 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} - ${create_response}= Create Entity Selecting Content Type - ... ${filename} - ... ${entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response.status_code} ${response}= Query Entity ... id=${entity_id} ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 200 ${response.status_code} Check Response Body Containing Entity element ... ${expectation_filename} @@ -38,5 +33,14 @@ ${expectation_filename}= building-simple-attributes-expectation.jsonld *** Keywords *** +Create Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} + ${create_response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + Delete Created Entity Delete Entity by Id ${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 986ba73f5fe418b65d84bd445730d52ed4dfe73f..6a01d3c81a563fddba1267ad47232f2606c78d93 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entity Suite Teardown Delete Created Entity @@ -21,21 +22,16 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego 018_01_02 Query some attributes from an entity [Documentation] Check that one 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} - ${create_response}= Create Entity Selecting Content Type - ... ${filename} - ... ${entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response.status_code} ${attributes_to_be_retrieved}= Catenate ... SEPARATOR=, ... ${attribute_airqualitylevel} ... ${attribute_subcategory} + ${response}= Query Entity ... id=${entity_id} ... accept=${CONTENT_TYPE_LD_JSON} ... attrs=${attributes_to_be_retrieved} + Check Response Status Code 200 ${response.status_code} Check Response Body Containing Entity element ... ${expectation_filename} @@ -45,5 +41,14 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego *** Keywords *** +Create Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} + ${create_response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + Delete Created Entity Delete Entity by Id ${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 d4a7b7d2f77c784c1be0296bb2409f73d0b6e15b..0feda2c3e2ae30552136df40413e8f0409ea6805 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entity Suite Teardown Delete Created Entity @@ -20,17 +21,11 @@ ${geometry_property}= location 018_01_03 Query the geometry property from an entity [Documentation] Check that one 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} - ${create_response}= Create Entity Selecting Content Type - ... ${filename} - ... ${entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response.status_code} ${response}= Query Entity ... id=${entity_id} ... accept=${CONTENT_TYPE_LD_JSON} ... geoproperty=${geometry_property} + Check Response Status Code 200 ${response.status_code} Check Response Body Containing Entity element ... ${expectation_filename} @@ -40,5 +35,14 @@ ${geometry_property}= location *** Keywords *** +Create Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} + ${create_response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + Delete Created Entity Delete Entity by Id ${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 97a351242f43be8e4868873d42771728995305d8..06d51d197d30e4d8f38eed49634d2c6caa3effa6 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 @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Entity Suite Teardown Delete Created Entity @@ -19,18 +20,13 @@ ${attribute_not_known}= property_not_found 018_03_02 Get an entity if an attribute is not known to the system [Documentation] Check that one cannot get an entity if an attribute is not known to the system [Tags] e-retrieve 5_7_1 - ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Set Suite Variable ${entity_id} - ${create_response}= Create Entity Selecting Content Type - ... ${filename} - ... ${entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response.status_code} ${attributes_to_be_retrieved}= Catenate SEPARATOR=, ${attribute_not_known} + ${response}= Query Entity ... id=${entity_id} ... accept=${CONTENT_TYPE_LD_JSON} ... attrs=${attributes_to_be_retrieved} + Check Response Status Code 404 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to ... ${response.json()} @@ -39,5 +35,14 @@ ${attribute_not_known}= property_not_found *** Keywords *** +Create Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} + ${create_response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + Delete Created Entity Delete Entity by Id ${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 370df415521b3f68716738bea1f82faed50dc473..741f05a8ded0e1d004141a4161309ceed1ae6f7d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Setup Create Entity Test Teardown Delete Created Entity @@ -20,17 +21,11 @@ ${options_parameter}= keyValues 018_04_01 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 Test Variable ${entity_id} - ${create_response}= Create Entity Selecting Content Type - ... ${filename} - ... ${entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response.status_code} ${response}= Query Entity ... id=${entity_id} ... accept=${CONTENT_TYPE_LD_JSON} ... options=${options_parameter} + Check Response Status Code 200 ${response.status_code} Check Response Body Containing Entity element ... ${expectation_filename} @@ -40,5 +35,14 @@ ${options_parameter}= keyValues *** Keywords *** +Create Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Test Variable ${entity_id} + ${create_response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + Delete Created Entity Delete Entity by Id ${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 a06f8909dfc038ec7ff28d43e9fd78f351888145..f6c6094a4a0f4e3d019ec8ad93175f7f7453eea8 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot @@ -44,6 +44,7 @@ Create Initial Entity ... ${filename} ... ${entity_id} ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} Delete Created Entity Delete Entity by Id ${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 ffff142dd9643751738fd89fd337b692d3dcf77c..6ed378ef83eddf639c179ad2d315472e7cc13625 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot @@ -40,11 +40,12 @@ Review JSON-LD Resolution When retrieving an entity Setup Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity Selecting Content Type + ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} ... ${CONTENT_TYPE_JSON} ... context=${ngsild_test_suite_context} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${entity_id} Delete Created Entity 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 1c08596b775371f5c5499160abc7741f3b78aba0..680cc1f62b207edfbf068652e33a1ff0c3f8470d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot @@ -33,11 +33,13 @@ Query the temporal evolution of entities [Documentation] Check that one can query the temporal evolution of entities [Arguments] ${timerel} ${timeat} ${expectation_file} ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle + ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... timerel=${timerel} ... timeAt=${timeat} ... context=${ngsild_test_suite_context} + @{temporal_entities_representation_ids}= Create List ... ${first_temporal_entity_representation_id} ... ${second_temporal_entity_representation_id} @@ -49,17 +51,22 @@ Query the temporal evolution of entities Setup Initial Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${third_temporal_entity_representation_id}= Generate Random Entity Id ${bus_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Test Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Create Temporal Representation Of Entity ${bus_payload_file} ${third_temporal_entity_representation_id} - Set Test Variable ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_temporal_entity_representation_id} + ${third_temporal_entity_representation_id}= Generate Random Entity Id ${bus_id_prefix} + ${create_response3}= Create Temporal Representation Of Entity + ... ${bus_payload_file} + ... ${third_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response3.status_code} Set Test Variable ${third_temporal_entity_representation_id} Delete Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot index 91b5c64deac343a100ba34edd3bd167152004c4e..74459370f7bf4b972f918bfc926c9c25457657fe 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot @@ -23,12 +23,14 @@ ${expectation_file}= vehicles-temporal-representation-021-02-expe [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle ${temporal_attributes_to_be_retrieved}= Catenate SEPARATOR=, speed + ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... timerel=after ... timeAt=2020-07-01T12:05:00Z ... attrs=${temporal_attributes_to_be_retrieved} ... context=${ngsild_test_suite_context} + @{temporal_entities_representation_ids}= Create List ... ${first_temporal_entity_representation_id} ... ${second_temporal_entity_representation_id} @@ -42,14 +44,16 @@ ${expectation_file}= vehicles-temporal-representation-021-02-expe *** Keywords *** Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_temporal_entity_representation_id} Delete Initial Temporal Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot index 4d8e3885a25fd14647755194ef00def873dd83c4..c8ddcc82d9b6b0c8964580b3c10248e1a1d958dc 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot @@ -22,12 +22,14 @@ ${expectation_file}= vehicles-temporal-representation-021-03-expe [Documentation] Check that one can query the temporal evolution of the last N instances of entities attributes [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle + ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... timerel=after ... timeAt=2020-07-01T12:05:00Z ... lastN=${14} ... context=${ngsild_test_suite_context} + @{temporal_entities_representation_ids}= Create List ... ${first_temporal_entity_representation_id} ... ${second_temporal_entity_representation_id} @@ -41,14 +43,16 @@ ${expectation_file}= vehicles-temporal-representation-021-03-expe *** Keywords *** Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_temporal_entity_representation_id} Delete Initial Temporal Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot index 57817f32f79f4f3e63322619ea46a9e56c0be103..6f353cf7bb8b0cddc4f6969ddedb08cf50174d55 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot @@ -22,11 +22,13 @@ ${expectation_file}= vehicles-temporal-representation-021-04-expe [Documentation] Check that one can query the temporal evolution of entities using a context [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle + ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... timerel=after ... timeAt=2020-07-01T12:05:00Z ... context=${ngsild_test_suite_context} + @{temporal_entities_representation_ids}= Create List ... ${first_temporal_entity_representation_id} ... ${second_temporal_entity_representation_id} @@ -40,14 +42,16 @@ ${expectation_file}= vehicles-temporal-representation-021-04-expe *** Keywords *** Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_temporal_entity_representation_id} Delete Initial Temporal Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot index b9c607ce6b606297152e7009ecec974bd8487523..d83f3598b79b7e2ce47dee64a7aefbe4fb4619c9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot @@ -23,11 +23,13 @@ ${expectation_file}= vehicles-temporal-representation-021-05-expectation. [Documentation] Check that one can query the temporal evolution of entities matching the given type(s) [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Bus + ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... timerel=after ... timeAt=2020-07-01T12:05:00Z ... context=${ngsild_test_suite_context} + @{temporal_entities_representation_ids}= Create List ${second_temporal_entity_representation_id} Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing EntityTemporal elements @@ -39,10 +41,16 @@ ${expectation_file}= vehicles-temporal-representation-021-05-expectation. *** Keywords *** Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${bus_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity ${bus_payload_file} ${second_temporal_entity_representation_id} + ${create_response1}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response1.status_code} Set Suite Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${bus_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity + ... ${bus_payload_file} + ... ${second_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_temporal_entity_representation_id} Delete Initial Temporal Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot index 1abc48254bcdf6382fc28f542c9ba3086aa34729..76ee9cb8f887fb5bebc1d0fe5c68850162fc514c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot @@ -23,12 +23,14 @@ ${expectation_file}= vehicles-temporal-representation-021-06-expe [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle ${entity_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_temporal_entity_representation_id} + ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... entity_ids=${entity_ids_to_be_retrieved} ... timerel=after ... timeAt=2020-07-01T12:05:00Z ... context=${ngsild_test_suite_context} + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing EntityTemporal elements @@ -40,14 +42,16 @@ ${expectation_file}= vehicles-temporal-representation-021-06-expe *** Keywords *** Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_temporal_entity_representation_id} Delete Initial Temporal Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot index a937da61e4c327ccd7d6f0a738f899831bfc799c..630c7d6eaab81eb89fb81136a3ea6e6ea145e7ac 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot @@ -22,12 +22,14 @@ ${expectation_file}= vehicles-temporal-representation-021-07-expe [Documentation] Check that one can query the temporal evolution of entities matching the given id pattern [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle + ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... entity_id_pattern=urn:ngsi-ld:Vehicle:.* ... timerel=after ... timeAt=2020-07-01T12:05:00Z ... context=${ngsild_test_suite_context} + @{temporal_entities_representation_ids}= Create List ... ${first_temporal_entity_representation_id} ... ${second_temporal_entity_representation_id} @@ -41,14 +43,16 @@ ${expectation_file}= vehicles-temporal-representation-021-07-expe *** Keywords *** Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_temporal_entity_representation_id} Delete Initial Temporal Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot index 7dec5616bd613e1c29051fce02c6bdaa60c96ea7..164cfcdf0c8cf95593231c161b2bfda4e811264c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot @@ -22,12 +22,14 @@ ${expectation_file}= vehicles-temporal-representation-021-08-expe [Documentation] Check that one can query the temporal evolution of entities matching the given NGSI-LD query [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle + ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... ngsild_query=speed>90 ... timerel=after ... timeAt=2020-07-01T12:05:00Z ... context=${ngsild_test_suite_context} + @{temporal_entities_representation_ids}= Create List ... ${first_temporal_entity_representation_id} ... ${second_temporal_entity_representation_id} @@ -41,14 +43,16 @@ ${expectation_file}= vehicles-temporal-representation-021-08-expe *** Keywords *** Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Suite Variable ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_temporal_entity_representation_id} Delete Initial Temporal Entities 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 0c2a0f2392701259f61d1225364fc149f7fc1a97..179afc14523099448a2065eb67e3c7f306b76b19 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot @@ -32,6 +32,7 @@ Query the temporal evolution of entities matching the given NGSI-LD geo-query [Documentation] Check that one can query the temporal evolution of entities matching the given NGSI-LD geo-query [Arguments] ${georel} ${geometry} ${coordinates} ${geoproperty} ${expectation_file} ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle + ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... georel=${georel} @@ -41,6 +42,7 @@ Query the temporal evolution of entities matching the given NGSI-LD geo-query ... timerel=after ... timeAt=2020-07-01T12:05:00Z ... context=${ngsild_test_suite_context} + @{temporal_entities_representation_ids}= Create List ${second_temporal_entity_representation_id} Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing EntityTemporal elements @@ -50,14 +52,16 @@ Query the temporal evolution of entities matching the given NGSI-LD geo-query Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Test Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Test Variable ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_temporal_entity_representation_id} Delete Initial Temporal Entities 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 f373dd131e3e9822a6ebe672cecb106bdd720572..fab5d56577ebc048edc16d4bc57e24336e35d3be 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot @@ -42,19 +42,22 @@ Query the temporal evolution of entities with a limit to the number of entities Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${third_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Test Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response2.status_code} + Set Test Variable ${second_temporal_entity_representation_id} + ${third_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response3}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${third_temporal_entity_representation_id} - Set Test Variable ${first_temporal_entity_representation_id} - Set Test Variable ${second_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response3.status_code} Set Test Variable ${third_temporal_entity_representation_id} Delete Initial Temporal Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot index 0c8be253f66aecc1d22eec96efcd24056502a48b..7a84dbf6be618ef659bd660964b12a75487e74ba 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot @@ -33,7 +33,10 @@ ${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.json *** Keywords *** Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity 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 a33e31159603b15067207a0d38b214b580f19a45..68af125391734f2365a99d6e493e665af32febf2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot @@ -44,14 +44,16 @@ Query the temporal evolution of entities using the entityOperations method Setup Initial Temporal Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Test Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Set Test Variable ${first_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_temporal_entity_representation_id} Delete Initial Temporal Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot index ed2488f23887fc82d6c368a08e1bcdc5f63e1e39..434d2f5966f939d111ae9ed0f6044acc0d8560c9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot @@ -50,19 +50,22 @@ Query the temporal evolution of entities Setup Initial Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - ${third_temporal_entity_representation_id}= Generate Random Entity Id ${bus_id_prefix} - Create Temporal Representation Of Entity + ${create_response1}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response1.status_code} + Set Test Variable ${first_temporal_entity_representation_id} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${create_response2}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${create_response2.status_code} + Set Test Variable ${second_temporal_entity_representation_id} + ${third_temporal_entity_representation_id}= Generate Random Entity Id ${bus_id_prefix} + ${create_response3}= Create Temporal Representation Of Entity ... ${bus_payload_file} ... ${third_temporal_entity_representation_id} - Set Test Variable ${first_temporal_entity_representation_id} - Set Test Variable ${second_temporal_entity_representation_id} + Check Response Status Code 201 ${create_response3.status_code} Set Test Variable ${third_temporal_entity_representation_id} Delete Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot index 5ad471d50ff38f41d521ebf2e9b69cc760bbed30..26606fce2a42083b013089731ca3c6ca1f22daed 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot @@ -32,7 +32,10 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-01-expectati *** Keywords *** Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot index acdd9fe5fcb22156b5fdd8a2a80827050b03d458..09a5c1f2f443ab0e0ded0c3ccbbf6697e9153172 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot @@ -33,7 +33,10 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-02-expectati *** Keywords *** Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot index 8c75629c748483b126a5f8da7ac91bd37f904a89..3642e4fc325d5f47712407ec9e6e99c8536c748b 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot @@ -35,7 +35,10 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-03-expectati *** Keywords *** Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity 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 8b01da9286be0d33951cc37eecc17d1f9eae22d2..6e540f289268a69b882faad00c9455810b7cef7e 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot @@ -46,7 +46,10 @@ Retrieve the temporal evolution of an entity matching the given NGSI-LD temporal Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity 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 9375ae08aad5a73d5dd63d3615b9a88bc4817eb0..a093e1325606ca6e5d41ca90dbec37f719c843b7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot @@ -41,7 +41,10 @@ Retrieve the temporal evolution of the last N instances of entity attributes Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot index 29374deb889813df81854367e4d1ac8761b76763..512691e2c6f89cf6b60324f84f0a63d5fb377ebb 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot @@ -34,7 +34,10 @@ ${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.json *** Keywords *** Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity 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 9c4200fbb52e5b95705055c52472675e823992a4..917806116f0fea2f9f6ad46cf4018137680e4fe5 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot @@ -45,7 +45,10 @@ Retrieve the temporal evolution of an entity with an invalid request content Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot index c549ec1d37bdf1a698b95208448a6e0ce83d2feb..3804078de2450244a0ce6f2455c38fc306b79d14 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot @@ -35,7 +35,10 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-10-expectati *** Keywords *** Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_11.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_11.robot index b4c20e90b689a7f56c9f7cbfaf5f0b765903d405..fe81ed1d621474d2fdc277286fa4e1ab0e636945 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_11.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_11.robot @@ -51,7 +51,10 @@ Retrieve the temporal evolution of an entity with the aggregated temporal repres Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_12.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_12.robot index 8bfa8d24bcdb5619900cd44dce26715ebb15c406..d995a82725a3153dd32a49aabc78433291b06367 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_12.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_12.robot @@ -41,7 +41,10 @@ Retrieve Temporal Entity Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} - Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity 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 d6b9ac5f905175de9fa3da6f1a8df18e6bcb22c3..85545c9bc31b2977a4cc6a1825f3f1efd0bd2ad9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot @@ -38,15 +38,15 @@ Batch Create Entity Scenarios ${first_entity}= Load Entity ${filename} ${first_entity_id} ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_to_be_created}= Create List ${first_entity} ${second_entity} + @{expected_entities_ids}= Create List ${first_entity_id} ${second_entity_id} + Set Test Variable @{expected_entities_ids} + ${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} + ${entities_to_be_queried}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} Check Response Body Containing Array Of URIs set to ${expected_entities_ids} ${response.json()} - ${response1}= Query Entities ... entity_ids=${entities_to_be_queried} ... entity_types=Building 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 a9362c817df087b98e6d0b533274db8cd8f80f78..13b39dbcd29e3436d275dfaf4de77ba329560a96 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot @@ -27,13 +27,15 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${second_entity}= Load Entity building-minimal-sample.jsonld ${second_entity_id} ${already_existing_entity}= Load Entity building-minimal-sample.jsonld ${existing_entity_id} @{entities_to_be_created}= Create List ${first_entity} ${second_entity} ${already_existing_entity} + ${response}= Batch Create Entities @{entities_to_be_created} + + Check Response Status Code 207 ${response.status_code} @{expected_successful_entities_ids}= Create List ${first_entity_id} ${second_entity_id} @{expected_failed_entities_ids}= Create List ${existing_entity_id} &{expected_batch_operation_result}= Create Batch Operation Result ... ${expected_successful_entities_ids} ... ${expected_failed_entities_ids} - Check Response Status Code 207 ${response.status_code} Check Response Body Containing Batch Operation Result ${expected_batch_operation_result} ${response.json()} ${expected_entities_ids}= Catenate SEPARATOR=, @{expected_successful_entities_ids} ${response1}= Query Entities @@ -48,7 +50,8 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Keywords *** Setup Initial Entity ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity building-minimal-sample.jsonld ${existing_entity_id} + ${create_response}= Create Entity building-minimal-sample.jsonld ${existing_entity_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${existing_entity_id} Delete Initial Entities 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 996b2fd169a4b5d91f9f5f48783616a1f0e55d8d..3620cfd64b4808562f65eaac65d9694bd6852d30 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot @@ -22,12 +22,13 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Set Test 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} ... context=${ngsild_test_suite_context} - Check Response Status Code 201 ${response.status_code} + Check Response Status Code 201 ${response.status_code} ${response1}= Retrieve Entity by Id ... id=${entity_id} ... context=${ngsild_test_suite_context} @@ -44,12 +45,13 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Set Test 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} ... context=${ngsild_test_suite_context} - Check Response Status Code 201 ${response.status_code} + Check Response Status Code 201 ${response.status_code} ${response1}= Retrieve Entity by Id ... id=${entity_id} # Attribute should not be compacted as one did not provide a context containing this attribute 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 a449532bb680ddb6d62d578c0b2e319e84ee782f..2e1f63d75a8bdd072fc4456a3f43e450767c1f53 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot @@ -22,9 +22,10 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Set Test 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} - Check Response Status Code 201 ${response.status_code} + Check Response Status Code 201 ${response.status_code} ${response1}= Retrieve Entity by Id id=${entity_id} # Attribute should be compacted as one used the same default context as provided when creating the entity Check Response Body Containing an Attribute set to @@ -39,9 +40,10 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Set Test 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} - Check Response Status Code 201 ${response.status_code} + Check Response Status Code 201 ${response.status_code} ${response1}= Retrieve Entity by Id id=${entity_id} context=${ngsild_test_suite_context} # Attribute should not be compacted as one did not provide a context containing this term Check Response Body Containing an Attribute set to diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_06.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_06.robot index ca78572caad8a25bff8c7abb148a75e1ad2cf237..e8980eaf55af10c813de900bbb00cfa73c8974f1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_06.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_06.robot @@ -17,7 +17,9 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${entity_id}= Generate Random Entity Id ${building_id_prefix} ${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_JSON} + Check Response Status Code 400 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to ... ${response.json()} 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 f88f87341598f4e73fb34c00b713dbe6bef9f036..e84b5ba6575078474017739c9c4e8a31d12c4a32 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot @@ -21,7 +21,9 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Set Test 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} + Check Response Status Code 201 ${response.status_code} ${response1}= Retrieve Entity by Id ... id=${entity_id} @@ -38,7 +40,9 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Set Test 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} + Check Response Status Code 201 ${response.status_code} ${response1}= Retrieve Entity by Id ... id=${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_08.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_08.robot index b2ed544785150e10524737db5c8e3d84faf88286..d4eb3ed23c596a2cb377700f4966041a5cfe6a95 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_08.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_08.robot @@ -17,7 +17,9 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${entity_id}= Generate Random Entity Id ${building_id_prefix} ${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_LD_JSON} + Check Response Status Code 400 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_09.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_09.robot index 18e4929671887c80ed3f067f2056865e01850831..a634b3949362c4b7bc5244fb0d031cd623fa8fe2 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_09.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_09.robot @@ -17,10 +17,12 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${entity_id}= Generate Random Entity Id ${building_id_prefix} ${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} ... context=${ngsild_test_suite_context} + Check Response Status Code 400 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_10.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_10.robot index 72ffd6d83c90bbc31f71749169c41c06e7d0445a..d38303b6d497ca7ef4b7cf7c412ab59b7e4c1d25 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_10.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_10.robot @@ -27,13 +27,13 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${response}= Batch Create Entities @{entities_to_be_created} + Check Response Status Code 207 ${response.status_code} @{expected_successful_entities_ids}= Create List ${first_entity_id} ${second_entity_id} Set Test Variable @{expected_successful_entities_ids} @{expected_failed_entities_ids}= Create List ${first_entity_id} &{expected_batch_operation_result}= Create Batch Operation Result ... ${expected_successful_entities_ids} ... ${expected_failed_entities_ids} - Check Response Status Code 207 ${response.status_code} Check Response Body Containing Batch Operation Result ${expected_batch_operation_result} ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot index 0858a19881736ee6addd46679e68498bf5d26b12..9c488889c4e90f9badb3d778352b70799b43ceb1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot @@ -18,8 +18,8 @@ ${building_id_prefix}= urn:ngsi-ld:Building: [Documentation] Check that one can delete a batch of entities [Tags] be-delete 5_6_10 ${response}= Batch Delete Entities entities_ids_to_be_deleted=@{entities_ids_to_be_deleted} - Check Response Status Code 204 ${response.status_code} + Check Response Status Code 204 ${response.status_code} ${expected_entities_ids}= Catenate SEPARATOR=, @{entities_ids_to_be_deleted} ${response1}= Query Entities ... entity_ids=${expected_entities_ids} @@ -31,8 +31,10 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${create_response1}= Create Entity building-simple-attributes-sample.jsonld ${first_entity_id} + Check Response Status Code 201 ${create_response1.status_code} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity building-simple-attributes-sample.jsonld ${first_entity_id} - Create Entity building-simple-attributes-sample.jsonld ${second_entity_id} + ${create_response2}= Create Entity building-simple-attributes-sample.jsonld ${second_entity_id} + Check Response Status Code 201 ${create_response2.status_code} @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} Set Test Variable ${entities_ids_to_be_deleted} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot index a7a21efb316b85b23007732905e283d412394fe1..52ebe3e6c5602d9b9d8917d947ef3ea6882ea55a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot @@ -21,14 +21,14 @@ ${building_id_prefix}= urn:ngsi-ld:Building: @{entities_ids_to_be_deleted}= Create List ${existing_entity_id} ${new_entity_id} ${response}= Batch Delete Entities entities_ids_to_be_deleted=@{entities_ids_to_be_deleted} + + Check Response Status Code 207 ${response.status_code} @{expected_successful_entities_ids}= Create List ${existing_entity_id} @{expected_failed_entities_ids}= Create List ${new_entity_id} Set Test Variable ${expected_successful_entities_ids} - &{response1}= Create Batch Operation Result ... ${expected_successful_entities_ids} ... ${expected_failed_entities_ids} - Check Response Status Code 207 ${response.status_code} Check Response Body Containing Batch Operation Result ${response1} ${response.json()} ${expected_entities_ids}= Catenate SEPARATOR=, @{expected_successful_entities_ids} @@ -42,5 +42,6 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Keywords *** Setup Initial Entity ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity building-simple-attributes-sample.jsonld ${existing_entity_id} + ${create_response}= Create Entity building-simple-attributes-sample.jsonld ${existing_entity_id} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${existing_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_04.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_04.robot index 6bc4a30d07c95a4a175def3f88f44f4fb61d71c9..34d343bbf1e856ae03af52486eddb3d687a88877 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_04.robot @@ -22,17 +22,18 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${response}= Batch Delete Entities entities_ids_to_be_deleted=@{entities_ids_to_be_deleted} + Check Response Status Code 207 ${response.status_code} @{expected_successful_entities_ids}= Create List ${entity_id} @{expected_failed_entities_ids}= Create List ${entity_id} &{response1}= Create Batch Operation Result ... ${expected_successful_entities_ids} ... ${expected_failed_entities_ids} - Check Response Status Code 207 ${response.status_code} Check Response Body Containing Batch Operation Result ${response1} ${response.json()} *** Keywords *** Setup Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity building-simple-attributes-sample.jsonld ${entity_id} + ${create_response}= Create Entity building-simple-attributes-sample.jsonld ${entity_id} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot index 96a320449d0b4c3b1f639a515084e910272cebcf..eca48d12baf7826d6838134f6ffc3aa73745d783 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot @@ -36,7 +36,9 @@ Batch Update Entity Scenarios ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_ids_to_be_updated}= Create List ${first_entity_id} ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} + ${response}= Batch Update Entities @{entities_to_be_updated} + Check Response Status Code 204 ${response.status_code} ${first_created_entity}= Load Test Sample entities/${entity_payload_filename} ${first_entity_id} ${second_created_entity}= Load Test Sample entities/${entity_payload_filename} ${second_entity_id} @@ -54,10 +56,12 @@ Batch Update Entity Scenarios Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${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} + ${create_response1}= Create Entity ${entity_payload_filename} ${first_entity_id} + Check Response Status Code 201 ${create_response1.status_code} Set Test Variable ${first_entity_id} + ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${create_response2}= Create Entity ${entity_payload_filename} ${second_entity_id} + Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_entity_id} Delete Initial Entities 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 46ae55f45a9eac36baec781f7108599eeeee5b03..0312fe8759c21b4fe1d080cbe93ce032a9ddc1a4 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot @@ -36,7 +36,9 @@ Batch Update Entity With NoOverwrite Option Scenarios ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} @{entities_ids_to_be_updated}= Create List ${first_entity_id} ${second_entity_id} + ${response}= Batch Update Entities @{entities_to_be_updated} overwrite_option=noOverwrite + Check Response Status Code ${expected_status} ${response.status_code} ${first_created_entity}= Load Test Sample entities/${entity_payload_filename} ${first_entity_id} ${second_created_entity}= Load Test Sample entities/${entity_payload_filename} ${second_entity_id} @@ -54,10 +56,12 @@ Batch Update Entity With NoOverwrite Option Scenarios Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${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} + ${create_response1}= Create Entity ${entity_payload_filename} ${first_entity_id} + Check Response Status Code 201 ${create_response1.status_code} Set Test Variable ${first_entity_id} + ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${create_response2}= Create Entity ${entity_payload_filename} ${second_entity_id} + Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_entity_id} Delete Initial Entities 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 02fe8b83bc2bb81c441f3c350c380b883a9e4bb7..81bbaba35b2910644d7ae8c70ad422d38b8390f7 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot @@ -31,6 +31,7 @@ ${update_fragment_filename}= fragmentEntities/simple-attributes-relationship- @{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} @@ -61,10 +62,12 @@ ${update_fragment_filename}= fragmentEntities/simple-attributes-relationship- *** Keywords *** Setup Initial Entities ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} - ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity ${entity_payload_filename} ${first_existing_entity_id} - Create Entity ${entity_payload_filename} ${second_existing_entity_id} + ${create_response1}= Create Entity ${entity_payload_filename} ${first_existing_entity_id} + Check Response Status Code 201 ${create_response1.status_code} Set Suite Variable ${first_existing_entity_id} + ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${create_response2}= Create Entity ${entity_payload_filename} ${second_existing_entity_id} + Check Response Status Code 201 ${create_response2.status_code} Set Suite Variable ${second_existing_entity_id} Delete Initial Entities 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 f3605ba9740314ad1dae9121335a5629fafd62fd..809ee1fcb571379132fd9c87c7df744ec5f1a943 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot @@ -35,7 +35,9 @@ Batch Upsert Entity Scenarios ${first_entity}= Load Entity ${filename} ${first_entity_id} ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_to_be_upserted}= Create List ${first_entity} ${second_entity} + ${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} 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 ca888974df62496a805ab825888b243da5b0c4b2..ca99756b7828dc413c48058fa92c2babf6a7f879 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot @@ -30,8 +30,10 @@ ${building_id_prefix}= urn:ngsi-ld:Building: Batch Upsert Non-existing And Existing Entities Scenarios [Documentation] Check that one can upsert a batch of non-existing and existing entities [Arguments] ${filename} - Setup Initial Entities ${filename} + Prepare Entities To Upsert ${filename} + ${response}= Batch Upsert Entities @{entities_to_be_upserted} + @{expected_entities_ids}= Create List ${new_entity_id} Check Response Status Code 201 ${response.status_code} Check Response Body Containing Array Of URIs set to ${expected_entities_ids} ${response.json()} @@ -47,7 +49,7 @@ Batch Upsert Non-existing And Existing Entities Scenarios ... accept=${CONTENT_TYPE_LD_JSON} Check Updated Resources Set To ${entities_to_be_upserted} ${response1.json()} -Setup Initial Entities +Prepare Entities To Upsert [Arguments] ${filename} ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} 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 78c6d316aa67511ee1543602f2300644e6b31d46..76410037e401883011e0c02b8a60eb6ac8a0ce7d 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot @@ -34,7 +34,9 @@ Batch Upsert Existing Entities Scenarios ${first_existing_entity}= Load Entity ${filename} ${first_existing_entity_id} ${second_existing_entity}= Load Entity ${filename} ${second_existing_entity_id} @{entities_to_be_upserted}= Create List ${first_existing_entity} ${second_existing_entity} + ${response}= Batch Upsert Entities @{entities_to_be_upserted} + Check Response Status Code 204 ${response.status_code} @{upserted_entities_ids}= Create List ${first_existing_entity_id} ${second_existing_entity_id} ${expected_updated_entities_ids}= Catenate SEPARATOR=, @{upserted_entities_ids} @@ -47,10 +49,12 @@ Batch Upsert Existing Entities Scenarios 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} + ${create_response1}= Create Entity building-minimal-sample.jsonld ${first_existing_entity_id} + Check Response Status Code 201 ${create_response1.status_code} Set Test Variable ${first_existing_entity_id} + ${second_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} + ${create_response2}= Create Entity building-minimal-sample.jsonld ${second_existing_entity_id} + Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${second_existing_entity_id} Delete Initial Entities 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 0776bdd7144824a59123dc02945ebed3a4efb70f..c96a4ed7582e8652fb4e0c74b5da3d828b013c5a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot @@ -38,9 +38,11 @@ Batch Upsert Entities With Update Option Scenarios ${existing_entity}= Load Entity ${filename} ${existing_entity_id} @{entities_to_be_upserted}= Create List ${new_entity} ${existing_entity} @{entities_ids_to_be_upserted}= Create List ${existing_entity_id} ${new_entity_id} + ${response}= Batch Upsert Entities @{entities_to_be_upserted} update_option=update - @{expected_entities_ids}= Create List ${new_entity_id} + Check Response Status Code 201 ${response.status_code} + @{expected_entities_ids}= Create List ${new_entity_id} Check Response Body Containing Array Of URIs set to ${expected_entities_ids} ${response.json()} ${old_entity}= Load Test Sample entities/${existing_entity_payload_filename} ${existing_entity_id} ${update_fragment}= Load Test Sample entities/${update_fragment_filename} @@ -56,7 +58,8 @@ Batch Upsert Entities With Update Option Scenarios Setup Initial Entity ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity ${existing_entity_payload_filename} ${existing_entity_id} + ${create_response}= Create Entity ${existing_entity_payload_filename} ${existing_entity_id} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${existing_entity_id} Delete Initial Entities diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot index 9d38256bd13bc6c9c9098f8970f9b37f3655427f..936cc776b715dc3f17122b8857473c093ee45b3f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot @@ -25,14 +25,16 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${third_entity}= Load Entity building-minimal-sample.jsonld ${third_entity_id} ${invalid_entity}= Remove Entity Type ${third_entity} @{entities_to_be_upserted}= Create List ${first_entity} ${second_entity} ${invalid_entity} + ${response}= Batch Upsert Entities @{entities_to_be_upserted} + + Check Response Status Code 207 ${response.status_code} @{expected_successful_entities_ids}= Create List ${first_entity_id} ${second_entity_id} Set Test Variable ${expected_successful_entities_ids} @{expected_failed_entities_ids}= Create List ${third_entity_id} &{expected_batch_operation_result}= Create Batch Operation Result ... success=${expected_successful_entities_ids} ... errors=${expected_failed_entities_ids} - Check Response Status Code 207 ${response.status_code} Check Response Body Containing Batch Operation Result ${expected_batch_operation_result} ${response.json()} ${expected_updated_entities_ids}= Catenate SEPARATOR=, @{expected_successful_entities_ids} ${response1}= Query Entities 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 a87fc5f200f6ed8a6765d8f1f653334518a1e547..d78c44d240249fbe36e033e11e014d3558f25632 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,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.re Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Setup Initial Entity Suite Teardown Delete Initial Entity @@ -18,24 +19,27 @@ ${content_type}= application/ld+json 001_03_01 Create one valid entity and one invalid entity [Documentation] Check that one 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} ... ${content_type} - Check Response Status Code 201 ${response.status_code} - ${response1}= Create Entity Selecting Content Type - ... ${filename} - ... ${entity_id} - ... ${content_type} - Check Response Status Code 409 ${response1.status_code} + + Check Response Status Code 409 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to - ... ${response1.json()} + ... ${response.json()} ... ${ERROR_TYPE_ALREADY_EXISTS} - Check Response Body Containing ProblemDetails Element Containing Title Element ${response1.json()} + Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} *** Keywords *** +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Suite Variable ${entity_id} + ${create_response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${content_type} + Check Response Status Code 201 ${create_response.status_code} + Delete Initial Entity Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_10.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_10.robot index a73e3b8ad2a5e880f7b7b00bf2c1d56134635870..6948bf84fb5390be82f271a5745bfda67f7472cc 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_10.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_10.robot @@ -26,10 +26,12 @@ Create Entity Scenarios [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} ... ${content_type} + Check Response Status Code 201 ${response.status_code} Check Response Headers Containing URI set to ${entity_id} ${response.headers} ${created_entity}= Load Test Sample entities/${filename} ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_11.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_11.robot index d527be3d33bdcdf2243f655c6a6f483f2cdc9e8e..b6341b02191bdb33f5999bbda6cbe0d79e6c8ed3 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_11.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_11.robot @@ -29,10 +29,12 @@ Create Entity Scenarios [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} ... ${content_type} + Check Response Status Code 201 ${response.status_code} Check Response Headers Containing URI set to ${entity_id} ${response.headers} ${created_entity}= Load Test Sample entities/${filename} ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot index 8705306c2530a3d9bad5ab34422155d7913b67dd..bc5210dd5346b6f12d9ae1634d95c66b15c1f6e3 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot @@ -6,6 +6,8 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Setup Setup Initial Entity + *** Variables *** ${building_id_prefix}= urn:ngsi-ld:Building: @@ -15,13 +17,18 @@ ${building_id_prefix}= urn:ngsi-ld:Building: 002_01_01 Delete an entity [Documentation] Check that one can delete an entity by id [Tags] e-delete 5_6_6 + ${response}= Delete Entity by Id ${entity_id} + Check Response Status Code 204 ${response.status_code} + ${response2}= Retrieve Entity by Id id=${entity_id} context=${ngsild_test_suite_context} + Check SUT Not Containing Resource ${response2.status_code} + + +*** Keywords *** +Setup Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} ${response}= Create Entity Selecting Content Type ... building-simple-attributes-sample.jsonld ... ${entity_id} ... application/ld+json Check Response Status Code 201 ${response.status_code} - ${response1}= Delete Entity by Id ${entity_id} - Check Response Status Code 204 ${response1.status_code} - ${response2}= Retrieve Entity by Id id=${entity_id} context=${ngsild_test_suite_context} - Check SUT Not Containing Resource ${response2.status_code} + Set Test Variable ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot index 17b358e783bf93bad5d131fbd7ebd68127eaf18d..9186b2dfc07cf937fe2e8e61dd02ff349748116f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_04.robot @@ -53,7 +53,7 @@ Create Initial Entity ... ${entity_id} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - Set Global Variable ${entity_id} + Set Test Variable ${entity_id} Delete Initial Entity Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_06.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_06.robot index b4e68831ba3b888ad0dcceb71a3b26ce18fef9ff..99a5f90842633fb3d690520c08425fd89c8a1bfa 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_06.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_06.robot @@ -37,11 +37,11 @@ Append Attributes Without Params Create Initial Entity ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - ${response}= Create Entity Selecting Content Type + ${create_response}= Create Entity Selecting Content Type ... ${filename} ... ${entity_id} ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${response.status_code} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} Delete Initial Entity 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 bc2b343a6341695eee13afdf006b1597bd7cf42c..eee8857ff011f0eea87b7e68764bffeab95248cf 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption. Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Setup Setup Initial Entity Test Teardown Delete Initial Entities Test Template Delete Attributes @@ -31,19 +32,13 @@ Delete Attributes [Documentation] Check that one can delete an attribute from an entity [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} - ${create_response}= Create Entity Selecting Content Type - ... ${filename} - ... ${entity_id} - ... ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response.status_code} ${response}= Delete Entity Attributes ... entityId=${entity_id} ... attributeId=${attribute_id} ... datasetId=${datasetId} ... deleteAll=${deleteAll} ... context=${ngsild_test_suite_context} + Check Response Status Code ${status_code} ${response.status_code} ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} ${response2}= Retrieve Entity by Id @@ -56,5 +51,14 @@ Delete Attributes ... response_body=${response2.json()} ... ignored_keys=${ignored_attributes} +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} + ${create_response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + Delete Initial Entities Delete Entity by Id ${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 6f17ab1e05ede393068c1b5f64fcf0e8a86905ee..213ceee0dc846cd9d7bd56ddf459884af05ce712 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot @@ -28,10 +28,12 @@ Create Temporal Entity [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=${temporal_entity_representation_id} ... filename=${filename} ... content_type=${content_type} + Check Response Status Code 201 ${response.status_code} ${created_temporal_entity}= Load Test Sample ... temporalEntities/${filename} 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 fe1d96f700e9a2f73a3736d820e5735f2fa75d58..0880d6b575dd3b056e235d1295d6cfc6d851827f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationCons Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Temporal Entity Suite Teardown Delete Temporal Entity @@ -20,18 +21,12 @@ ${expectation_filename}= vehicle-temporal-representation-update-expectation.j 008_01_01 Update a temporal representation of an entity with simple temporal properties [Documentation] Check that one 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=${temporal_entity_representation_id} - ... filename=${filename} - ... content_type=${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${response.status_code} - ${response1}= Create Or Update Temporal Representation Of Entity Selecting Content Type - ... temporal_entity_representation_id=${temporal_entity_representation_id} ... filename=${update_filename} ... content_type=${CONTENT_TYPE_LD_JSON} - Check Response Status Code 204 ${response1.status_code} + + Check Response Status Code 204 ${response.status_code} ${temporal_entity_expectation_payload}= Load Test Sample ... temporalEntities/expectations/${expectation_filename} ... ${temporal_entity_representation_id} @@ -47,5 +42,14 @@ ${expectation_filename}= vehicle-temporal-representation-update-expectation.j *** Keywords *** +Create Temporal Entity + ${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=${temporal_entity_representation_id} + ... filename=${filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} + Delete Temporal Entity Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot index 0a219652df77ca317d5b8dd52b10380124847b5e..0e550d27bccf1730486f99c0545b0c2db7a79fff 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_01.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationCons Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Temporal Entity Suite Teardown Delete Temporal Entity @@ -20,17 +21,11 @@ ${expectation_filename}= vehicle-temporal-representation-added-attribute-expe 014_01_01 Add an attribute to a temporal entity with simple temporal properties [Documentation] Check that one 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} - ${create_response}= Create Or Update Temporal Representation Of Entity Selecting Content Type - ... temporal_entity_representation_id=${temporal_entity_representation_id} - ... filename=${filename} - ... content_type=${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response.status_code} ${response}= Append Attribute To Temporal Entity ... ${temporal_entity_representation_id} ... ${fragment_filename} ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} ${temporal_entity_expectation_payload}= Load Test Sample ... temporalEntities/expectations/${expectation_filename} @@ -47,5 +42,14 @@ ${expectation_filename}= vehicle-temporal-representation-added-attribute-expe *** Keywords *** +Create Temporal Entity + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Suite Variable ${temporal_entity_representation_id} + ${create_response}= Create Or Update Temporal Representation Of Entity Selecting Content Type + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... filename=${filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + Delete Temporal Entity Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_02.robot index bd73ea21650e6db912edd31f44efb12487e9daa2..d522cb21a6ae0f24641895f1a6c4af7e81f91005 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_02.robot @@ -5,6 +5,8 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProv Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Setup Create Temporal Entity +Test Teardown Delete Temporal Entity Test Template Add Attribute To Temporal Entity @@ -27,12 +29,17 @@ Add Attribute To Temporal Entity [Documentation] Check that an error is raised if one adds a temporal entity attribute with a non-existing/invalid EntityId [Tags] tea-append 5_6_12 [Arguments] ${id} + ${response}= Append Attribute To Temporal Entity ${id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} + Check Response Status Code ${status_code} ${response.status_code} + +Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${temporal_entity_representation_id} ${create_response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ... temporal_entity_representation_id=${temporal_entity_representation_id} ... filename=${filename} ... content_type=${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${create_response.status_code} - ${response}= Append Attribute To Temporal Entity ${id} ${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} + +Delete Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_03.robot index f667654f27d68d1ea9bb36dccd53f24f59903681..dfca906bfe8a6bcebfa170f5f2a3379db23bce0c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_03.robot @@ -5,8 +5,6 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProv Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource -Suite Teardown Delete Temporal Entity - *** Variables *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -19,21 +17,9 @@ ${status_code}= 404 014_03_01 Add Attribute To Temporal Entity [Documentation] Check that an error is raised if one adds an attribute to a non-existent entity [Tags] tea-append 5_6_12 - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${temporal_entity_representation_id} - ${create_response}= Create Or Update Temporal Representation Of Entity Selecting Content Type - ... temporal_entity_representation_id=${temporal_entity_representation_id} - ... filename=${filename} - ... content_type=${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response.status_code} ${not_found_temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} ${response}= Append Attribute To Temporal Entity ... ${not_found_temporal_entity_representation_id} ... ${fragment_filename} ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response.status_code} - - -*** Keywords *** -Delete Temporal Entity - Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_04.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_04.robot index d525d4c69acc02228ff2a9a011c1262a0cfc9347..59e2245a064a946a2e60edd372efa74d4cdd5179 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AddAttributes/014_04.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Setup Initialize Test Case +Test Teardown Delete Temporal Entity Test Template Add an Attribute To a Temporal Entity From File @@ -35,7 +36,6 @@ Add an Attribute To a Temporal Entity From File Check Response Status Code ${status_code} ${response.status_code} Check Response Body Type When Using Session Request ${response.json()} ${ERROR_TYPE_INVALID_REQUEST} Check Response Body Title When Using Session Request ${response.json()} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} Initialize Test Case ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} @@ -45,3 +45,6 @@ Initialize Test Case ... filename=${filename} ... content_type=${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} + +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 e2da4a97edada62d39255fb3cfc4df120f3827fc..8f868ef9a68bd7dbdadbee9bb047deece6c1f73b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot @@ -39,6 +39,7 @@ Delete Attribute From A Temporal Entity ... datasetId=${datasetid} ... deleteAll=${deleteall} ... context=${ngsild_test_suite_context} + Check Response Status Code ${status_code} ${response.status_code} ${temporal_entity_expectation_payload}= Load Test Sample ... temporalEntities/expectations/${expectation_filename} 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 252acc57a2e3244fa79489027f0a064326bb51ac..25161e5ad020613c9e2f3466fc8530c7bb4ef07a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationCons Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Temporal Entity Suite Teardown Delete Temporal Entity @@ -20,24 +21,19 @@ ${expectation_filename}= vehicle-temporal-representation-delete-speed-instanc 017_01_01 Delete an attribute instance in temporal representation of an entity [Documentation] Check that one can delete an attribute instance in temporal representation of an entity [Tags] tea-instance-delete 5_6_15 - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${temporal_entity_representation_id} - ${create_response}= Create Or Update Temporal Representation Of Entity Selecting Content Type - ... temporal_entity_representation_id=${temporal_entity_representation_id} - ... filename=${filename} - ... content_type=${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${create_response.status_code} ${retrieve_response}= Retrieve Temporal Representation Of Entity ... temporal_entity_representation_id=${temporal_entity_representation_id} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${instanceId}= Set Variable ${retrieve_response.json()['speed'][0]['instanceId']} + ${response}= Delete Attribute Instance From Temporal Entity ... ${temporal_entity_representation_id} ... ${attributeId} ... ${instanceId} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} ${temporal_entity_expectation_payload}= Load Test Sample ... temporalEntities/expectations/${expectation_filename} @@ -54,5 +50,14 @@ ${expectation_filename}= vehicle-temporal-representation-delete-speed-instanc *** Keywords *** +Create Temporal Entity + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Suite Variable ${temporal_entity_representation_id} + ${create_response}= Create Or Update Temporal Representation Of Entity Selecting Content Type + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... filename=${filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} + 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 0f7bd6bc96f693808b7cd87d24d17091a1bb0361..97b944918ebc7b5d98876c749701abe9b06bee0f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot @@ -47,8 +47,6 @@ Create Id ... filename=${filename} ... content_type=${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Test Variable ${unknown_temporal_entity_id} ${response}= Retrieve Temporal Representation Of Entity ... ${temporal_entity_representation_id} ... accept=${CONTENT_TYPE_LD_JSON} @@ -56,6 +54,8 @@ Create Id ... context=${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response.json()['speed'][0]['instanceId']} Set Test Variable ${valid_instanceId} + ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${unknown_temporal_entity_id} Delete Initial Temporal Representation Of Entity Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot index d968821a5d70330a5f486ab9f9e77354d3509ece..1e9461fc2b6ccbc330598c74524fe775d19c114e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot @@ -6,6 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationCons Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Temporal Entity Suite Teardown Delete Intitial Temporal Representation Of Entity @@ -21,20 +22,11 @@ ${attributeId}= speed 016_01_01 Modify attribute instance in temporal representation of an entity [Documentation] Check that one can partially update an attribute instance of a temporal representation of an entity [Tags] tea-partial-update 5_6_14 - ${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=${temporal_entity_representation_id} - ... filename=${filename} - ... content_type=${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${response.status_code} - - ${response1}= Retrieve Temporal Representation Of Entity + ${response}= Retrieve Temporal Representation Of Entity ... temporal_entity_representation_id=${temporal_entity_representation_id} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - ${instanceId_before_update}= Set Variable ${response1.json()['speed'][0]['instanceId']} + ${instanceId_before_update}= Set Variable ${response.json()['speed'][0]['instanceId']} ${response2}= Modify Attribute Instance From Temporal Entity ... ${temporal_entity_representation_id} @@ -43,8 +35,8 @@ ${attributeId}= speed ... ${fragment_filename} ... ${CONTENT_TYPE_JSON} ... ${ngsild_test_suite_context} - Check Response Status Code 204 ${response2.status_code} + Check Response Status Code 204 ${response2.status_code} ${temporal_entity_expectation_payload}= Load Test Sample ... temporalEntities/expectations/${expectation_filename} ... ${temporal_entity_representation_id} @@ -67,5 +59,15 @@ ${attributeId}= speed *** Keywords *** +Create Temporal Entity + ${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=${temporal_entity_representation_id} + ... filename=${filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} + Delete Intitial Temporal Representation Of Entity Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot index 47a085106ecbbf971e9176b02404cc7160d9ca70..10d73b83900205f77c9e14a5351478b87bf33679 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot @@ -49,8 +49,6 @@ Create Id ... filename=${filename} ... content_type=${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} - ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Test Variable ${unknown_temporal_entity_id} ${response}= Retrieve Temporal Representation Of Entity ... ${temporal_entity_representation_id} ... accept=${CONTENT_TYPE_LD_JSON} @@ -58,6 +56,8 @@ Create Id ... context=${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response.json()['speed'][0]['instanceId']} Set Test Variable ${valid_instanceId} + ${unknown_temporal_entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${unknown_temporal_entity_id} Delete Temporal Entity Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot index f5b0dd6f444a1ddae79680e803f0af01148f2f87..ee7a99dd3bd363b9b0aa1c7886311a4c5bb9b584 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_04.robot @@ -5,6 +5,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Suite Setup Create Initial Subscription Suite Teardown Delete Initial Subscriptions @@ -17,16 +18,11 @@ ${subscription_payload_file_path}= subscriptions/subscription-sample.jsonld 028_04_01 Create a subscription with an id known to the system [Documentation] Check that one 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} - ${initial_response}= Create Subscription - ... ${subscription_id} - ... ${subscription_payload_file_path} - ... ${CONTENT_TYPE_LD_JSON} ${response}= Create Subscription ... ${subscription_id} ... ${subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 409 ${response.status_code} Check Response Body Containing ProblemDetails Element Containing Type Element set to ... ${response.json()} @@ -35,5 +31,14 @@ ${subscription_payload_file_path}= subscriptions/subscription-sample.jsonld *** Keywords *** +Create Initial Subscription + ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + Set Suite Variable ${subscription_id} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} + Delete Initial Subscriptions Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot index 5747e0b54400b4560bfb599b84458b8b5c0a7f33..abee53d568bbab68dc44a25ae64e7091238bcfd7 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot @@ -27,5 +27,9 @@ ${subscription_payload_file_path}= subscriptions/subscription-sample.jsonld *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot index d504b783c9e340753ee09c99540f63c88c44f8bb..bb64269b46ab119cfb25122ca7910b31161f1bca 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot @@ -36,22 +36,25 @@ ${expectation_file_path}= subscriptions/expectations/subsc *** Keywords *** Setup Initial Subscriptions ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${second_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${third_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription + ${create_response1}= Create Subscription ... ${first_subscription_id} ... ${first_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - Create Subscription + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${first_subscription_id} + ${second_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${create_response2}= Create Subscription ... ${second_subscription_id} ... ${second_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - Create Subscription + Check Response Status Code 201 ${create_response2.status_code} + Set Suite Variable ${second_subscription_id} + ${third_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${create_response3}= Create Subscription ... ${third_subscription_id} ... ${third_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - Set Suite Variable ${first_subscription_id} - Set Suite Variable ${second_subscription_id} + Check Response Status Code 201 ${create_response3.status_code} Set Suite Variable ${third_subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot index c3ca806b582862c1fc3ca35ef177e591a7098797..2d5995b05f0605b9180f5b8a35e18117f3f0af1c 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot @@ -47,22 +47,25 @@ Query Subscriptions With Limit And Page Parameters Setup Initial Subscriptions ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${second_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - ${third_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription + ${create_response1}= Create Subscription ... ${first_subscription_id} ... ${first_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - Create Subscription + Check Response Status Code 201 ${create_response1.status_code} + Set Test Variable ${first_subscription_id} + ${second_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${create_response2}= Create Subscription ... ${second_subscription_id} ... ${second_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - Create Subscription + Check Response Status Code 201 ${create_response2.status_code} + Set Test Variable ${second_subscription_id} + ${third_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} + ${create_response3}= Create Subscription ... ${third_subscription_id} ... ${third_subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - Set Test Variable ${first_subscription_id} - Set Test Variable ${second_subscription_id} + Check Response Status Code 201 ${create_response3.status_code} Set Test Variable ${third_subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot index cfc21f76677741cebe46044da09e290f8731139e..b365e3706804ea611cbbcb9539594b0e4d5f10c6 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot @@ -32,7 +32,11 @@ ${expectation_file_path}= subscriptions/expectations/subscriptions *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot index aebf283097ac0dfb438a6b189d0f100071b0d4c7..12f6fcfdf5cad5fd047437aa0fdbfa8bd7674e58 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_01.robot @@ -25,10 +25,6 @@ ${notification_server_send_url}= http://${notification_server_host}:${not [Documentation] Check that a notification is only sent if and only if the status is active [Tags] sub-notification 5_8_6 - Add Initial Entity - Sleep 1s - Setup Initial Subscriptions - ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} ${notification} ${headers}= Wait for notification timeout=${10} @@ -41,10 +37,14 @@ ${notification_server_send_url}= http://${notification_server_host}:${not *** Keywords *** Before Test Start Local Server ${notification_server_host} ${notification_server_port} + Add Initial Entity + Sleep 1s + Setup Initial Subscriptions Add Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} Setup Initial Subscriptions @@ -54,7 +54,10 @@ Setup Initial Subscriptions ... ${subscription_id} ... ${notification_server_send_url} ${subscription_payload}= Set Entity Id In Subscription ${subscription_payload} ${entity_id} - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot index 9fb9e494660a117b7cd6d30cd0004c56ce52b5b8..69cc5e9bef4fc1bc90934870f4b3fed26019d321 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_02.robot @@ -53,9 +53,13 @@ Setup Initial Subscriptions Set Suite Variable ${entity_id} Set Suite Variable ${subscription_id} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} Sleep 1s - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response2}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} Sleep 1s After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot index b8cb874b07fe001f38def9bcfaf15f11aaba2bd8..4e934ff722ec502989bb55bc1977c8695933c9cb 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_03.robot @@ -24,9 +24,8 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld 046_03_01 Check that a notification is sent with all entities [Documentation] A notification with all subscribed Entities will be included if query or geoquery are not defined. [Tags] sub-notification 5_8_6 - ${response}= Setup Initial Subscriptions - Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} + ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} ${notification} ${headers}= Wait for notification ${5} Should be Equal ${subscription_id} ${notification}[subscriptionId] @@ -41,6 +40,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Keywords *** Before Test Start Local Server ${notification_server_host} ${notification_server_port} + Setup Initial Subscriptions Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} @@ -53,9 +53,13 @@ Setup Initial Subscriptions Set Suite Variable ${entity_id} Set Suite Variable ${subscription_id} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} Sleep 1s - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response2}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} Sleep 1s After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot index 3e487cafebd90b13387854e99968dbb68700c1d8..75939377ec32edf7ac57edb08e216aa44376ddf3 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_04.robot @@ -24,9 +24,8 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld 046_04_01 Check that a notification is sent with all entities [Documentation] The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions [Tags] sub-notification 5_8_6 - ${response}= Setup Initial Subscriptions - ${response1}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} + ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} ${notification} ${headers}= Wait for notification ${5} Should be Equal ${subscription_id} ${notification}[subscriptionId] @@ -40,6 +39,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Keywords *** Before Test Start Local Server ${notification_server_host} ${notification_server_port} + Setup Initial Subscriptions Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} @@ -51,9 +51,13 @@ Setup Initial Subscriptions Set Suite Variable ${entity_id} Set Suite Variable ${subscription_id} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} Sleep 1s - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response2}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} Sleep 1s After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot index b698a8c25f1d6a374d4f37bdc95f4e7eb931bd81..c94b1e8dc09bfb7081de3d1a428250e80f4a03b7 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_05.robot @@ -24,7 +24,6 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld 046_05_01 Check that a notification is sent with all entities [Documentation] The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions [Tags] sub-notification 5_8_6 - Setup Initial Subscriptions ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} @@ -41,6 +40,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Keywords *** Before Test Start Local Server ${notification_server_host} ${notification_server_port} + Setup Initial Subscriptions Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} @@ -53,9 +53,13 @@ Setup Initial Subscriptions Set Suite Variable ${entity_id} Set Suite Variable ${subscription_id} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} Sleep 1s - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response2}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} Sleep 1s After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot index 021d8432be0ec71a271ffc6314fd04c03d70a54c..f98d8714a55849ab029684b6d2f0f9998ce3411c 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot @@ -46,7 +46,10 @@ Setup Server And Subscriptions Set Suite Variable ${subscription_id} Start Local Server ${notification_server_host} ${notification_server_port} - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Sleep 1s Delete Server And Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot index cbba2962734a6f85029e5c383ce1de115af987d3..549c4211391e7563f15b5301b202952293b82f04 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_07.robot @@ -85,9 +85,13 @@ Setup Initial Subscriptions Set Test Variable ${entity_id} Set Test Variable ${subscription_id} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} Sleep 1s - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response2}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} Sleep 1s After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot index 3e685e6224da6de7b58b963c3cb171717ec36d18..35fbe3b26f6958a23b1f24ab188a2d86763d596f 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_08.robot @@ -81,9 +81,13 @@ Setup Initial Subscriptions Set Test Variable ${entity_id} Set Test Variable ${subscription_id} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} Sleep 1s - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response2}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} Sleep 1s After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot index 359b126ccd57effa546b16a4433b2ed8765e315b..72a5d949e652579a4218a53320392c50679d6402 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_09.robot @@ -25,8 +25,6 @@ ${notification_server_send_url} http://${notification_server_host}:${not [Documentation] A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.receiverInfo defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.1 [Tags] sub-notification 5_8_6 - Setup Initial Subscriptions - ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} ${notification} ${headers}= Wait for notification timeout=${10} @@ -36,6 +34,7 @@ ${notification_server_send_url} http://${notification_server_host}:${not *** Keywords *** Before Test Start Local Server ${notification_server_host} ${notification_server_port} + Setup Initial Subscriptions Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} @@ -48,9 +47,13 @@ Setup Initial Subscriptions Set Suite Variable ${entity_id} Set Suite Variable ${subscription_id} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} Sleep 1s - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response2}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} Sleep 1s After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot index 31866d310216a7371be5c2d468611bb4ca233f65..9f61ff5d5c01554f87b8e0402da89e20b6b9383d 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot @@ -26,8 +26,6 @@ ${expected_header_links} <${ngsild_test_suite_context}>; rel="htt [Documentation] The Notification shall be sent as JSON [Tags] sub-notification 5_8_6 - Setup Initial Subscriptions - ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} ${notification} ${headers}= Wait for notification timeout=${10} @@ -39,6 +37,7 @@ ${expected_header_links} <${ngsild_test_suite_context}>; rel="htt *** Keywords *** Before Test Start Local Server ${notification_server_host} ${notification_server_port} + Setup Initial Subscriptions Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} @@ -51,9 +50,13 @@ Setup Initial Subscriptions Set Suite Variable ${subscription_id} Set Suite Variable ${entity_id} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} Sleep 1s - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response2}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} Sleep 1s After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot index f8b2d391902549cf325d1570566255e6bd9d0c1e..bab90df176feb6cf2d5bf73aa0173168b9b395a9 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_11.robot @@ -27,10 +27,6 @@ ${date_format_with_millis}= %Y-%m-%dT%H:%M:%S.%fZ [Documentation] The notification.timesSent member shall be incremented by one. [Tags] sub-notification 5_8_6 - Add Initial Entity - Sleep 1s - Setup Initial Subscriptions - Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Wait for notification timeout=${10} @@ -47,6 +43,9 @@ ${date_format_with_millis}= %Y-%m-%dT%H:%M:%S.%fZ *** Keywords *** Before Test Start Local Server ${notification_server_host} ${notification_server_port} + Add Initial Entity + Sleep 1s + Setup Initial Subscriptions Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} @@ -55,12 +54,16 @@ Setup Initial Subscriptions ... ${subscription_id} ... ${notification_server_send_url} ${subscription_payload}= Set Entity Id In Subscription ${subscription_payload} ${entity_id} - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} Add Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot index bacdb570e68d875e42531193233b8ae241bd435a..42eaae30ce11c0b4d3a43954d1d1e83ed8a2257a 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_12.robot @@ -25,10 +25,6 @@ ${notification_server_send_url}= http://${notification_server_host}:${not [Documentation] The status, lastNotification and lastSuccess members shall be updated with expected value and dates. This test will check these formats. [Tags] sub-notification 5_8_6 - Add Initial Entity - Sleep 1s - Setup Initial Subscriptions - Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Wait for notification timeout=${10} @@ -53,6 +49,18 @@ ${notification_server_send_url}= http://${notification_server_host}:${not *** Keywords *** +Before Test + Start Local Server ${notification_server_host} ${notification_server_port} + Add Initial Entity + Sleep 1s + Setup Initial Subscriptions + +Add Initial Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} + Set Suite Variable ${entity_id} + Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} ${subscription_payload}= Load Subscription Sample With Reachable Endpoint @@ -60,24 +68,19 @@ Setup Initial Subscriptions ... ${subscription_id} ... ${notification_server_send_url} ${subscription_payload}= Set Entity Id In Subscription ${subscription_payload} ${entity_id} - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} -Delete Initial Subscriptions - Delete Subscription ${subscription_id} - -Before Test - Start Local Server ${notification_server_host} ${notification_server_port} - After Test Delete Initial Subscriptions Delete Initial Entity Stop Local Server -Add Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity ${entity_building_filepath} ${entity_id} - Set Suite Variable ${entity_id} - Delete Initial Entity Delete Entity by Id ${entity_id} + +Delete Initial Subscriptions + Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot index ccc6ef86c8fa3e6d72a3ff884b5bca2f98bc3c06..336ac77e5c074ed0b8659836b7ec53fd381a94ea 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_13.robot @@ -46,26 +46,31 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Keywords *** +Before Test + Setup Initial Subscription + Add Initial Entity + Setup Initial Subscription ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} -Delete Initial Subscription - Delete Subscription ${subscription_id} - Add Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${entity_id} -Delete Initial Entity - Delete Entity by Id ${entity_id} - -Before Test - Setup Initial Subscription - Add Initial Entity - After Test Delete Initial Subscription Delete Initial Entity + +Delete Initial Subscription + Delete Subscription ${subscription_id} + +Delete Initial Entity + Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot index b5258eb652207f473d502666afb99e8d4ba0bd98..31d751535bf736690d18f33e8e58b9cb2d7c5df1 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_14.robot @@ -25,11 +25,6 @@ ${notification_server_send_url} http://${notification_server_host}:${not [Documentation] The Notification content shall be JSON-LD when endpoint.accept is set to 'application/ld+json' [Tags] sub-notification 5_8_6 - Add Initial Entity - Sleep 1s - Setup Initial Subscriptions - Sleep 1s - ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} ${notification} ${headers}= Wait For Notification timeout=${10} @@ -46,6 +41,19 @@ ${notification_server_send_url} http://${notification_server_host}:${not *** Keywords *** +Before Test + Start Local Server ${notification_server_host} ${notification_server_port} + Add Initial Entity + Sleep 1s + Setup Initial Subscriptions + Sleep 1s + +Add Initial Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${create_response}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response.status_code} + Set Suite Variable ${entity_id} + Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} ${subscription_payload}= Load Subscription Sample With Reachable Endpoint @@ -53,24 +61,19 @@ Setup Initial Subscriptions ... ${subscription_id} ... ${notification_server_send_url} ${subscription_payload}= Set Entity Id In Subscription ${subscription_payload} ${entity_id} - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} -Delete Initial Subscriptions - Delete Subscription ${subscription_id} - -Before Test - Start Local Server ${notification_server_host} ${notification_server_port} - After Test Delete Initial Subscriptions Delete Initial Entity Stop Local Server -Add Initial Entity - ${entity_id}= Generate Random Entity Id ${building_id_prefix} - Create Entity ${entity_building_filepath} ${entity_id} - Set Suite Variable ${entity_id} +Delete Initial Subscriptions + Delete Subscription ${subscription_id} Delete Initial Entity Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot index c1661f987e76cf97b4fcfd281836db793e96faee..a04c3fc9f21de856a72ed1961aa65413500a2717 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot @@ -24,7 +24,6 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld 046_15_01 Check that a notification is not sent if the throttling has not elapsed yet [Documentation] If a Subscription defines a throttling member, a Notification shall not be sent if the throttling specified (in seconds) has not elapsed yet. [Tags] sub-notification 5_8_6 - Setup Initial Subscriptions ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} @@ -38,6 +37,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld *** Keywords *** Before Test Start Local Server ${notification_server_host} ${notification_server_port} + Setup Initial Subscriptions Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} @@ -50,9 +50,13 @@ Setup Initial Subscriptions Set Suite Variable ${entity_id} Set Suite Variable ${subscription_id} - Create Entity ${entity_building_filepath} ${entity_id} + ${create_response1}= Create Entity ${entity_building_filepath} ${entity_id} + Check Response Status Code 201 ${create_response1.status_code} Sleep 1s - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response2}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response2.status_code} Sleep 1s After Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_01.robot index 1fc0f388cb38f929656da22b293921669ebc6b25..ef421c356440481407be2cf753517feb80b6c7e9 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_01.robot @@ -47,7 +47,10 @@ Setup Initial Subscription ... ${subscription_payload_file_path} ... ${subscription_id} ... ${notification_server_send_url} - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} Before Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot index b07e3496f07efb37c86208ee4e75a43d337cd46f..25a8cfcce420aac14c8de2ab7e002572a29e7c4b 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot @@ -42,7 +42,10 @@ Setup Initial Subscription ... ${subscription_payload_file_path} ... ${subscription_id} ... ${notification_server_send_url} - Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON} + ${create_response}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} Before Test diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot index f21ab5f02d502ef1121f017db3820c8dedcbc019..5d6edc2223380d7b31ba7d31e59e7577971fbf7f 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot @@ -33,7 +33,11 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot index 2d8d7a0e1152e840e05d11ec58f020dcdc1edd56..2459501e189fc085e7dac6219502f601c20407c2 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot @@ -33,7 +33,11 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot index 9bc578adacabb3dfa9da7b181af11c3e135db1d3..a22569138eaad1c1a9009ae1d3041763cd6e5c77 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot @@ -55,7 +55,11 @@ ${expected_expanded_subscription_payload_file_path}= subscriptions/expectatio *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot index 6eb12e05e8509a66126ac995dd5f514e2ee1ead8..060dbcfa57f6deba980f95a8ac4971ac7bf2ce79 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot @@ -42,7 +42,11 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} Set Suite Variable ${subscription_id} Set Suite Variable ${subscription_payload} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot index a465f45229ec0e355b44d10b4704860a305323c2..525501e68ff04b03f85ecbc041fafaa1ee057253 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot @@ -39,7 +39,11 @@ Activate Paused Subscription With isActive Member Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot index 2535a2b5885ffdf68f0aa224e7bb29ca1685d420..dc3c381a9196a35d2a1839d46af52451840366e4 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot @@ -39,7 +39,11 @@ Activate Paused Subscription With isActive And ExpiresAt Members Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot index 11d68bd40b1616a5bc5252e61562ed82615f485f..1b44edffa8ac57edb18fc5e2097d7e06dd9f418a 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot @@ -35,7 +35,11 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot index 3f666970f7a731afa09c301dc600ed0c0b1be993..5192a8e5597e5deb1133b5d9356191d5869c0079 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot @@ -46,7 +46,11 @@ ${subscription_update_fragment_file_path} subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot index f2c348a7103af82e22a6418effb57627899f9930..ec00bf80ff1eeff2cbf42566e725ff4c47738c84 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot @@ -33,7 +33,11 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} - Create Subscription ${subscription_id} ${subscription_payload_file_path} ${CONTENT_TYPE_LD_JSON} + ${initial_response}= Create Subscription + ... ${subscription_id} + ... ${subscription_payload_file_path} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${initial_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Subscriptions diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_01.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_01.robot index 127e8d0d477230ba8a6b3f772ae6169c52e2ed61..3ef177fdb1fdde1459bbe7229b791833f122178a 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_01.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_01.robot @@ -52,8 +52,10 @@ Setup Initial Context Source Registrations ${second_context_source_registration_payload}= Load Test Sample ... ${second_context_source_registration_payload_file_path} ... ${second_context_source_registration_id} - Create Context Source Registration ${first_context_source_registration_payload} - Create Context Source Registration ${second_context_source_registration_payload} + ${create_response1}= Create Context Source Registration ${first_context_source_registration_payload} + Check Response Status Code 201 ${create_response1.status_code} + ${create_response2}= Create Context Source Registration ${second_context_source_registration_payload} + Check Response Status Code 201 ${create_response2.status_code} Set Test Variable ${first_context_source_registration_id} Set Test Variable ${second_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot index ae46d96fd7600278be55d986eb40c9fe21cd58a3..67ad6c29f57f8a1b34997bccd2a6f1304cdfdaad 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot @@ -36,7 +36,8 @@ Setup Initial Context Source Registration ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Create Context Source Registration ${context_source_registration_payload} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${context_source_registration_id} Delete Created Context Source Registration diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_05.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_05.robot index 41350779cb36a5be4c647817d79e2b50e232a2f5..452528f08f8c5c8e460213e2ebd72961ba8cd64b 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_05.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_05.robot @@ -27,16 +27,13 @@ ${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistr Query Context Source Registration Matching EntityInfo of RegistrationInfo [Documentation] Check that one can query context source registrations matching EntityInfo of RegistrationInfo [Arguments] ${registration_file_path} ${expectation_file_path} - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${context_source_registration_payload}= Load Test Sample - ... ${registration_file_path} - ... ${context_source_registration_id} - ${create_response}= Create Context Source Registration ${context_source_registration_payload} - Set Suite Variable ${context_source_registration_id} + Setup Initial Context Source Registrations ${registration_file_path} + ${response}= Query Context Source Registrations ... context=${ngsild_test_suite_context} ... type=OffStreetParking ... idPattern=.*downtown$ + @{expected_context_source_registration_ids}= Create List ${context_source_registration_id} Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing Context Source Registrations elements @@ -44,5 +41,15 @@ Query Context Source Registration Matching EntityInfo of RegistrationInfo ... ${expected_context_source_registration_ids} ... ${response.json()} +Setup Initial Context Source Registrations + [Arguments] ${registration_file_path} + ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_payload}= Load Test Sample + ... ${registration_file_path} + ... ${context_source_registration_id} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} + Set Suite 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/Discovery/QueryContextSourceRegistrations/037_06.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_06.robot index bbfb96a5addab08f150c459d73789ac7ff778033..c2b927d7d6738331ac59eced472f6a591c2a955f 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_06.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_06.robot @@ -45,7 +45,8 @@ Setup Initial Context Source Registration ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Create Context Source Registration ${context_source_registration_payload} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${context_source_registration_id} Delete Created Context Source Registration diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_07.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_07.robot index 36c4ed73c49b0b606d07dc9b9bcf52183c389183..3e69582956700cca338dbd9c1aa028b612973610 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_07.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_07.robot @@ -49,7 +49,8 @@ Setup Initial Context Source Registration ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Create Context Source Registration ${context_source_registration_payload} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${context_source_registration_id} Delete Created Context Source Registration diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_08.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_08.robot index 5b3d80dcd57821d0d4ea0a3cfa877735cd3b9ebd..0209b0e03e89eeaaf50934d6839555b3d2cfd155 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_08.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_08.robot @@ -35,7 +35,8 @@ Setup Initial Context Source Registration ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Create Context Source Registration ${context_source_registration_payload} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${context_source_registration_id} Delete Created Context Source Registration diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_09.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_09.robot index b7fc4a6ca4991e89183f05a0531a03a00ffb0f1f..2d38c69e8e58596fd90128d14822529fc2425b30 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_09.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_09.robot @@ -37,18 +37,16 @@ ${management_interval_expectation_file_path}= csou Query Context Source Registration Matching Temporal Query [Documentation] Check that one can query context source registrations. If present, the temporal query is matched against the observationInterval or the managementInterval [Arguments] ${payload_file_path} ${timeproperty} ${expectation_file_path} - ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} - ${context_source_registration_payload}= Load Test Sample - ... ${payload_file_path} - ... ${context_source_registration_id} - ${create_response}= Create Context Source Registration ${context_source_registration_payload} - Set Suite Variable ${context_source_registration_id} + + Setup Initial Context Source Registrations ${payload_file_path} + ${response}= Query Context Source Registrations ... context=${ngsild_test_suite_context} ... type=Building ... timeproperty=${timeproperty} ... timerel=before ... timeAt=2021-08-01T22:00:00Z + @{expected_context_source_registration_ids}= Create List ${context_source_registration_id} Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing Context Source Registrations elements @@ -56,5 +54,15 @@ Query Context Source Registration Matching Temporal Query ... ${expected_context_source_registration_ids} ... ${response.json()} +Setup Initial Context Source Registrations + [Arguments] ${payload_file_path} + ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} + ${context_source_registration_payload}= Load Test Sample + ... ${payload_file_path} + ... ${context_source_registration_id} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} + Set Suite Variable ${context_source_registration_id} + Delete Created Context Source Registrations Delete Context Source Registration ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_10.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_10.robot index b11664f48ec748787bf4972df8419906efacb57a..1472e9bbb87db110c8c090cb796b5cbb667d5d33 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_10.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_10.robot @@ -57,9 +57,12 @@ Setup Initial Context Source Registrations ${third_context_source_registration_payload}= Load Test Sample ... ${third_context_source_registration_payload_file_path} ... ${third_context_source_registration_id} - 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} + ${create_response1}= Create Context Source Registration ${first_context_source_registration_payload} + Check Response Status Code 201 ${create_response1.status_code} + ${create_response2}= Create Context Source Registration ${second_context_source_registration_payload} + Check Response Status Code 201 ${create_response2.status_code} + ${create_response3}= Create Context Source Registration ${third_context_source_registration_payload} + Check Response Status Code 201 ${create_response3.status_code} Set Test Variable ${first_context_source_registration_id} Set Test Variable ${second_context_source_registration_id} Set Test Variable ${third_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_11.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_11.robot index f6825c2fe53ff7f76ee6e911016ce53f05d9f6aa..a69bd870efd6a609d37ce12a28915f79d7d412c1 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_11.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_11.robot @@ -59,9 +59,12 @@ Setup Initial Context Source Registrations ${third_context_source_registration_payload}= Load Test Sample ... ${third_context_source_registration_payload_file_path} ... ${third_context_source_registration_id} - 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} + ${create_response1}= Create Context Source Registration ${first_context_source_registration_payload} + Check Response Status Code 201 ${create_response1.status_code} + ${create_response2}= Create Context Source Registration ${second_context_source_registration_payload} + Check Response Status Code 201 ${create_response2.status_code} + ${create_response3}= Create Context Source Registration ${third_context_source_registration_payload} + Check Response Status Code 201 ${create_response3.status_code} Set Test Variable ${first_context_source_registration_id} Set Test Variable ${second_context_source_registration_id} Set Test Variable ${third_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_03.robot b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_03.robot index 370ad59912bd121ded3f6d081d659add3ddebaa8..568e712b923d63233677d7a5b2cac934f8c6ed66 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_03.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_03.robot @@ -35,7 +35,8 @@ Setup Initial Context Source Registration ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Create Context Source Registration ${context_source_registration_payload} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${context_source_registration_id} Delete Created Context Source Registration diff --git a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_04.robot b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_04.robot index f01cb838cb9677cf28365fe640830a87b39e28e4..e79e73e9e92f7c12922851202613307a914a18ef 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_04.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_04.robot @@ -36,7 +36,8 @@ Setup Initial Context Source Registration ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Create Context Source Registration ${context_source_registration_payload} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${context_source_registration_id} Delete Created Context Source Registration diff --git a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_05.robot b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_05.robot index 4a0d3d3ffb4ccf589d7c6973f99671fa49c82bd6..653ca1c32c979781e666e0394a6846b9e52e3588 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_05.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/RetrieveContextSourceRegistration/036_05.robot @@ -45,7 +45,8 @@ Setup Initial Context Source Registration ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Create Context Source Registration ${context_source_registration_payload} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} Set Test Variable ${context_source_registration_id} Delete Created Context Source Registration diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot index 7013831067bbba5cc84010f513c8067998063f71..cc8b4ec9ae5811ac4be8b30b3912a1153229d5b9 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot @@ -6,6 +6,9 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.reso Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Created Context Source Registrations + *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: @@ -16,14 +19,24 @@ ${registration_payload_file_path}= context-source-registration-sample.jsonl 035_01_01 Delete a context source registration by id [Documentation] Check that one can delete a context source registration by id [Tags] csr-delete 5_9_4 - ${registration_id}= Generate Random Entity Id ${registration_id_prefix} - ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${registration_payload_file_path} - ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} - ${create_response}= Create Context Source Registration With Return ${updated_payload} - Check Response Status Code 201 ${create_response.status_code} + ${response}= Delete Context Source Registration With Return ${registration_id} + Check Response Status Code 204 ${response.status_code} ${response1}= Retrieve Context Source Registration ... context_source_registration_id=${registration_id} ... context=${ngsild_test_suite_context} Check SUT Not Containing Resource ${response1.status_code} + + +*** Keywords *** +Setup Initial Context Source Registrations + ${registration_id}= Generate Random Entity Id ${registration_id_prefix} + ${payload}= Load JSON From File ${EXECDIR}/data/csourceRegistrations/${registration_payload_file_path} + ${updated_payload}= Update Value To JSON ${payload} $..id ${registration_id} + ${create_response}= Create Context Source Registration With Return ${updated_payload} + Check Response Status Code 201 ${create_response.status_code} + Set Test Variable ${registration_id} + +Delete Created Context Source Registrations + Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_01.robot index 2162618cff2b2ebcdea9602bce2456f6ab000cfc..e94e8425b3b192141188a90c9e18b61f8086fa2a 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_01.robot @@ -39,7 +39,8 @@ Setup Initial Context Source Registration ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Create Context Source Registration ${context_source_registration_payload} + ${create_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${context_source_registration_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_02.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_02.robot index 0c53e8595ed828a78cb3cbbb9ee9b0d259387528..1f71e3614a6d45d78fb70773d6cd8fd20633310c 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_02.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_02.robot @@ -44,12 +44,14 @@ Create Initial Context Source Registration and Context Source Registration Subsc ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} - Create Context Source Registration ${context_source_registration_payload} + ${create_csr_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_csr_response.status_code} ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - ${response}= Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} @{expected_context_source_registration_ids}= Create List ${context_source_registration_id} Set Suite Variable ${expected_context_source_registration_ids} Wait for notification and validate it diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_03.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_03.robot index 0b16106de8dfd05ca58b4f0207a50d1b110abe9a..cbb9dd062ade15e987e9d14fe6d542e6bfa3bbed 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_03.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_03.robot @@ -44,7 +44,8 @@ Setup Initial Context Source Registration Subscription ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_04.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_04.robot index 6584958c4562d4f9eacf20e0994e960cfdbd8cc5..a8669618ea7916c9b400d0b24ea800ca8df0459e 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_04.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_04.robot @@ -42,7 +42,8 @@ Setup Initial Context Source Registration Subscription ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_05.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_05.robot index dd559ba87eaef0ddec615e59ca793c4c61fe367f..8d235f30185d4854821c3793b6b1f630bcb6db69 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_05.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_05.robot @@ -46,7 +46,8 @@ Setup Initial Context Source Registration Subscription ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_06.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_06.robot index 36875da4ecc033dd797ee0c63844cb9b579fbdbc..7905417f48380a97a425d1b39c9b377b0644de12 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_06.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_06.robot @@ -44,7 +44,8 @@ Setup Initial Context Source Registration Subscription Start Local Server ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_07.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_07.robot index 7f51c7287e8404045ae4e7997c751932c7df7d63..e7b13197f51ce873b69b358d9c1c9c90a29418f0 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_07.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_07.robot @@ -51,7 +51,8 @@ Setup Initial Context Source Registration Subscription ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_08.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_08.robot index bddc4ffa27632757f22f2ca39d1d5e71fde076b6..b1c1cbfdb4b99974d94af10364a237cf737835d3 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_08.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_08.robot @@ -43,8 +43,10 @@ Create Initial Context Source Registration and Context Source Registration Subsc ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration ${context_source_registration_payload} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csr_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_csr_response.status_code} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${context_source_registration_id} Set Suite Variable ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_09.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_09.robot index 30de1c0b9c00a7b1857c50ab1197ae8b74b0846a..e525e9ee600fe28d5c63ef01724348608674c790 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_09.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_09.robot @@ -43,8 +43,10 @@ Create Initial Context Source Registration And Context Source Registration Subsc ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration ${context_source_registration_payload} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csr_response}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${create_csr_response.status_code} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${context_source_registration_id} Set Suite Variable ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_10.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_10.robot index edb70308503d5b85431b784eb439f11e9bb28dfd..d7d0beceb59074bb93db760573480611596409f6 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_10.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_10.robot @@ -42,7 +42,8 @@ Setup Initial Context Source Registration Subscription ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_11.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_11.robot index 52cbf11f25e09a4a72c7fa11427e6d1b0724f484..ddc53ca43db72368424c80e73bd999519779a725 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_11.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_11.robot @@ -34,12 +34,14 @@ Receive cSourceNotification For Matching Context Source Registrations On Managem Set Suite Variable ${subscription_id} ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ${filepath} ${subscription_id} ${response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${response.status_code} ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} Set Suite Variable ${context_source_registration_id} ${context_source_registration_payload}= Load Test Sample ... ${context_source_registration_payload_file_path} ... ${context_source_registration_id} ${response1}= Create Context Source Registration ${context_source_registration_payload} + Check Response Status Code 201 ${response1.status_code} @{expected_context_source_registration_ids}= Create List ${context_source_registration_id} Wait for notification and validate it ... expected_subscription_id=${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_12.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_12.robot index 59d620a2693814fba033a39a18bde17da6e637ca..9d8db6c9a123d976a11a8f5ebada37d3ceb320c3 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_12.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_12.robot @@ -42,7 +42,8 @@ Setup Initial Context Source Registration Subscription ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_13.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_13.robot index 5a24fab77af87802aecc2056afa1e2d9bd86bcfb..515be44284ac0e59eeae803454933e09a17134f0 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_13.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_13.robot @@ -42,7 +42,8 @@ Setup Initial Context Source Registration Subscription ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_14.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_14.robot index 3ab8c25894b46291ba1e50cab007997e021a10c7..532e5def1b8cbd0a9886d39b64783e5049c72d3d 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_14.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_14.robot @@ -42,7 +42,8 @@ Setup Initial Context Source Registration Subscription ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_15.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_15.robot index 792bc9cdd18d6490c3ffed683d34e042230b1f3b..7413bb8f70e8465d64558fc03f11342b1a6a26c6 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_15.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_15.robot @@ -42,7 +42,8 @@ Setup Initial Context Source Registration Subscription ${subscription_payload}= Load Subscription Sample With Reachable Endpoint ... ${subscription_payload_file_path} ... ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration And Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_16.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_16.robot index 1b8c0878b9c1c28b4ccab7dc0f915b773c665aa3..541c8c26ffaf31c87093f9ab8172727f845cb1c5 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_16.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/ContextSourceRegistrationSubscriptionNotificationBehaviour/047_16.robot @@ -59,9 +59,12 @@ Create Initial Context Source Registrations And Context Source Registration Subs ${second_context_source_registration_payload}= Load Test Sample ... ${second_context_source_registration_payload_file_path} ... ${second_context_source_registration_id} - 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} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} + ${create_csr_response1}= Create Context Source Registration ${first_context_source_registration_payload} + Check Response Status Code 201 ${create_csr_response1.status_code} + ${create_csr_response2}= Create Context Source Registration ${second_context_source_registration_payload} + Check Response Status Code 201 ${create_csr_response2.status_code} Set Test Variable ${subscription_id} Set Test Variable ${first_context_source_registration_id} Set Test Variable ${second_context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot index d45c12ef86c681faa92c96b2025ef28b7c319744..32f82eef1812d4d93f71bf9e1e0ad6fb76a3157f 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot @@ -30,7 +30,8 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-sample Setup Initial Context Source Registration Subscription ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${subscription_id} Delete Initial Context Source Registration Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot index 2fa66e392d7ff0be97a244e6f53c2391f4831ce8..1a4ba2253b88b624e8d98b527a5a14eefb548f9f 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot @@ -29,5 +29,6 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-sample Setup Initial Context Source Registration Subscription ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot index fd181bacccabc3d736b2de7d52a61220409700bb..07f1e7ea626044cb17db5cc06b704c13a7389a5c 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot @@ -39,8 +39,10 @@ Setup Initial Context Source Registration Subscriptions ${second_subscription_payload}= Load Test Sample ... ${second_subscription_payload_file_path} ... ${second_subscription_id} - Create Context Source Registration Subscription ${first_subscription_payload} - Create Context Source Registration Subscription ${second_subscription_payload} + ${create_csrsub1_response}= Create Context Source Registration Subscription ${first_subscription_payload} + Check Response Status Code 201 ${create_csrsub1_response.status_code} + ${create_csrsub2_response}= Create Context Source Registration Subscription ${second_subscription_payload} + Check Response Status Code 201 ${create_csrsub2_response.status_code} Set Suite Variable ${first_subscription_id} Set Suite Variable ${second_subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot index 9ee802d7bb4823e601829a6bc9a031e7855e87a3..8c92178c47eac49ef9d92197ce1fdda1ef5a4565 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot @@ -56,9 +56,12 @@ Setup Initial Context Source Registration Subscriptions ${third_subscription_payload}= Load Test Sample ... ${third_subscription_payload_file_path} ... ${third_subscription_id} - Create Context Source Registration Subscription ${first_subscription_payload} - Create Context Source Registration Subscription ${second_subscription_payload} - Create Context Source Registration Subscription ${third_subscription_payload} + ${create_csrsub1_response}= Create Context Source Registration Subscription ${first_subscription_payload} + Check Response Status Code 201 ${create_csrsub1_response.status_code} + ${create_csrsub2_response}= Create Context Source Registration Subscription ${second_subscription_payload} + Check Response Status Code 201 ${create_csrsub2_response.status_code} + ${create_csrsub3_response}= Create Context Source Registration Subscription ${third_subscription_payload} + Check Response Status Code 201 ${create_csrsub3_response.status_code} Set Suite Variable ${first_subscription_id} Set Suite Variable ${second_subscription_id} Set Test Variable ${third_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 bb1db3d5c026bafd77adb341f0eed6bf6347500e..b8b75e7929b2bc8e2b5a0f54c20fa9c07a45a1ec 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot @@ -57,9 +57,12 @@ Setup Initial Context Source Registration Subscriptions ${third_subscription_payload}= Load Test Sample ... ${third_subscription_payload_file_path} ... ${third_subscription_id} - Create Context Source Registration Subscription ${first_subscription_payload} - Create Context Source Registration Subscription ${second_subscription_payload} - Create Context Source Registration Subscription ${third_subscription_payload} + ${create_csrsub1_response}= Create Context Source Registration Subscription ${first_subscription_payload} + Check Response Status Code 201 ${create_csrsub1_response.status_code} + ${create_csrsub2_response}= Create Context Source Registration Subscription ${second_subscription_payload} + Check Response Status Code 201 ${create_csrsub2_response.status_code} + ${create_csrsub3_response}= Create Context Source Registration Subscription ${third_subscription_payload} + Check Response Status Code 201 ${create_csrsub3_response.status_code} Set Suite Variable ${first_subscription_id} Set Suite Variable ${second_subscription_id} Set Suite Variable ${third_subscription_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot index fd4f0e4511b2b86d922a8b211501c32c945ed963..b5926844462c72a3688d3151af698716a0a5edbc 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot @@ -63,7 +63,8 @@ ${expectation_file_path}= csourceSubscriptions/expectations/subscr Setup Initial Context Source Registration Subscription ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} ${subscription_payload}= Load Test Sample ${subscription_payload_file_path} ${subscription_id} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${subscription_id} Delete Created Context Source Registration Subscription diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot index abef36c7727a7efebdf8bc5b3baf21b166b76108..3f56e9550a92b15ac9c06b20538a275987bb3815 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot @@ -41,7 +41,8 @@ ${subscription_update_fragment_file_path}= csourceSubscriptions/fragments/s 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} - Create Context Source Registration Subscription ${subscription_payload} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Suite Variable ${subscription_id} Set Suite Variable ${subscription_payload} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot index a6b513e4b3fb7869841b217ab7a844d80a65e886..f938efa3c60b03f1fa589be1a46b393b31e8e8f8 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_04.robot @@ -40,7 +40,8 @@ Update Context Source Registration Subscription With Invalid Fragment 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} + ${create_csrsub_response}= Create Context Source Registration Subscription ${subscription_payload} + Check Response Status Code 201 ${create_csrsub_response.status_code} Set Test Variable ${subscription_id} Delete Initial Context Source Registration Subscriptions diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 432e6ce779d2223304c39322e6b1b22a21d4723b..1599de1213056b9254703e3683bd806450e4a4ed 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -43,7 +43,7 @@ Check Response Body Containing Entities URIS set to Append To List ${response_entities_ids} ${entity['id']} END - Lists Should Be Equal ${expected_entities_ids} ${response_entities_ids} ignore_order=True + Lists Should Be Equal ${expected_entities_ids} ${response_entities_ids} ignore_order=True Check Response Body Content [Arguments] ${expectation_filename} ${response_body} ${additional_ignored_path}=${EMPTY}