From b1637b4fcbe99ae4f39ba55d8d30ae2628a8eca8 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Sat, 6 May 2023 09:33:27 +0200 Subject: [PATCH 1/6] chore: add some missing implicit import for improved IDE integration --- resources/ApiUtils.resource | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 863b2536..6bb646ee 100755 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -1,11 +1,11 @@ *** Settings *** -Variables ./variables.py -Library ${EXECDIR}/libraries/logUtils.py -Library RequestsLibrary -Library OperatingSystem -Library Collections -Library JSONLibrary +Variables ./variables.py +Library REST ${url} +Library RequestsLibrary +Library OperatingSystem +Library Collections +Library JSONLibrary *** Variables *** ${BATCH_CREATE_ENDPOINT_PATH} entityOperations/create -- GitLab From aa2397b8dd2bd02b7ae55eadd5e4ad97906dd53c Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Sat, 6 May 2023 09:35:45 +0200 Subject: [PATCH 2/6] chore: run Robotidy on all TCs and resources files --- .../027_01_01.robot | 1 + .../024_01_01.robot | 1 + .../QueryTemporalEvolutionOfEntities/021_10.robot | 1 + .../QueryTemporalEvolutionOfEntities/021_12.robot | 1 + .../RetrieveTemporalEvolutionOfEntity/020_08.robot | 1 + .../BatchEntities/CreateBatchOfEntities/003_02.robot | 1 + .../BatchEntities/UpdateBatchOfEntities/005_03.robot | 1 + .../AppendEntityAttributes/010_03.robot | 1 + .../UpdateEntityAttributes/011_03.robot | 1 + .../Subscription/UpdateSubscription/029_03.robot | 1 + .../Subscription/UpdateSubscription/029_04.robot | 1 + .../Subscription/UpdateSubscription/029_11.robot | 1 + .../038_07.robot | 1 + .../039_05.robot | 1 + resources/ApiUtils.resource | 12 ++++++------ resources/AssertionUtils.resource | 10 +++++----- 16 files changed, 25 insertions(+), 11 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot index 889a5c5e..009b0616 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot @@ -27,6 +27,7 @@ Retrieve Detailed Representation Of Available Attribute Without Context + *** Keywords *** Setup Initial Entities ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot index f45a563b..b2123c35 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot @@ -27,6 +27,7 @@ Retrieve Detailed Representation Of Available Entity Type Without Context + *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot index 062f404f..8ce44532 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot @@ -32,6 +32,7 @@ Query the temporal evolution of entities matching the given NGSI-LD context sour + *** Keywords *** Create Initial Context Source Registration Start Context Source Mock Server 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 d52e17b8..9fa5b942 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot @@ -30,6 +30,7 @@ Query the temporal evolution of entities with an invalid request + *** Keywords *** Setup Initial Entities ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 35b573da..dcd474ad 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot @@ -31,6 +31,7 @@ Retrieve the temporal evolution of non-existing entity attributes + *** Keywords *** Setup Initial Entities ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 383d98fd..1fddf17e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot @@ -44,6 +44,7 @@ Create a batch of two valid entities and one invalid entity + *** Keywords *** Setup Initial Entities ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} 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 51137694..cec0b909 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot @@ -53,6 +53,7 @@ Update a batch of non-existing and existing entities ${response}= Batch Delete Entities @{expected_successful_entities_ids} + *** Keywords *** Setup Initial Entities ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot index f363e0a3..d64d8f64 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot @@ -25,5 +25,6 @@ Append entity attributes when the entity id is not known to the system + *** Keywords *** [Teardown] Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot index 2a355c98..afcafdd9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot @@ -26,5 +26,6 @@ Update entity attributes when the entity id is not known to the system + *** Keywords *** [Teardown] Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot index 7175df75..2b5cf98c 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot @@ -31,6 +31,7 @@ Update Subscription With Invalid Fragment + *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot index 94a2b507..97dfc68b 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot @@ -31,6 +31,7 @@ Update Subscription With Null Mandatory Properties + *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot index 64d5c3d0..7a1901b4 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot @@ -31,6 +31,7 @@ Update Subscription With ExpiresAt In The Past + *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot index e930111c..ad453651 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot @@ -28,6 +28,7 @@ Create Existing Context Source Registration Subscription + *** Keywords *** Setup Initial Context Source Registration Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot index 1a212652..b8da394d 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot @@ -30,6 +30,7 @@ Update Context Source Registration Subscription With Invalid JSON Fragment + *** Keywords *** Setup Initial Context Source Registration Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 6bb646ee..a787db2d 100755 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -1,11 +1,11 @@ *** Settings *** -Variables ./variables.py +Variables ./variables.py +Library REST ${url} +Library RequestsLibrary +Library OperatingSystem +Library Collections +Library JSONLibrary -Library REST ${url} -Library RequestsLibrary -Library OperatingSystem -Library Collections -Library JSONLibrary *** Variables *** ${BATCH_CREATE_ENDPOINT_PATH} entityOperations/create diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 8692bdca..28275df4 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -22,13 +22,13 @@ Check Response Status Code Should Be Equal ${expected_status_code} ${response_status_code} Check Response Status Code Set To - [Arguments] ${expected_status} - ${response_status}= convert to string ${response['status']} - Should Be Equal ${response_status} ${expected_status} + [Arguments] ${expected_status} + ${response_status}= convert to string ${response['status']} + Should Be Equal ${response_status} ${expected_status} Check RL Response Status Code Set To - [Arguments] ${expected_status} - Status Should Be ${expected_status} ${response} + [Arguments] ${expected_status} + Status Should Be ${expected_status} ${response} Check Response Body Containing Array Of URIs set to [Arguments] @{expected_entities_ids} -- GitLab From c21728d9f3a71809ff79f87c294ad21aad70e9ad Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Tue, 16 May 2023 12:59:06 +0200 Subject: [PATCH 3/6] feat: finalize integration of Robotidy --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b4925e6f..344347de 100644 --- a/README.md +++ b/README.md @@ -115,13 +115,16 @@ For more running instructions please consult [scripts/run_tests.sh](./scripts/ru ```$ python3 -m robot.testdoc TP/NGSI-LD api_docs/TestCases.html``` +## Tidy the Test Cases + +```$ python3 -m robot.tidy --recursive TP/NGSI-LD``` + # Frameworks and libraries used in the project * [Robot Framework](https://github.com/robotframework/robotframework) * [JSON Library](https://github.com/robotframework-thailand/robotframework-jsonlibrary) * [Requests Library](https://github.com/MarketSquare/robotframework-requests) * [Deep Diff](https://github.com/seperman/deepdiff) -* [HttpCtrl Library](https://github.com/annoviko/robotframework-httpctrl) * [Robotidy Library ](https://github.com/MarketSquare/robotframework-tidy) # Useful links -- GitLab From 74006f5c5c4ef28446566548ac6361a8ae75245d Mon Sep 17 00:00:00 2001 From: gpoujol Date: Mon, 15 May 2023 14:35:18 +0200 Subject: [PATCH 4/6] feat: clean up used libraries - Remove unused libraries (`metrics`, `JsonSchemaLibrary`, `RESTinstances`) - Use only robotframework-requests library - Remove unused function - Return always response in API Requests - Remove deprecated KeyWord `Run Keyword Unless` - Remove duplicated function (`Check Status Code Set to`) --- README.md | 1 + .../027_01_01.robot | 2 -- .../024_01_01.robot | 2 -- .../QueryTemporalEvolutionOfEntities/021_10.robot | 2 -- .../QueryTemporalEvolutionOfEntities/021_12.robot | 2 -- .../RetrieveTemporalEvolutionOfEntity/020_08.robot | 2 -- .../BatchEntities/CreateBatchOfEntities/003_02.robot | 2 -- .../BatchEntities/UpdateBatchOfEntities/005_03.robot | 1 - .../EntityAttributes/AppendEntityAttributes/010_03.robot | 2 -- .../EntityAttributes/UpdateEntityAttributes/011_03.robot | 2 -- .../Subscription/UpdateSubscription/029_03.robot | 2 -- .../Subscription/UpdateSubscription/029_04.robot | 2 -- .../Subscription/UpdateSubscription/029_11.robot | 2 -- .../038_07.robot | 2 -- .../039_05.robot | 2 -- resources/ApiUtils.resource | 1 - resources/AssertionUtils.resource | 9 --------- 17 files changed, 1 insertion(+), 37 deletions(-) diff --git a/README.md b/README.md index 344347de..3458ff56 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,7 @@ For more running instructions please consult [scripts/run_tests.sh](./scripts/ru * [JSON Library](https://github.com/robotframework-thailand/robotframework-jsonlibrary) * [Requests Library](https://github.com/MarketSquare/robotframework-requests) * [Deep Diff](https://github.com/seperman/deepdiff) +* [HttpCtrl Library](https://github.com/annoviko/robotframework-httpctrl) * [Robotidy Library ](https://github.com/MarketSquare/robotframework-tidy) # Useful links diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot index 009b0616..fbb7439d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot @@ -26,8 +26,6 @@ Retrieve Detailed Representation Of Available Attribute Without Context Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** Setup Initial Entities ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot index b2123c35..e782a8c9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot @@ -26,8 +26,6 @@ Retrieve Detailed Representation Of Available Entity Type Without Context Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot index 8ce44532..13ee2575 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot @@ -31,8 +31,6 @@ Query the temporal evolution of entities matching the given NGSI-LD context sour Check Response Status Code 200 ${response.status_code} - - *** Keywords *** Create Initial Context Source Registration Start Context Source Mock Server 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 9fa5b942..459ed342 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot @@ -29,8 +29,6 @@ Query the temporal evolution of entities with an invalid request Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** Setup Initial Entities ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 dcd474ad..e457cb4c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot @@ -30,8 +30,6 @@ Retrieve the temporal evolution of non-existing entity attributes Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** Setup Initial Entities ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 1fddf17e..b128090f 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot @@ -43,8 +43,6 @@ Create a batch of two valid entities and one invalid entity ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} - - *** Keywords *** Setup Initial Entities ${existing_entity_id}= Generate Random Entity Id ${building_id_prefix} 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 cec0b909..51137694 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot @@ -53,7 +53,6 @@ Update a batch of non-existing and existing entities ${response}= Batch Delete Entities @{expected_successful_entities_ids} - *** Keywords *** Setup Initial Entities ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot index d64d8f64..95e64907 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_03.robot @@ -24,7 +24,5 @@ Append entity attributes when the entity id is not known to the system Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** [Teardown] Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot index afcafdd9..144d5026 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_03.robot @@ -25,7 +25,5 @@ Update entity attributes when the entity id is not known to the system Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** [Teardown] Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot index 2b5cf98c..63869f67 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_03.robot @@ -30,8 +30,6 @@ Update Subscription With Invalid Fragment Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot index 97dfc68b..da9c634d 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_04.robot @@ -30,8 +30,6 @@ Update Subscription With Null Mandatory Properties Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot index 7a1901b4..480bc931 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_11.robot @@ -30,8 +30,6 @@ Update Subscription With ExpiresAt In The Past Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot index ad453651..12eec667 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_07.robot @@ -27,8 +27,6 @@ Create Existing Context Source Registration Subscription Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** Setup Initial Context Source Registration Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot index b8da394d..55869fc9 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_05.robot @@ -29,8 +29,6 @@ Update Context Source Registration Subscription With Invalid JSON Fragment Check RL Response Body Containing ProblemDetails Element Containing Title Element ${response.json()} - - *** Keywords *** Setup Initial Context Source Registration Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index a787db2d..4b13df66 100755 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -1,6 +1,5 @@ *** Settings *** Variables ./variables.py -Library REST ${url} Library RequestsLibrary Library OperatingSystem Library Collections diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 28275df4..c107722e 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -21,15 +21,6 @@ Check Response Status Code ${response_status_code}= convert to string ${response_status_code} Should Be Equal ${expected_status_code} ${response_status_code} -Check Response Status Code Set To - [Arguments] ${expected_status} - ${response_status}= convert to string ${response['status']} - Should Be Equal ${response_status} ${expected_status} - -Check RL Response Status Code Set To - [Arguments] ${expected_status} - Status Should Be ${expected_status} ${response} - Check Response Body Containing Array Of URIs set to [Arguments] @{expected_entities_ids} Lists Should Be Equal ${expected_entities_ids} ${response.json()} ignore_order=True -- GitLab From 732fa156ae8fb620b0e94172c910a7fb76b60a40 Mon Sep 17 00:00:00 2001 From: gpoujol Date: Wed, 17 May 2023 17:23:53 +0200 Subject: [PATCH 5/6] fix: output request and response to terminal and file --- resources/ApiUtils.resource | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 4b13df66..863b2536 100755 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -1,5 +1,6 @@ *** Settings *** Variables ./variables.py +Library ${EXECDIR}/libraries/logUtils.py Library RequestsLibrary Library OperatingSystem Library Collections -- GitLab From 23c8924af11ee531ebbf35e6b404cefae5d2864d Mon Sep 17 00:00:00 2001 From: gpoujol Date: Mon, 22 May 2023 15:37:31 +0200 Subject: [PATCH 6/6] chore: always use arguments when using function --- TP/NGSI-LD/CommonBehaviours/044_02.robot | 8 +- .../027_01_02.robot | 2 +- .../RetrieveAvailableAttributes/025_01.robot | 2 +- .../024_01_02.robot | 2 +- .../RetrieveAvailableEntityTypes/022_01.robot | 2 +- .../026_01.robot | 2 +- .../023_01.robot | 2 +- .../Entity/QueryEntities/019_06.robot | 2 +- .../021_01.robot | 1 + .../021_02.robot | 1 + .../021_03.robot | 1 + .../021_04.robot | 1 + .../021_05.robot | 1 + .../021_06.robot | 1 + .../021_07.robot | 1 + .../021_08.robot | 1 + .../021_09.robot | 1 + .../021_11.robot | 2 +- .../021_13.robot | 1 + .../020_01.robot | 1 + .../020_02.robot | 1 + .../020_03.robot | 1 + .../020_04.robot | 1 + .../020_05.robot | 1 + .../020_10.robot | 1 + .../CreateBatchOfEntities/003_01.robot | 4 +- .../CreateBatchOfEntities/003_02.robot | 4 +- .../CreateBatchOfEntities/003_04.robot | 6 +- .../CreateBatchOfEntities/003_05.robot | 4 +- .../CreateBatchOfEntities/003_07.robot | 6 +- .../DeleteBatchOfEntities/006_01.robot | 2 +- .../DeleteBatchOfEntities/006_02.robot | 4 +- .../UpdateBatchOfEntities/005_01.robot | 2 +- .../UpdateBatchOfEntities/005_02.robot | 2 +- .../UpdateBatchOfEntities/005_03.robot | 4 +- .../UpsertBatchOfEntities/004_01.robot | 4 +- .../UpsertBatchOfEntities/004_02.robot | 4 +- .../UpsertBatchOfEntities/004_03.robot | 2 +- .../UpsertBatchOfEntities/004_04.robot | 4 +- .../UpsertBatchOfEntities/004_05.robot | 4 +- .../Entities/CreateEntity/001_01.robot | 2 +- .../Entities/CreateEntity/001_04.robot | 6 +- .../Entities/CreateEntity/001_05.robot | 4 +- .../Entities/CreateEntity/001_07.robot | 6 +- .../Entities/DeleteEntity/002_01.robot | 2 +- .../AppendEntityAttributes/010_01.robot | 4 +- .../DeleteEntityAttribute/013_01.robot | 2 +- .../PartialAttributeUpdate/012_01.robot | 2 +- .../UpdateEntityAttributes/011_01.robot | 2 +- .../007_01.robot | 5 +- .../009_01.robot | 2 +- .../008_01.robot | 5 +- .../AppendAttributes/014_01.robot | 5 +- .../DeleteAttribute/015_01.robot | 5 +- .../DeleteAttributeInstance/017_01.robot | 5 +- .../ModifyAttributeInstance/016_01.robot | 5 +- .../CreateSubscription/028_01.robot | 2 +- .../DeleteSubscription/032_03.robot | 2 +- .../QuerySubscriptions/031_01.robot | 1 + .../QuerySubscriptions/031_02.robot | 7 +- .../RetrieveSubscription/030_03.robot | 5 +- .../UpdateSubscription/029_05.robot | 2 + .../UpdateSubscription/029_06.robot | 2 +- .../UpdateSubscription/029_07.robot | 2 +- .../UpdateSubscription/029_08.robot | 2 +- .../UpdateSubscription/029_09.robot | 2 +- .../UpdateSubscription/029_10.robot | 2 +- .../033_01_01.robot | 2 +- .../033_01_02.robot | 2 +- .../033_01_03.robot | 2 +- .../033_04.robot | 3 +- .../033_05.robot | 7 +- .../033_07.robot | 3 +- .../035_01.robot | 2 +- .../037_01.robot | 1 + .../037_04.robot | 1 + .../037_05.robot | 1 + .../037_06.robot | 1 + .../037_07.robot | 1 + .../037_08.robot | 1 + .../037_09.robot | 1 + .../037_10.robot | 1 + .../037_11.robot | 7 +- .../036_03.robot | 1 + .../036_04.robot | 1 + .../036_05.robot | 1 + .../034_01.robot | 2 +- .../038_01.robot | 2 +- .../038_02.robot | 2 +- .../038_03.robot | 2 +- .../038_04.robot | 2 +- .../038_05.robot | 2 +- .../038_06.robot | 2 +- .../042_01.robot | 2 +- .../NotificationBehaviour/047_05.robot | 5 +- .../NotificationBehaviour/047_06.robot | 5 +- .../041_01.robot | 1 + .../041_02.robot | 5 +- .../041_03.robot | 7 +- .../040_01.robot | 5 +- .../039_01.robot | 2 +- libraries/assertionUtils.py | 6 +- libraries/logUtils.py | 3 +- resources/ApiUtils.resource | 34 ---- resources/AssertionUtils.resource | 160 +++++++++--------- schemas/error_response.schema.json | 7 - 106 files changed, 266 insertions(+), 216 deletions(-) delete mode 100644 schemas/error_response.schema.json diff --git a/TP/NGSI-LD/CommonBehaviours/044_02.robot b/TP/NGSI-LD/CommonBehaviours/044_02.robot index f8e87f4b..8f634d61 100644 --- a/TP/NGSI-LD/CommonBehaviours/044_02.robot +++ b/TP/NGSI-LD/CommonBehaviours/044_02.robot @@ -32,7 +32,7 @@ ${content_type}= application/json Check Response Status Code 201 ${response.status_code} ${response}= Query Entity ${id} context=${ngsild_test_suite_context} accept=*/* Check Response Status Code 200 ${response.status_code} - Check Response Headers Containing Content-Type set to ${response.headers} ${content_type} + Check Response Headers Containing Content-Type set to ${content_type} ${response.headers} Check Response Headers Link Not Empty ${response.headers} [Teardown] Delete Entity by Id Returning Response ${id} @@ -44,7 +44,7 @@ ${content_type}= application/json Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Subscription ${id} accept=*/* Check Response Status Code 200 ${response.status_code} - Check Response Headers Containing Content-Type set to ${response.headers} ${content_type} + Check Response Headers Containing Content-Type set to ${content_type} ${response.headers} Check Response Headers Link Not Empty ${response.headers} [Teardown] Delete Subscription ${id} @@ -62,7 +62,7 @@ ${content_type}= application/json ... context=${ngsild_test_suite_context} ... accept=*/* Check Response Status Code 200 ${response.status_code} - Check Response Headers Containing Content-Type set to ${response.headers} ${content_type} + Check Response Headers Containing Content-Type set to ${content_type} ${response.headers} Check Response Headers Link Not Empty ${response.headers} [Teardown] Delete Context Source Registration ${registration_id} @@ -83,6 +83,6 @@ ${content_type}= application/json ... accept=*/* Check Response Status Code 200 ${response.status_code} Set Test Variable ${response} - Check Response Headers Containing Content-Type set to ${response.headers} ${content_type} + Check Response Headers Containing Content-Type set to ${content_type} ${response.headers} Check Response Headers Link Not Empty ${response.headers} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_02.robot index 1a2f0f77..0853f181 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_02.robot @@ -21,7 +21,7 @@ Retrieve Detailed Representation Of Available Attribute [Tags] ed-attr 5_7_10 ${response}= Retrieve Attribute attribute_name=airQualityLevel context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing Attribute element ${expectation_file} + Check Response Body Containing Attribute element ${expectation_file} ${response.json()} *** Keywords *** 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 c611457b..6c60bf12 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributes/025_01.robot @@ -29,7 +29,7 @@ Retrieve Available Attributes [Arguments] ${context} ${expectation_file} ${response}= Retrieve Attributes ${context} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing AttributeList element ${expectation_file} + Check Response Body Containing AttributeList element ${expectation_file} ${response.json()} Setup Initial Entities ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_02.robot index 33d7f30e..fbc36deb 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_02.robot @@ -21,7 +21,7 @@ Retrieve Detailed Representation Of Available Entity Type [Tags] ed-type 5_7_7 ${response}= Retrieve Entity Type type=Building context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing EntityTypeInfo element ${expectation_file} + Check Response Body Containing EntityTypeInfo element ${expectation_file} ${response.json()} *** Keywords *** 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 0089b75b..3f8cd47c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypes/022_01.robot @@ -31,7 +31,7 @@ Retrieve Available Entity Types [Arguments] ${context} ${expectation_file} ${response}= Retrieve Entity Types ${context} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing EntityTypeList element ${expectation_file} + Check Response Body Containing EntityTypeList element ${expectation_file} ${response.json()} Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} 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 ff3c6511..557cc53d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot @@ -29,7 +29,7 @@ Retrieve Details Of Available Attributes [Arguments] ${context} ${expectation_file} ${response}= Retrieve Attributes context=${context} details=${TRUE} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing Attribute element ${expectation_file} + Check Response Body Containing Attribute element ${expectation_file} ${response.json()} Setup Initial Entities ${entity_id}= Generate Random Entity Id ${building_id_prefix} 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 b725e55a..c9b55e30 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot @@ -31,7 +31,7 @@ Retrieve Details Of Available Entity Types [Arguments] ${context} ${expectation_file} ${response}= Retrieve Entity Types context=${context} details=${TRUE} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing EntityType element ${expectation_file} + Check Response Body Containing EntityType element ${expectation_file} ${response.json()} Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} 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 449cd3a9..fc5f3018 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot @@ -47,7 +47,7 @@ Query entities specifying a maximum number of results ... 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} + Check Response Body Containing Number Of Entities ${entity_type} ${2} ${response.json()} [Teardown] Delete Entities ${first_entity_id} ${second_entity_id} ${third_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot index 2501434a..3ed7c3af 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot @@ -42,6 +42,7 @@ Query the temporal evolution of entities Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} Setup Initial Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 af1dd099..58cc6a91 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot @@ -35,6 +35,7 @@ Query the temporal evolution of certain attributes of entities Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} *** Keywords *** 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 0fbed90c..81629935 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot @@ -34,6 +34,7 @@ Query the temporal evolution of the last N instances of entities attributes Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} *** Keywords *** 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 30a92bf3..6bab8c04 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot @@ -33,6 +33,7 @@ Query the temporal evolution of entities using a context Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} *** Keywords *** 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 1d6c2d16..57300cf3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot @@ -32,6 +32,7 @@ Query the temporal evolution of entities matching the given type(s) Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} *** Keywords *** 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 59e25190..5d94d9bf 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot @@ -33,6 +33,7 @@ Query the temporal evolution of entities matching the given identifier(s) Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} *** Keywords *** 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 b4075e65..4fca7480 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot @@ -34,6 +34,7 @@ Query the temporal evolution of entities matching the given id pattern Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} *** Keywords *** 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 4d1efb4d..c49aaa1a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot @@ -34,6 +34,7 @@ Query the temporal evolution of entities matching the given NGSI-LD query Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} *** Keywords *** 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 5269eb39..5a485e31 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot @@ -43,6 +43,7 @@ Query the temporal evolution of entities matching the given NGSI-LD geo-query Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} Setup Initial Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 5e0e25de..6880dde9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot @@ -37,7 +37,7 @@ Query the temporal evolution of entities with a limit to the number of entities ... timeAt=2020-07-01T12:05:00Z ... context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing Number Of Entities Vehicle ${limit} + Check Response Body Containing Number Of Entities Vehicle ${limit} ${response.json()} Setup Initial Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 54963f57..0bb09a1f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot @@ -37,6 +37,7 @@ Query the temporal evolution of entities using the entityOperations method Check Response Body Containing List Containing EntityTemporal elements ... ${expectation_file} ... ${temporal_entities_representation_ids} + ... ${response.json()} Setup Initial Entities ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 95c4e17b..688ffda7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot @@ -24,6 +24,7 @@ Retrieve the temporal evolution of an entity Check Response Body Containing EntityTemporal element ... ${vehicle_expectation_file} ... ${temporal_entity_representation_id} + ... ${response.json()} *** Keywords *** 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 0d3d4f9b..db67528d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot @@ -26,6 +26,7 @@ Retrieve the temporal evolution of an entity using a context Check Response Body Containing EntityTemporal element ... ${vehicle_expectation_file} ... ${temporal_entity_representation_id} + ... ${response.json()} *** Keywords *** 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 b4d586e0..d6ffa927 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot @@ -28,6 +28,7 @@ Retrieve the temporal evolution of certain attributes of an entity Check Response Body Containing EntityTemporal element ... ${vehicle_expectation_file} ... ${temporal_entity_representation_id} + ... ${response.json()} *** Keywords *** 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 d1ecd7b6..5a2082f2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot @@ -38,6 +38,7 @@ Retrieve the temporal evolution of an entity matching the given NGSI-LD temporal Check Response Body Containing EntityTemporal element ... ${vehicle_expectation_file} ... ${temporal_entity_representation_id} + ... ${response.json()} Setup Initial Entities ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 0a07a3ac..2b226d09 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot @@ -36,6 +36,7 @@ Retrieve the temporal evolution of the last N instances of entity attributes Check Response Body Containing EntityTemporal element ... ${vehicle_expectation_file} ... ${temporal_entity_representation_id} + ... ${response.json()} Setup Initial Entities ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} 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 d982aaa5..69e8d9f6 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot @@ -28,6 +28,7 @@ Retrieve the temporal evolution of an entity with the simplified temporal repres Check Response Body Containing EntityTemporal element ... ${vehicle_expectation_file} ... ${temporal_entity_representation_id} + ... ${response.json()} *** Keywords *** 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 3961c29c..d0ae37d4 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot @@ -39,11 +39,11 @@ Batch Create Entity Scenarios @{expected_entities_ids}= Create List ${first_entity_id} ${second_entity_id} ${entities_to_be_queried}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id} Check Response Status Code 201 ${response.status_code} - Check Response Body Containing Array Of URIs set to @{expected_entities_ids} + Check Response Body Containing Array Of URIs set to ${expected_entities_ids} ${response.json()} ${response}= Query Entities ... ${entities_to_be_queried} ... Building ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Created Resources Set To ${entities_to_be_created} + Check Created Resources Set To ${entities_to_be_created} ${response.json()} ${response}= Batch Delete Entities @{expected_entities_ids} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot index b128090f..f4461c66 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_02.robot @@ -30,7 +30,7 @@ Create a batch of two valid entities and one invalid entity ... ${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} + Check Response Body Containing Batch Operation Result ${expected_batch_operation_result} ${response.json()} ${expected_entities_ids}= Catenate SEPARATOR=, @{expected_successful_entities_ids} ${response}= Query Entities ... ${expected_entities_ids} @@ -38,7 +38,7 @@ Create a batch of two valid entities and one invalid entity ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} @{created_entities}= Create List ${first_entity} ${second_entity} - Check Created Resources Set To ${created_entities} + Check Created Resources Set To ${created_entities} ${response.json()} @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} ${existing_entity_id} ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} 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 58d817e6..f49cea34 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_04.robot @@ -24,9 +24,11 @@ Create a batch of one entity using a provided Link header with JSON content type Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} # Attribute should be compacted as we used the same context as provided when creating the entity - Check Response Body Containing an Attribute set to almostFull + Check Response Body Containing an Attribute set to almostFull ${response.json()} ${response}= Retrieve Entity by Id ${entity_id} # Attribute should not be compacted as we did not provide a context containing this attribute - Check Response Body Containing an Attribute set to https://ngsi-ld-test-suite/context#almostFull + Check Response Body Containing an Attribute set to + ... https://ngsi-ld-test-suite/context#almostFull + ... ${response.json()} @{entities_ids_to_be_deleted}= Create List ${entity_id} ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot index a16bb2ca..7e314ac1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_05.robot @@ -21,9 +21,9 @@ Create a batch of one entity using the default context with JSON content type Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Entity by Id ${entity_id} # Attribute should be compacted as we used the same default context as provided when creating the entity - Check Response Body Containing an Attribute set to almostFull + Check Response Body Containing an Attribute set to almostFull ${response.json()} ${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} # Attribute should not be compacted as we did not provide a context containing this term - Check Response Body Containing an Attribute set to ngsi-ld:default-context/almostFull + Check Response Body Containing an Attribute set to ngsi-ld:default-context/almostFull ${response.json()} @{entities_ids_to_be_deleted}= Create List ${entity_id} ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot index 00dc0dbc..f63251f1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_07.robot @@ -21,9 +21,11 @@ Create a batch of one entity using a JSON-LD @context obtained from the request Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} # Attribute should be compacted as we used the same context as provided when creating the entity - Check Response Body Containing an Attribute set to almostFull + Check Response Body Containing an Attribute set to almostFull ${response.json()} ${response}= Retrieve Entity by Id ${entity_id} # Attribute should not be compacted as we did not provide a context containing this term - Check Response Body Containing an Attribute set to https://ngsi-ld-test-suite/context#almostFull + Check Response Body Containing an Attribute set to + ... https://ngsi-ld-test-suite/context#almostFull + ... ${response.json()} @{entities_ids_to_be_deleted}= Create List ${entity_id} ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot index 17b0c552..7d717d55 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_01.robot @@ -21,7 +21,7 @@ Delete a batch of entities Check Response Status Code 204 ${response.status_code} ${expected_entities_ids}= Catenate SEPARATOR=, @{entities_ids_to_be_deleted} ${response}= Query Entities ${expected_entities_ids} Building context=${ngsild_test_suite_context} - Check SUT Not Containing Resources + Check SUT Not Containing Resources ${response.json()} *** Keywords *** 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 c408657c..6250b995 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_02.robot @@ -25,10 +25,10 @@ Delete a batch of non-existing and existing entities ... ${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} + Check Response Body Containing Batch Operation Result ${expected_batch_operation_result} ${response.json()} ${expected_entities_ids}= Catenate SEPARATOR=, @{expected_successful_entities_ids} ${response}= Query Entities ${expected_entities_ids} Building context=${ngsild_test_suite_context} - Check SUT Not Containing Resources + Check SUT Not Containing Resources ${response.json()} *** Keywords *** 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 a6150c46..ab6cf54a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot @@ -49,7 +49,7 @@ Batch Update Entity Scenarios ... Building ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resources Set To ${updated_entities} + Check Updated Resources Set To ${updated_entities} ${response.json()} Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} 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 d307e90c..685a3c79 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot @@ -49,7 +49,7 @@ Batch Update Entity With NoOverwrite Option Scenarios ... Building ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resources Set To ${updated_entities} + Check Updated Resources Set To ${updated_entities} ${response.json()} Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} 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 51137694..afe3e325 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_03.robot @@ -34,7 +34,7 @@ Update a batch of non-existing and existing entities ... ${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} + Check Response Body Containing Batch Operation Result ${expected_batch_operation_result} ${response.json()} ${first_created_entity}= Load Test Sample entities/${entity_payload_filename} ${first_existing_entity_id} ${second_created_entity}= Load Test Sample ... entities/${entity_payload_filename} @@ -49,7 +49,7 @@ Update a batch of non-existing and existing entities ... Building ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resources Set To ${updated_entities} + Check Updated Resources Set To ${updated_entities} ${response.json()} ${response}= Batch Delete Entities @{expected_successful_entities_ids} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot index a8b6abab..a7043f5a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_01.robot @@ -36,12 +36,12 @@ Batch Upsert Entity Scenarios ${response}= Batch Upsert Entities @{entities_to_be_upserted} @{expected_entities_ids}= Create List ${first_entity_id} ${second_entity_id} Check Response Status Code 201 ${response.status_code} - Check Response Body Containing Array Of URIs set to @{expected_entities_ids} + Check Response Body Containing Array Of URIs set to ${expected_entities_ids} ${response.json()} ${expected_updated_entities_ids}= Catenate SEPARATOR=, @{expected_entities_ids} ${response}= Query Entities ... ${expected_updated_entities_ids} ... Building ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resources Set To ${entities_to_be_upserted} + Check Updated Resources Set To ${entities_to_be_upserted} ${response.json()} ${response}= Batch Delete Entities @{expected_entities_ids} diff --git a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot index afcab510..19822b2c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_02.robot @@ -41,7 +41,7 @@ Batch Upsert Non-existing And Existing Entities Scenarios ${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} + Check Response Body Containing Array Of URIs set to ${expected_entities_ids} ${response.json()} @{upserted_entities_ids}= Create List ... ${new_entity_id} ... ${first_existing_entity_id} @@ -52,7 +52,7 @@ Batch Upsert Non-existing And Existing Entities Scenarios ... Building ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resources Set To ${entities_to_be_upserted} + Check Updated Resources Set To ${entities_to_be_upserted} ${response.json()} @{entities_ids_to_be_deleted}= Create List ${new_entity_id} ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} 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 de53092e..583cd1d8 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_03.robot @@ -42,7 +42,7 @@ Batch Upsert Existing Entities Scenarios ... Building ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resources Set To ${entities_to_be_upserted} + Check Updated Resources Set To ${entities_to_be_upserted} ${response.json()} Setup Initial Entities ${first_existing_entity_id}= Generate Random Entity Id ${building_id_prefix} 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 47681f62..5015d1fa 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_04.robot @@ -39,7 +39,7 @@ Batch Upsert Entities With Update Option Scenarios ${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} - Check Response Body Containing Array Of URIs set to @{expected_entities_ids} + 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} ${old_updated_entity}= Upsert Element In Entity ${old_entity} ${update_fragment} @@ -50,7 +50,7 @@ Batch Upsert Entities With Update Option Scenarios ... Building ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resources Set To ${updated_entities} + Check Updated Resources Set To ${updated_entities} ${response.json()} @{entities_ids_to_be_deleted}= Create List ${new_entity_id} ${response}= Batch Delete Entities @{entities_ids_to_be_deleted} 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 678baa02..59b275c0 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpsertBatchOfEntities/004_05.robot @@ -29,7 +29,7 @@ Upsert a batch of two valid entities and one invalid entity ... ${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} + Check Response Body Containing Batch Operation Result ${expected_batch_operation_result} ${response.json()} ${expected_updated_entities_ids}= Catenate SEPARATOR=, @{expected_successful_entities_ids} ${response}= Query Entities ... ${expected_updated_entities_ids} @@ -37,5 +37,5 @@ Upsert a batch of two valid entities and one invalid entity ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} @{upserted_entities}= Create List ${first_entity} ${second_entity} - Check Updated Resources Set To ${upserted_entities} + Check Updated Resources Set To ${upserted_entities} ${response.json()} ${response}= Batch Delete Entities @{expected_successful_entities_ids} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot index 4b83df49..3d17cc43 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot @@ -45,5 +45,5 @@ Create Entity Scenarios ... ${content_type} ... context=${ngsild_test_suite_context} END - Check Created Resource Set To ${created_entity} + Check Created Resource Set To ${created_entity} ${response.json()} [Teardown] Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_04.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_04.robot index bfbca10a..a8aa8108 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_04.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_04.robot @@ -23,8 +23,10 @@ Create one entity using a provided Link header with JSON content type ... context=${ngsild_test_suite_context} ${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} # Attribute should be compacted as we used the same context as provided when creating the entity - Check Response Body Containing an Attribute set to almostFull + Check Response Body Containing an Attribute set to almostFull ${response.json()} ${response}= Retrieve Entity by Id ${entity_id} # Attribute should not be compacted as we did not provide a context containing this term - Check Response Body Containing an Attribute set to https://ngsi-ld-test-suite/context#almostFull + Check Response Body Containing an Attribute set to + ... https://ngsi-ld-test-suite/context#almostFull + ... ${response.json()} ${response}= Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_05.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_05.robot index 4c44f76b..7a2ffb46 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_05.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_05.robot @@ -19,11 +19,11 @@ Create one entity using the default context with JSON content type ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_JSON} ${response}= Retrieve Entity by Id ${entity_id} # Attribute should be compacted as we used the same default context as provided when creating the entity - Check Response Body Containing an Attribute set to almostFull + Check Response Body Containing an Attribute set to almostFull ${response.json()} ${response}= Retrieve Entity by Id ... ${entity_id} ... ${CONTENT_TYPE_JSON} ... context=${ngsild_test_suite_context} # Attribute should not be compacted as we did not provide a context containing this term - Check Response Body Containing an Attribute set to ngsi-ld:default-context/almostFull + Check Response Body Containing an Attribute set to ngsi-ld:default-context/almostFull ${response.json()} ${response}= Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_07.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_07.robot index c2fda435..9f5445cc 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_07.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_07.robot @@ -19,8 +19,10 @@ Create one entity using a JSON-LD @context obtained from the request payload ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} ${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} # Attribute should be compacted as we used the same context as provided when creating the entity - Check Response Body Containing an Attribute set to almostFull + Check Response Body Containing an Attribute set to almostFull ${response.json()} ${response}= Retrieve Entity by Id ${entity_id} # Attribute should not be compacted as we did not provide a context containing this term - Check Response Body Containing an Attribute set to https://ngsi-ld-test-suite/context#almostFull + Check Response Body Containing an Attribute set to + ... https://ngsi-ld-test-suite/context#almostFull + ... ${response.json()} ${response}= Delete Entity by Id ${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 235d5953..38a00180 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/002_01.robot @@ -23,4 +23,4 @@ Delete an entity ${response}= Delete Entity by Id Returning Response ${entity_id} Check Response Status Code 204 ${response.status_code} ${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} - Check SUT Not Containing Resource + Check SUT Not Containing Resource ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot index 5f2d95f2..02ed006c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot @@ -57,7 +57,7 @@ Append Attributes Without Params ... ${entity_id} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resource Set To ${entity_expectation_payload} + Check Updated Resource Set To ${entity_expectation_payload} ${response.json()} [Teardown] Delete Entity by Id Returning Response ${entity_id} Append Attributes With Params @@ -89,5 +89,5 @@ Append Attributes With Params ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context - Check Updated Resource Set To ${entity_expectation_payload} ${ignored_attributes} + Check Updated Resource Set To ${entity_expectation_payload} ${response.json()} ${ignored_attributes} [Teardown] Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot index 8e90be9d..25978e8c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/DeleteEntityAttribute/013_01.robot @@ -48,5 +48,5 @@ Delete Attributes ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context - Check Updated Resource Set To ${entity_expectation_payload} ${ignored_attributes} + Check Updated Resource Set To ${entity_expectation_payload} ${response.json()} ${ignored_attributes} [Teardown] Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot index f62936e2..82ed9453 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_01.robot @@ -44,5 +44,5 @@ Update Attributes ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context - Check Updated Resource Set To ${entity_expectation_payload} ${ignored_attributes} + Check Updated Resource Set To ${entity_expectation_payload} ${response.json()} ${ignored_attributes} [Teardown] Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot index 9c1abaf8..2801cba5 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot @@ -48,5 +48,5 @@ Update Attributes ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List @context - Check Updated Resource Set To ${entity_expectation_payload} ${ignored_attributes} + Check Updated Resource Set To ${entity_expectation_payload} ${response.json()} ${ignored_attributes} [Teardown] Delete Entity by Id Returning Response ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot index d78353d6..e52305a8 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot @@ -45,5 +45,8 @@ Create Temporal Entity ${temporal_entity_expectation_payload}= Load Test Sample ... temporalEntities/expectations/${expectation_filename} ... ${temporal_entity_representation_id} - Check Created Resource Set To ${temporal_entity_expectation_payload} ${ignored_attributes} + Check Created Resource Set To + ... ${temporal_entity_expectation_payload} + ... ${response.json()} + ... ${ignored_attributes} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_01.robot index cd263d54..02051616 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/DeleteTemporalRepresentationOfEntity/009_01.robot @@ -27,4 +27,4 @@ Delete a temporal representation of an entity with simple temporal properties ${response}= Retrieve Temporal Representation Of Entity ... ${temporal_entity_representation_id} ... context=${ngsild_test_suite_context} - Check SUT Not Containing Resource + Check SUT Not Containing Resource ${response.status_code} 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 8e2dd36c..b04ba707 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/UpdateTemporalRepresentationOfEntity/008_01.robot @@ -36,5 +36,8 @@ ${expectation_filename}= vehicle-temporal-representation-update-expectation.j ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List instanceId @context - Check Updated Resource Set To ${temporal_entity_expectation_payload} ${ignored_attributes} + Check Updated Resource Set To + ... ${temporal_entity_expectation_payload} + ... ${response.json()} + ... ${ignored_attributes} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_01.robot index b510e97a..4e6ea7f9 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/AppendAttributes/014_01.robot @@ -36,5 +36,8 @@ ${expectation_filename}= vehicle-temporal-representation-added-attribute-expe ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List instanceId @context - Check Updated Resource Set To ${temporal_entity_expectation_payload} ${ignored_attributes} + Check Updated Resource Set To + ... ${temporal_entity_expectation_payload} + ... ${response.json()} + ... ${ignored_attributes} [Teardown] 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 88c24a25..9b206409 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttribute/015_01.robot @@ -51,5 +51,8 @@ Delete Attribute From A Temporal Entity ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List instanceId @context - Check Updated Resource Set To ${temporal_entity_expectation_payload} ${ignored_attributes} + Check Updated Resource Set To + ... ${temporal_entity_expectation_payload} + ... ${response.json()} + ... ${ignored_attributes} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot index ccdb46d9..e3ef12a6 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot @@ -44,5 +44,8 @@ ${expectation_filename}= vehicle-temporal-representation-delete-speed-instanc ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List instanceId @context - Check Updated Resource Set To ${temporal_entity_expectation_payload} ${ignored_attributes} + Check Updated Resource Set To + ... ${temporal_entity_expectation_payload} + ... ${response.json()} + ... ${ignored_attributes} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot index fc7f9636..19ad0a2c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot @@ -57,5 +57,8 @@ ${attributeId}= speed ... temporalEntities/expectations/${expectation_filename} ... ${temporal_entity_representation_id} ${ignored_attributes}= Create List instanceId @context modifiedAt - Check Updated Resource Set To ${temporal_entity_expectation_payload} ${ignored_attributes} + Check Updated Resource Set To + ... ${temporal_entity_expectation_payload} + ... ${response.json()} + ... ${ignored_attributes} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot index e5e8f6de..0df82096 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_01.robot @@ -26,5 +26,5 @@ Create Subscription ... ${subscription_id} ... accept=${CONTENT_TYPE_LD_JSON} ... context=${ngsild_test_suite_context} - Check Created Resource Set To ${expected_subscription} + Check Created Resource Set To ${expected_subscription} ${response.json()} [Teardown] 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 7a12cff9..ad4c8980 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_03.robot @@ -21,7 +21,7 @@ Delete Subscription ${response}= Delete Subscription ${subscription_id} Check Response Status Code 204 ${response.status_code} ${response}= Retrieve Subscription ${subscription_id} - Check SUT Not Containing Resource + Check SUT Not Containing Resource ${response.status_code} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot index 757768a1..f5706541 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot @@ -30,6 +30,7 @@ Query Subscriptions Check Response Body Containing List Containing Subscription elements ... ${expectation_file_path} ... ${subscription_ids} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot index c8c763a1..7cb65072 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_02.robot @@ -39,8 +39,11 @@ Query Subscriptions With Limit And Page Parameters ... offset=${offset} ... accept=${CONTENT_TYPE_LD_JSON} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing Number Of Entities Subscription ${expectation_subscription_number} - Check Pagination Prev And Next Headers ${prev_link} ${next_link} + Check Response Body Containing Number Of Entities + ... Subscription + ... ${expectation_subscription_number} + ... ${response.json()} + Check Pagination Prev And Next Headers ${prev_link} ${next_link} ${response.headers} Setup Initial Subscriptions ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot index 9cfdf7c1..5689e01a 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/RetrieveSubscription/030_03.robot @@ -21,7 +21,10 @@ Retrieve Subscription [Tags] sub-retrieve 5_8_3 ${response}= Retrieve Subscription ${subscription_id} context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing Subscription element ${expectation_file_path} ${subscription_id} + Check Response Body Containing Subscription element + ... ${expectation_file_path} + ... ${subscription_id} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot index 3c571964..340d4fcd 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_05.robot @@ -31,10 +31,12 @@ Update Subscription With Term to Uri Expansion Check Response Body Containing Subscription element ... ${expected_subscription_payload_file_path} ... ${subscription_id} + ... ${response.json()} ${response}= Retrieve Subscription ${subscription_id} Check Response Body Containing Subscription element ... ${expected_expanded_subscription_payload_file_path} ... ${subscription_id} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot index a3fcfb84..606ecfeb 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot @@ -32,7 +32,7 @@ Update Subscription ... accept=${CONTENT_TYPE_LD_JSON} ... context=${ngsild_test_suite_context} ${ignored_attributes}= Create List ${status_regex_expr} - Check Updated Resource Set To ${subscription} ${ignored_attributes} + Check Updated Resource Set To ${subscription} ${response.json()} ${ignored_attributes} *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot index 9c8ef145..6b1a4158 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_07.robot @@ -30,7 +30,7 @@ Activate Paused Subscription With isActive Member ... ${CONTENT_TYPE_JSON} Check Response Status Code 204 ${response.status_code} ${response}= Retrieve Subscription ${subscription_id} - Check Response Body Containing an Attribute set to status active + Check Response Body Containing an Attribute set to status ${response.json()} active Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot index 9f07d0e5..ad62120e 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_08.robot @@ -31,7 +31,7 @@ Activate Paused Subscription With isActive And ExpiresAt Members ... ${CONTENT_TYPE_JSON} Check Response Status Code 204 ${response.status_code} ${response}= Retrieve Subscription ${subscription_id} - Check Response Body Containing an Attribute set to status active + Check Response Body Containing an Attribute set to status ${response.json()} active Setup Initial Subscriptions ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot index 3b2b8fc6..024d6d12 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_09.robot @@ -25,7 +25,7 @@ Update Subscription Status To Paused ... ${CONTENT_TYPE_JSON} Check Response Status Code 204 ${response.status_code} ${response}= Retrieve Subscription ${subscription_id} - Check Response Body Containing an Attribute set to status paused + Check Response Body Containing an Attribute set to status ${response.json()} paused *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot index a82c2089..aeb29fa0 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_10.robot @@ -36,7 +36,7 @@ Activate Expired Subscription ... ${CONTENT_TYPE_JSON} Check Response Status Code 204 ${response.status_code} ${response}= Retrieve Subscription ${subscription_id} - Check Response Body Containing an Attribute set to status active + Check Response Body Containing an Attribute set to status ${response.json()} active *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot index a87d5cdb..51a25ad2 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot @@ -25,5 +25,5 @@ Create Context Source Registration With Specific Date Expiration Date ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} - Check Created Resource Set To ${registration_payload} ${ignored_attributes} + Check Created Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot index 29a3e5ef..87917bd3 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot @@ -26,5 +26,5 @@ Create Context Source Registration That Never Expires ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} - Check Created Resource Set To ${registration_payload} ${ignored_attributes} + Check Created Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot index 611e8a09..1ba8d35c 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot @@ -25,5 +25,5 @@ Create Context Source Registration Without A Sprecified ID ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} - Check Created Resource Set To ${registration_payload} ${ignored_attributes} + Check Created Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot index d820ecaf..0f0eb201 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_04.robot @@ -24,9 +24,10 @@ Create one context source registration using a provided Link header with JSON co ... ${ngsild_test_suite_context} Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} - Check JSON Value In Response Body ['information']['entities'][0]['type'] Building + Check JSON Value In Response Body ['information']['entities'][0]['type'] Building ${response.json()} ${response}= Retrieve Context Source Registration ${registration_id} Check JSON Value In Response Body ... ['information']['entities'][0]['type'] ... https://ngsi-ld-test-suite/context#Building + ... ${response.json()} [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot index cbb25fc5..f486086c 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot @@ -23,7 +23,10 @@ Create one context source registration using the default context with JSON conte ... ${CONTENT_TYPE_JSON} Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} - Check JSON Value In Response Body ['information']['entities'][0]['type'] ngsi-ld:default-context/Building + Check JSON Value In Response Body + ... ['information']['entities'][0]['type'] + ... ngsi-ld:default-context/Building + ... ${response.json()} ${response}= Retrieve Context Source Registration ${registration_id} - Check JSON Value In Response Body ['information']['entities'][0]['type'] Building + Check JSON Value In Response Body ['information']['entities'][0]['type'] Building ${response.json()} [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot index 98ce13ab..77b28786 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_07.robot @@ -23,9 +23,10 @@ Create one context source registration using a JSON-LD @context obtained from th ... ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response.status_code} ${response}= Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} - Check JSON Value In Response Body ['information']['entities'][0]['type'] Building + Check JSON Value In Response Body ['information']['entities'][0]['type'] Building ${response.json()} ${response}= Retrieve Context Source Registration ${registration_id} Check JSON Value In Response Body ... ['information']['entities'][0]['type'] ... https://ngsi-ld-test-suite/context#Building + ... ${response.json()} [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot index 1572d996..bd7979a8 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot @@ -23,4 +23,4 @@ Delete a context source registration by id ${response}= Delete Context Source Registration With Return ${registration_id} Check Response Status Code 204 ${response.status_code} ${response}= Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} - Check SUT Not Containing Resource + Check SUT Not Containing Resource ${response.status_code} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_01.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_01.robot index 785cab26..34484615 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_01.robot @@ -40,6 +40,7 @@ Query Context Source Registration Check Response Body Containing List Containing Context Source Registrations elements ... ${expectation_file_path} ... ${expected_context_source_registration_ids} + ... ${response.json()} Setup Initial Context Source Registrations ${first_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_04.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_04.robot index 25864bcb..200574a3 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_04.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_04.robot @@ -25,6 +25,7 @@ Query Context Source Registrations Without Context Check Response Body Containing List Containing Context Source Registrations elements ... ${expectation_file_path} ... ${expected_context_source_registration_ids} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_05.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_05.robot index b4e1c5d2..22b7a7ca 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_05.robot @@ -40,4 +40,5 @@ Query Context Source Registration Matching EntityInfo of RegistrationInfo Check Response Body Containing List Containing Context Source Registrations elements ... ${expectation_file_path} ... ${expected_context_source_registration_ids} + ... ${response.json()} [Teardown] Delete Context Source Registration ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_06.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_06.robot index 7c8a00c3..7f803e34 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_06.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_06.robot @@ -37,6 +37,7 @@ Query Context Source Registration Matching Properties And Relationships Of Regis Check Response Body Containing List Containing Context Source Registrations elements ... ${expectation_file_path} ... ${expected_context_source_registration_ids} + ... ${response.json()} Setup Initial Context Source Registration ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_07.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_07.robot index 49492e94..6cb09ceb 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_07.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_07.robot @@ -39,6 +39,7 @@ Query Context Source Registration Matching Geoquery Check Response Body Containing List Containing Context Source Registrations elements ... ${expectation_file_path} ... ${expected_context_source_registration_ids} + ... ${response.json()} Setup Initial Context Source Registration ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_08.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_08.robot index 39a33d5a..b1fe80c5 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_08.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_08.robot @@ -25,6 +25,7 @@ Query Context Source Registration Without Temporal Query Check Response Body Containing List Containing Context Source Registrations elements ... ${expectation_file_path} ... ${expected_context_source_registration_ids} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_09.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_09.robot index 1173a309..f5170635 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_09.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_09.robot @@ -52,4 +52,5 @@ Query Context Source Registration Matching Temporal Query Check Response Body Containing List Containing Context Source Registrations elements ... ${expectation_file_path} ... ${expected_context_source_registration_ids} + ... ${response.json()} [Teardown] Delete Context Source Registration ${context_source_registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_10.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_10.robot index f8e8711c..0becb0ad 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_10.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_10.robot @@ -44,6 +44,7 @@ Query Context Source Registration With Query Params Check Response Body Containing List Containing Context Source Registrations elements ... ${expectation_file_path} ... ${expected_context_source_registration_ids} + ... ${response.json()} Setup Initial Context Source Registrations ${first_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_11.robot b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_11.robot index e85b7ac9..4708063f 100644 --- a/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_11.robot +++ b/TP/NGSI-LD/ContextSource/Registration/QueryContextSourceRegistrations/037_11.robot @@ -39,8 +39,11 @@ Query Context Source Registration With Limit And Page Parameters ... limit=${limit} ... page=${page} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing Number Of Entities ContextSourceRegistration ${expected_number} - Check Pagination Prev And Next Headers ${prev_link} ${next_link} + Check Response Body Containing Number Of Entities + ... ContextSourceRegistration + ... ${expected_number} + ... ${response.json()} + Check Pagination Prev And Next Headers ${prev_link} ${next_link} ${response.json()} Setup Initial Context Source Registrations ${first_context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_03.robot b/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_03.robot index 53055cb1..a9500486 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_03.robot @@ -24,6 +24,7 @@ Retrieve Context Source Registration With Default Core Context Check Response Body Containing Context Source Registration element ... ${expectation_file_path} ... ${context_source_registration_id} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_04.robot b/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_04.robot index 1a1f6757..3c968a87 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_04.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_04.robot @@ -26,6 +26,7 @@ Retrieve Context Source Registration Check Response Body Containing Context Source Registration element ... ${expectation_file_path} ... ${context_source_registration_id} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_05.robot b/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_05.robot index 03d9fed5..37be8a91 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_05.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RetrieveContextSourceRegistration/036_05.robot @@ -35,6 +35,7 @@ Check JSON-LD resolution when retrieving a context source registration Check Response Body Containing Context Source Registration element ... ${expected_payload} ... ${context_source_registration_id} + ... ${response.json()} Setup Initial Context Source Registration ${context_source_registration_id}= Generate Random Entity Id ${context_source_registration_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot index 7ddf9977..3050f041 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot @@ -41,5 +41,5 @@ Update Context Source ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} @context - Check Updated Resource Set To ${registration_payload} ${ignored_attributes} + Check Updated Resource Set To ${registration_payload} ${response.json()} ${ignored_attributes} [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot index 9dcaaa19..d96731cf 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot @@ -27,7 +27,7 @@ Create Context Source Registration Subscription ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${status_regex_expr} - Check Created Resource Set To ${subscription_payload} ${ignored_attributes} + Check Created Resource Set To ${subscription_payload} ${response.json()} ${ignored_attributes} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot index 7acfe0ef..e54d7e86 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_02.robot @@ -28,7 +28,7 @@ Create Context Source Registration Subscription Without An Id ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} ${ignored_attributes}= Create List ${id_regex_expr} ${status_regex_expr} - Check Created Resource Set To ${subscription_payload} ${ignored_attributes} + Check Created Resource Set To ${subscription_payload} ${response.json()} ${ignored_attributes} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_03.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_03.robot index 131e2dec..12673b28 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_03.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_03.robot @@ -23,7 +23,7 @@ Create Context Source Registration Subscription Without isActive Member Check Response Status Code 201 ${response.status_code} Check Response Headers Containing URI set to ${subscription_id} ${response.headers} ${response}= Retrieve context source registration subscription ${subscription_id} - Check Response Body Containing an Attribute set to status active + Check Response Body Containing an Attribute set to status ${response.json()} active *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_04.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_04.robot index da1e0f8e..25ba1341 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_04.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_04.robot @@ -23,7 +23,7 @@ Create Inactive Context Source Registration Subscription Check Response Status Code 201 ${response.status_code} Check Response Headers Containing URI set to ${subscription_id} ${response.headers} ${response}= Retrieve context source registration subscription ${subscription_id} - Check Response Body Containing an Attribute set to status paused + Check Response Body Containing an Attribute set to status ${response.json()} paused *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot index 6b560383..52b6a0eb 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot @@ -27,7 +27,7 @@ Create Context Source Registration Subscription With expiresAt Member Check Response Headers Containing URI set to ${subscription_id} ${response.headers} Sleep 15s ${response}= Retrieve context source registration subscription ${subscription_id} - Check Response Body Containing an Attribute set to status expired + Check Response Body Containing an Attribute set to status ${response.json()} expired *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_06.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_06.robot index c719246c..3ccfc4de 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_06.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_06.robot @@ -25,7 +25,7 @@ Create Context Source Registration Subscription Without expiresAt Member # Let's say if the subscription stills active after 10s it will be considered as perpetual, but this is not enough Sleep 10s ${response}= Retrieve context source registration subscription ${subscription_id} - Check Response Body Containing an Attribute set to status active + Check Response Body Containing an Attribute set to status ${response.json()} active *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot index 6a605539..c9e55421 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/DeleteContextSourceRegistrationSubscription/042_01.robot @@ -22,7 +22,7 @@ Delete Context Source Registration Subscription ${response}= Retrieve Context Source Registration Subscription ... ${subscription_id} ... context=${ngsild_test_suite_context} - Check SUT Not Containing Resource + Check SUT Not Containing Resource ${response.status_code} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_05.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_05.robot index 71cc885d..8b679d27 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_05.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_05.robot @@ -31,7 +31,10 @@ If A cSourceNotification Is Successfully Sent The Notification Member Shall Be U Wait for notification ${response}= Retrieve Context Source Registration Subscription ${subscription_id} @{expected_notification_additional_members}= Create List lastNotification lastSuccess - Check NotificationParams ${notification_expectation_file_path} ${expected_notification_additional_members} + Check NotificationParams + ... ${notification_expectation_file_path} + ... ${expected_notification_additional_members} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_06.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_06.robot index 7e321bf0..a497ee95 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_06.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/NotificationBehaviour/047_06.robot @@ -31,7 +31,10 @@ If A cSourceNotification Is Not Successfully Sent The Notification Member Shall Wait for no notification ${response}= Retrieve Context Source Registration Subscription ${subscription_id} @{expected_notification_additional_members}= Create List lastNotification lastFailure - Check NotificationParams ${notification_expectation_file_path} ${expected_notification_additional_members} + Check NotificationParams + ... ${notification_expectation_file_path} + ... ${expected_notification_additional_members} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot index d245dd81..d5ee16d8 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_01.robot @@ -26,6 +26,7 @@ Query Context Source Registration Subscriptions Check Response Body Containing List Containing Subscription elements ... ${expectation_file_path} ... ${subscription_ids} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot index 1d1331d6..64c0a027 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_02.robot @@ -38,7 +38,10 @@ Query Context Source Registration Subscriptions With Limit Parameter ... context=${ngsild_test_suite_context} ... limit=${limit} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing Number Of Entities Subscription ${expectation_subscription_number} + Check Response Body Containing Number Of Entities + ... Subscription + ... ${expectation_subscription_number} + ... ${response.json()} Setup Initial Context Source Registration Subscriptions ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot index 5cbac889..f435b3ab 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/QueryContextSourceRegistrationSubscriptions/041_03.robot @@ -38,8 +38,11 @@ Query Context Source Registration Subscriptions With Limit And Page Parameters ... limit=${limit} ... page=${page} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing Number Of Entities Subscription ${expectation_subscription_number} - Check Pagination Prev And Next Headers ${prev_link} ${next_link} + Check Response Body Containing Number Of Entities + ... Subscription + ... ${expectation_subscription_number} + ... ${response.json()} + Check Pagination Prev And Next Headers ${prev_link} ${next_link} ${response.json()} Setup Initial Context Source Registration Subscriptions ${first_subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot index 4990c31b..6f962046 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot @@ -23,7 +23,10 @@ Retrieve Context Source Registration Subscription ... ${subscription_id} ... context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing Subscription element ${expectation_file_path} ${subscription_id} + Check Response Body Containing Subscription element + ... ${expectation_file_path} + ... ${subscription_id} + ... ${response.json()} *** Keywords *** diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot index d3b9d6df..7905fd7b 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/UpdateContextSourceRegistrationSubscription/039_01.robot @@ -29,7 +29,7 @@ Update Context Source Registration Subscription ... ${subscription_id} ... context=${ngsild_test_suite_context} ... accept=${CONTENT_TYPE_LD_JSON} - Check Updated Resource Set To ${subscription} + Check Updated Resource Set To ${subscription} ${response.json()} *** Keywords *** diff --git a/libraries/assertionUtils.py b/libraries/assertionUtils.py index b9dde5a7..36fbf0d1 100644 --- a/libraries/assertionUtils.py +++ b/libraries/assertionUtils.py @@ -1,5 +1,6 @@ from deepdiff import DeepDiff + def compare_dictionaries_ignoring_keys(expected, actual, exclude_regex_paths, group_by=None): """Function exposed as a keyword to compare two dictionaries :param expected: expected dictionary @@ -7,9 +8,10 @@ def compare_dictionaries_ignoring_keys(expected, actual, exclude_regex_paths, gr :param exclude_regex_paths: list of regex paths of keys to be ignored :param group_by: a key to group the results, useful for lists of results """ - res = {} + if group_by is not None: - res = DeepDiff(expected, actual, exclude_regex_paths=exclude_regex_paths, ignore_order=True, verbose_level=1, group_by=group_by) + res = DeepDiff(expected, actual, exclude_regex_paths=exclude_regex_paths, ignore_order=True, verbose_level=1, + group_by=group_by) else: res = DeepDiff(expected, actual, exclude_regex_paths=exclude_regex_paths, ignore_order=True, verbose_level=1) return res diff --git a/libraries/logUtils.py b/libraries/logUtils.py index 1de30abe..dec7fef5 100644 --- a/libraries/logUtils.py +++ b/libraries/logUtils.py @@ -9,7 +9,8 @@ from robot.api.deco import keyword @keyword(name="Output", tags=("I/O",)) def output(response, console=True): """*Request and response are output to terminal and file (in JSON).* - ``console``: If false, the JSON is not written to terminal. Default is true. + :param response: response to a request + :param console: If false, the JSON is not written to terminal. Default is true. """ try: diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 863b2536..da6ba285 100755 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -87,7 +87,6 @@ Query Entity ... headers=${headers} ... params=${params} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -150,7 +149,6 @@ Query Entities ... headers=${headers} ... params=${params} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -199,7 +197,6 @@ Retrieve Entity by Id ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" END ${response}= GET url=${url}/${ENTITIES_ENDPOINT_PATH}${id} headers=${headers} expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -328,7 +325,6 @@ Retrieve Entity Types ... headers=${headers} ... params=${params} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -348,7 +344,6 @@ Retrieve Entity Type ... url=${url}/${ENTITIES_TYPES_ENDPOINT_PATH}/${type} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -371,7 +366,6 @@ Retrieve Attributes ... headers=${headers} ... params=${params} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -391,7 +385,6 @@ Retrieve Attribute ... url=${url}/${ATTRIBUTES_ENDPOINT_PATH}/${attribute_name} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -475,7 +468,6 @@ Create Temporal Representation Of Entity Selecting Content Type ... data=${file_content} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -633,7 +625,6 @@ Batch Create Entities ... json=@{entities_to_be_created} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -645,7 +636,6 @@ Batch Upsert Entities ... json=@{entities_to_be_upserted} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -657,7 +647,6 @@ Batch Update Entities ... json=@{entities_to_be_updated} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -669,7 +658,6 @@ Batch Delete Entities ... json=@{entities_ids_to_be_deleted} ... headers=${headers} ... expected_status=any - IF not ${teardown} Set Test Variable ${response} Output ${response} RETURN ${response} @@ -682,7 +670,6 @@ Request Entity From File ... data=${file_content} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -696,7 +683,6 @@ Batch Request Entities From File ... data=${file_content} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -757,7 +743,6 @@ Retrieve Temporal Representation Of Entity ... headers=${headers} ... params=${params} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -826,7 +811,6 @@ Query Temporal Representation Of Entities ... headers=${headers} ... params=${params} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -843,7 +827,6 @@ Query Temporal Representation Of Entities Via Post ... json=${query_payload} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -865,7 +848,6 @@ Create Context Source Registration ... json=${context_source_registration_payload} ... headers=${headers} ... expected_status=any - Set Suite Variable ${response} Output ${response} RETURN ${response} @@ -876,7 +858,6 @@ Update Context Source Registration ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${context_source_registration_id} ... json=${update_fragment} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -937,7 +918,6 @@ Query Context Source Registrations ... headers=${headers} ... params=${params} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -945,7 +925,6 @@ Delete Context Source Registration [Arguments] ${context_source_registration_id} ${response}= DELETE url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${context_source_registration_id} - Set Suite Variable ${response} Output ${response} RETURN ${response} @@ -963,7 +942,6 @@ Retrieve Context Source Registration ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${context_source_registration_id} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -979,7 +957,6 @@ Create Context Source Registration Subscription ... json=${subscription_payload} ... headers=${headers} ... expected_status=any - Set Suite Variable ${response} Output ${response} RETURN ${response} @@ -990,7 +967,6 @@ Update Context Source Registration Subscription ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_SUBSCRIPTION_ENDPOINT_PATH}/${subscription_id} ... json=${subscription_update_fragment} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -1008,7 +984,6 @@ Retrieve Context Source Registration Subscription ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_SUBSCRIPTION_ENDPOINT_PATH}/${subscription_id} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -1031,7 +1006,6 @@ Query Context Source Registration Subscriptions ... headers=${headers} ... params=${params} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -1039,7 +1013,6 @@ Delete Context Source Registration Subscription [Arguments] ${subscription_id} ${response}= DELETE ${url}/${CONTEXT_SOURCE_REGISTRATION_SUBSCRIPTION_ENDPOINT_PATH}/${subscription_id} - Set Suite Variable ${response} Output ${response} RETURN ${response} @@ -1050,7 +1023,6 @@ Update Context Source Registration Subscription From File ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_SUBSCRIPTION_ENDPOINT_PATH}/${subscription_id} ... data=${file_content} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -1112,7 +1084,6 @@ Create Subscription From File ... data=${file_content} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -1138,7 +1109,6 @@ Update Subscription ... json=${subscription_update_fragment} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -1158,14 +1128,12 @@ Update Subscription With Payload ... json=${payload} ... headers=${headers} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} Delete Subscription [Arguments] ${subscription_id} ${response}= DELETE url=${url}/${SUBSCRIPTION_ENDPOINT_PATH}${subscription_id} expected_status=any - Set Suite Variable ${response} Output ${response} RETURN ${response} @@ -1190,7 +1158,6 @@ Query Subscriptions ... headers=${headers} ... params=${params} ... expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} @@ -1208,7 +1175,6 @@ Retrieve Subscription END ${response}= GET url=${url}/${SUBSCRIPTION_ENDPOINT_PATH}${id} headers=${headers} expected_status=any - Set Test Variable ${response} Output ${response} RETURN ${response} diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index c107722e..c6dd0a89 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -22,8 +22,8 @@ Check Response Status Code Should Be Equal ${expected_status_code} ${response_status_code} Check Response Body Containing Array Of URIs set to - [Arguments] @{expected_entities_ids} - Lists Should Be Equal ${expected_entities_ids} ${response.json()} ignore_order=True + [Arguments] ${expected_entities_ids} ${response_body} + Lists Should Be Equal ${expected_entities_ids} ${response_body} ignore_order=True Check Response Body Content [Arguments] ${expectation_filename} ${response_body} ${additional_ignored_path}=${EMPTY} @@ -36,22 +36,22 @@ Check Response Body Content Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Headers Containing Content-Type set to - [Arguments] ${response} ${expected_content_type_content} - Should Be Equal ${response['Content-Type']} ${expected_content_type_content} + [Arguments] ${expected_content_type_content} ${response_headers} + Should Be Equal ${response_headers['Content-Type']} ${expected_content_type_content} Check Response Headers Link Not Empty - [Arguments] ${response} - Should Not Be Empty ${response['Link']} + [Arguments] ${response_headers} + Should Not Be Empty ${response_headers['Link']} # Since Http headers names are case-insensitive (from Http specification) # We check both Location and location headers Check Response Headers Containing URI set to - [Arguments] ${expected_entity_id} ${response} + [Arguments] ${expected_entity_id} ${response_headers} - IF 'Location' in ${response} + IF 'Location' in ${response_headers} Should Contain - ... ${response['Location']} + ... ${response_headers['Location']} ... ${expected_entity_id} ... ignore_order=True END @@ -60,32 +60,32 @@ Check Response Headers Containing URI set to # We check both Location and location headers Check Response Headers ID Not Empty - [Arguments] ${response} + [Arguments] ${response_headers} ${location_header}= Set Variable If - ... 'Location' in ${response} - ... ${response['Location']} + ... 'Location' in ${response_headers} + ... ${response_headers['Location']} ${id}= Fetch From Right ${location_header} / Should Not Be Empty ${id} RETURN ${id} Check Response Body Containing an Attribute set to - [Arguments] ${expected_attribute_name} ${expected_attribute_value}=${EMPTY} - Should Not Be Empty ${response.json()['${expected_attribute_name}']} + [Arguments] ${expected_attribute_name} ${response_body} ${expected_attribute_value}=${EMPTY} + Should Not Be Empty ${response_body['${expected_attribute_name}']} IF '${expected_attribute_value}'!='' - Should Be Equal ${response.json()['${expected_attribute_name}']} ${expected_attribute_value} + Should Be Equal ${response_body['${expected_attribute_name}']} ${expected_attribute_value} END Check Response Body Containing Batch Operation Result - [Arguments] ${expected_batch_operation_result} + [Arguments] ${expected_batch_operation_result} ${response_body} @{expected_successful_entities_ids}= Get From Dictionary ${expected_batch_operation_result} success @{expected_failed_entities_ids}= Get From Dictionary ${expected_batch_operation_result} errors - @{response_errors}= Get From Dictionary ${response.json()} errors + @{response_errors}= Get From Dictionary ${response_body} errors ${expected_failed_entities_ids_length}= Get Length ${expected_failed_entities_ids} ${response_errors_length}= Get Length ${response_errors} - Lists Should Be Equal ${expected_successful_entities_ids} ${response.json()['success']} ignore_order=True + Lists Should Be Equal ${expected_successful_entities_ids} ${response_body['success']} ignore_order=True Should be Equal as Integers ${expected_failed_entities_ids_length} ${response_errors_length} FOR ${response_error} IN @{response_errors} List Should Contain Value ${expected_failed_entities_ids} ${response_error['entityId']} @@ -128,7 +128,7 @@ Check Response Body Containing List Containing Entity Elements With Different Ty Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing EntityTemporal element - [Arguments] ${filename} ${temporal_entity_representation_id} + [Arguments] ${filename} ${temporal_entity_representation_id} ${response_body} ${temporal_entity_representation_payload}= Load JSON From File ... ${EXECDIR}/data/temporalEntities/expectations/${filename} ${temporal_entity_representation}= Update Value To JSON @@ -137,12 +137,12 @@ Check Response Body Containing EntityTemporal element ... ${temporal_entity_representation_id} ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${temporal_entity_representation} - ... ${response.json()} + ... ${response_body} ... ${instance_id_regex_expr} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing List Containing EntityTemporal elements - [Arguments] ${filename} ${temporal_entities_representation_ids} + [Arguments] ${filename} ${temporal_entities_representation_ids} ${response_body} ${temporal_entities_representation_payload}= Load JSON From File ... ${EXECDIR}/data/temporalEntities/expectations/${filename} ${index}= Set Variable 0 @@ -155,24 +155,24 @@ Check Response Body Containing List Containing EntityTemporal elements END ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${temporal_entities_representation_payload} - ... ${response.json()} + ... ${response_body} ... ${instance_id_regex_expr} ... group_by=id Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing Subscription element - [Arguments] ${expectation_filename} ${subscription_id} + [Arguments] ${expectation_filename} ${subscription_id} ${response_body} ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${expectation_filename} ${subscription}= Update Value To JSON ${subscription_payload} $..id ${subscription_id} ${ignored_keys}= Create List ${context_regex_expr} ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${subscription} - ... ${response.json()} + ... ${response_body} ... ${ignored_keys} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing List Containing Subscription elements - [Arguments] ${expectation_file_path} ${subscription_ids} + [Arguments] ${expectation_file_path} ${subscription_ids} ${response_body} ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${expectation_file_path} ${index}= Set Variable 0 FOR ${subscription_id} IN @{subscription_ids} @@ -185,7 +185,7 @@ Check Response Body Containing List Containing Subscription elements ${ignored_keys}= Create List ${context_regex_expr} ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${subscription_payload} - ... ${response.json()} + ... ${response_body} ... ${ignored_keys} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} @@ -193,10 +193,10 @@ Check Response Body Containing List Containing Subscription elements # A check on the response body type is needed Check Response Body Containing Number Of Entities - [Arguments] ${expected_entity_type} ${expected_length} + [Arguments] ${expected_entity_type} ${expected_length} ${response_body} - ${response_body_length}= Get Length ${response.json()} - ${is_list}= Run Keyword Evaluate type(${response.json()})==list + ${response_body_length}= Get Length ${response_body} + ${is_list}= Run Keyword Evaluate type(${response_body})==list IF ${is_list} Should Be Equal ${response_body_length} ${expected_length} @@ -206,15 +206,15 @@ Check Response Body Containing Number Of Entities FOR ${index} IN RANGE ${expected_length} IF ${is_list} - Should Be Equal ${response.json()[${index}]['type']} ${expected_entity_type} + Should Be Equal ${response_body[${index}]['type']} ${expected_entity_type} END END IF ${is_list} is ${FALSE} - Should Be Equal ${response.json()['type']} ${expected_entity_type} + Should Be Equal ${response_body['type']} ${expected_entity_type} END Check Response Body Containing Context Source Registration element - [Arguments] ${expectation_filename} ${context_source_registration_id} + [Arguments] ${expectation_filename} ${context_source_registration_id} ${response_body} ${context_source_registration_payload}= Load JSON From File ${EXECDIR}/data/${expectation_filename} ${context_source_registration}= Update Value To JSON ... ${context_source_registration_payload} @@ -223,62 +223,62 @@ Check Response Body Containing Context Source Registration element ${ignored_keys}= Create List ${context_regex_expr} ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${context_source_registration} - ... ${response.json()} + ... ${response_body} ... ${ignored_keys} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing EntityTypeList element - [Arguments] ${expectation_filename} + [Arguments] ${expectation_filename} ${response_body} ${entity_type_list_payload}= Load JSON From File ${EXECDIR}/data/${expectation_filename} ${ignored_keys}= Create List ${id_regex_expr} ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${entity_type_list_payload} - ... ${response.json()} + ... ${response_body} ... ${ignored_keys} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing EntityType element - [Arguments] ${expectation_filename} + [Arguments] ${expectation_filename} ${response_body} ${entity_type_payload}= Load JSON From File ${EXECDIR}/data/${expectation_filename} ${ignored_keys}= Create List ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${entity_type_payload} - ... ${response.json()} + ... ${response_body} ... ${ignored_keys} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing EntityTypeInfo element - [Arguments] ${expectation_filename} + [Arguments] ${expectation_filename} ${response_body} ${entity_type_info_payload}= Load JSON From File ${EXECDIR}/data/${expectation_filename} ${ignored_keys}= Create List ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${entity_type_info_payload} - ... ${response.json()} + ... ${response_body} ... ${ignored_keys} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing AttributeList element - [Arguments] ${expectation_filename} + [Arguments] ${expectation_filename} ${response_body} ${attribute_list_payload}= Load JSON From File ${EXECDIR}/data/${expectation_filename} ${ignored_keys}= Create List ${id_regex_expr} ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${attribute_list_payload} - ... ${response.json()} + ... ${response_body} ... ${ignored_keys} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing Attribute element - [Arguments] ${expectation_filename} + [Arguments] ${expectation_filename} ${response_body} ${attribute_payload}= Load JSON From File ${EXECDIR}/data/${expectation_filename} ${ignored_keys}= Create List ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${attribute_payload} - ... ${response.json()} + ... ${response_body} ... ${ignored_keys} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing List Containing Context Source Registrations elements - [Arguments] ${expectation_file_path} ${expected_context_source_registrations_ids} + [Arguments] ${expectation_file_path} ${expected_context_source_registrations_ids} ${response_body} ${expected_context_source_registrations_payload}= Load JSON From File ... ${EXECDIR}/data/${expectation_file_path} ${index}= Set Variable 0 @@ -291,106 +291,108 @@ Check Response Body Containing List Containing Context Source Registrations elem END ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${expected_context_source_registrations_payload} - ... ${response.json()} + ... ${response_body} ... ${EMPTY} ... group_by=id Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Type When Using Session Request - [Arguments] ${response} ${type} - Should Be Equal ${response['type']} ${type} + [Arguments] ${response_body} ${type} + Should Be Equal ${response_body['type']} ${type} Check Response Body Containing ProblemDetails Element Containing Type Element set to - [Arguments] ${response} ${type} - Should Be Equal ${response['type']} ${type} + [Arguments] ${response_body} ${type} + Should Be Equal ${response_body['type']} ${type} Check Response Body Title When Using Session Request - [Arguments] ${response} - Should Not Be Empty ${response['title']} + [Arguments] ${response_body} + Should Not Be Empty ${response_body['title']} Check Response Body Containing ProblemDetails Element Containing Title Element - [Arguments] ${response} - Should Not Be Empty ${response['title']} + [Arguments] ${response_body} + Should Not Be Empty ${response_body['title']} Check RL Response Body Containing ProblemDetails Element Containing Type Element set to - [Arguments] ${response} ${type} - ${json_response_body}= Set Variable ${response} + [Arguments] ${response_body} ${type} + ${json_response_body}= Set Variable ${response_body} Should Be Equal ${json_response_body['type']} ${type} Check RL Response Body Containing ProblemDetails Element Containing Title Element - [Arguments] ${response} - ${json_response_body}= Set Variable ${response} + [Arguments] ${response_body} + ${json_response_body}= Set Variable ${response_body} Should Not Be Empty ${json_response_body['title']} Check JSON Value In Response Body - [Arguments] ${json_path_expr} ${value_to_check} - Should Be Equal As Strings ${response.json()${json_path_expr}} ${value_to_check} + [Arguments] ${json_path_expr} ${value_to_check} ${response_body} + Should Be Equal As Strings ${response_body${json_path_expr}} ${value_to_check} Check NotificationParams - [Arguments] ${filename} ${expected_additional_members} + [Arguments] ${filename} ${expected_additional_members} ${response_body} ${expected_notification}= Load JSON From File ${EXECDIR}/data/${filename} ${ignored_keys}= Create List ${notification_timestamps_regex_expr} ${notification_endpoint_uri_regex_expr} ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${expected_notification} - ... ${response.json()['notification']} + ... ${response_body['notification']} ... ${ignored_keys} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} FOR ${expected_additional_member} IN @{expected_additional_members} - Should Not Be Empty ${response.json()['notification']['${expected_additional_member}']} + Should Not Be Empty ${response_body['notification']['${expected_additional_member}']} END Check Pagination Prev And Next Headers - [Arguments] ${prev_link} ${next_link} + [Arguments] ${prev_link} ${next_link} ${response_headers} ${expected_links}= Create List ${prev_link} ${next_link} IF '${prev_link}'!='' and '${next_link}'!='' Lists Should Be Equal - ... ${response.headers['Link'].replace(" ", "").split(',')} + ... ${response_headers['Link'].replace(" ", "").split(',')} ... ${expected_links} ... ignore_order=True END IF '${prev_link}'!='' and '${next_link}'=='' - Should Be Equal ${response.headers['Link']} ${prev_link} + Should Be Equal ${response_headers['Link']} ${prev_link} END IF '${prev_link}'=='' and '${next_link}'!='' - Should Be Equal ${response.headers['Link']} ${next_link} + Should Be Equal ${response_headers['Link']} ${next_link} END Check Resource Set To - [Arguments] ${expected_resource} ${ignored_keys}=${None} ${group_by}=${None} + [Arguments] ${expected_resource} ${response_body} ${ignored_keys}=${None} ${group_by}=${None} ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${expected_resource} - ... ${response.json()} + ... ${response_body} ... ${ignored_keys} ... ${group_by} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Created Resource Set To - [Arguments] ${created_resource} ${ignored_keys}=${None} + [Arguments] ${created_resource} ${response_body} ${ignored_keys}=${None} - Check Resource Set To ${created_resource} ${ignored_keys} + Check Resource Set To ${created_resource} ${response_body} ${ignored_keys} Check Created Resources Set To - [Arguments] ${expected_resources} ${ignored_keys}=${None} + [Arguments] ${expected_resources} ${response_body} ${ignored_keys}=${None} - Check Resource Set To ${expected_resources} ${ignored_keys} group_by=id + Check Resource Set To ${expected_resources} ${response_body} ${ignored_keys} group_by=id Check Updated Resource Set To - [Arguments] ${updated_resource} ${ignored_keys}=${None} + [Arguments] ${updated_resource} ${response_body} ${ignored_keys}=${None} - Check Resource Set To ${updated_resource} ${ignored_keys} + Check Resource Set To ${updated_resource} ${response_body} ${ignored_keys} Check Updated Resources Set To - [Arguments] ${updated_resources} ${ignored_keys}=${None} + [Arguments] ${updated_resources} ${response_body} ${ignored_keys}=${None} - Check Resource Set To ${updated_resources} ${ignored_keys} group_by=id + Check Resource Set To ${updated_resources} ${response_body} ${ignored_keys} group_by=id Check SUT Not Containing Resource - ${response_status}= convert to string ${response.status_code} - Should Be Equal ${response_status} 404 + [Arguments] ${response_status} + ${response_status_string}= convert to string ${response_status} + Should Be Equal ${response_status_string} 404 Check SUT Not Containing Resources - Should Be Empty ${response.json()} + [Arguments] ${response_body} + Should Be Empty ${response_body} diff --git a/schemas/error_response.schema.json b/schemas/error_response.schema.json deleted file mode 100644 index 56b64635..00000000 --- a/schemas/error_response.schema.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "required": [ - "detail", - "type", - "title" - ] -} -- GitLab