diff --git a/TP/NGSI-LD/CommonBehaviours/044_01.robot b/TP/NGSI-LD/CommonBehaviours/044_01.robot index 279678cdeb25c09375234f5f2a28bc6e5fa5f6af..bda9e7249ea2994d257e1625469096fa018f1284 100644 --- a/TP/NGSI-LD/CommonBehaviours/044_01.robot +++ b/TP/NGSI-LD/CommonBehaviours/044_01.robot @@ -17,7 +17,7 @@ ${subscription_fragment}= subscriptions/fragments/subscription-update-samp *** Test Cases *** -044_01_01_endpoint /entities/{entityId}/attrs/{attrId} +044_01_01 endpoint /entities/{entityId}/attrs/{attrId} [Documentation] Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type [Tags] ea-partial-update 6_3_4 ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} @@ -35,7 +35,7 @@ ${subscription_fragment}= subscriptions/fragments/subscription-update-samp Check Response Status Code 204 ${response.status_code} [Teardown] Delete Entity by Id ${entity_id} -044_01_02_endpoint /subscriptions/{subscriptionId} +044_01_02 endpoint /subscriptions/{subscriptionId} [Documentation] Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type [Tags] sub-update 6_3_4 ${subscription_id}= Generate Random Entity Id ${subscription_id_prefix} diff --git a/TP/NGSI-LD/CommonBehaviours/044_02.robot b/TP/NGSI-LD/CommonBehaviours/044_02.robot index 8f634d6135ec10e8723672d57e2e431618615ce1..08f3134ca6c4613e9553ee2afbbeea7609974e8c 100644 --- a/TP/NGSI-LD/CommonBehaviours/044_02.robot +++ b/TP/NGSI-LD/CommonBehaviours/044_02.robot @@ -21,7 +21,7 @@ ${content_type}= application/json *** Test Cases *** -044_02_01_endpoint /entities/{entityId} +044_02_01 endpoint /entities/{entityId} [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/entities/{entityId}) [Tags] e-query 6_3_4 ${id}= Generate Random Entity Id ${building_id_prefix} @@ -36,7 +36,7 @@ ${content_type}= application/json Check Response Headers Link Not Empty ${response.headers} [Teardown] Delete Entity by Id Returning Response ${id} -044_02_02_endpoint /subscriptions/{subscriptionId} +044_02_02 endpoint /subscriptions/{subscriptionId} [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/subscriptions/{subscriptionId}) [Tags] sub-retrieve 6_3_4 ${id}= Generate Random Entity Id ${subscription_id_prefix} @@ -48,7 +48,7 @@ ${content_type}= application/json Check Response Headers Link Not Empty ${response.headers} [Teardown] Delete Subscription ${id} -044_02_03_endpoint /csourceRegistrations/ +044_02_03 endpoint /csourceRegistrations/ [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/csourceRegistrations/) [Tags] csr-query 6_3_4 ${registration_id}= Generate Random Entity Id ${registration_id_prefix} @@ -66,7 +66,7 @@ ${content_type}= application/json Check Response Headers Link Not Empty ${response.headers} [Teardown] Delete Context Source Registration ${registration_id} -044_02_04_endpoint /temporal/entities +044_02_04 endpoint /temporal/entities [Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/temporal/entities) [Tags] te-query 6_3_4 ${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix} diff --git a/TP/NGSI-LD/CommonBehaviours/044_03.robot b/TP/NGSI-LD/CommonBehaviours/044_03.robot index 306335d6cf974d64f66c0131b9cdfdef3d282046..c819f18e2814ecbf6a628a31013e58ab83e09860 100644 --- a/TP/NGSI-LD/CommonBehaviours/044_03.robot +++ b/TP/NGSI-LD/CommonBehaviours/044_03.robot @@ -22,7 +22,7 @@ ${content_type}= application/xml *** Test Cases *** -044_03_01_endpoint patch /entities/{entityId}/attrs/{attrId} +044_03_01 endpoint patch /entities/{entityId}/attrs/{attrId} [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /entities/{entityId}/attrs/{attrId}) [Tags] ea-partial-update 6_3_4 ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} @@ -39,7 +39,7 @@ ${content_type}= application/xml Check Response Status Code 415 ${response.status_code} [Teardown] Delete Entity by Id Returning Response ${entity_id} -044_03_02_endpoint patch /subscriptions/{subscriptionId} +044_03_02 endpoint patch /subscriptions/{subscriptionId} [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /subscriptions/{subscriptionId}) [Tags] sub-update 6_3_4 ${id}= Generate Random Entity Id ${subscription_id_prefix} @@ -49,7 +49,7 @@ ${content_type}= application/xml Check Response Status Code 415 ${response.status_code} [Teardown] Delete Subscription ${id} -044_03_03_endpoint post /entities/ +044_03_03 endpoint post /entities/ [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entities/) [Tags] e-create 6_3_4 ${entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -60,7 +60,7 @@ ${content_type}= application/xml Check Response Status Code 415 ${response.status_code} [Teardown] Delete Entity by Id ${entity_id} -044_03_04_endpoint post /subscriptions/ +044_03_04 endpoint post /subscriptions/ [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /subscriptions/) [Tags] sub-create 6_3_4 ${subscriptions_id}= Generate Random Entity Id ${subscription_id_prefix} @@ -68,7 +68,7 @@ ${content_type}= application/xml Check Response Status Code 415 ${response.status_code} [Teardown] Delete Subscription ${subscriptions_id} -044_03_05_endpoint post /entityOperations/create +044_03_05 endpoint post /entityOperations/create [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entityOperations/create) [Tags] be-create 6_3_4 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -81,7 +81,7 @@ ${content_type}= application/xml Check Response Status Code 415 ${response.status_code} [Teardown] Batch Delete Entities @{expected_entities_ids} -044_03_06_endpoint post /temporal/entities/ +044_03_06 endpoint post /temporal/entities/ [Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /temporal/entities/) [Tags] te-create 6_3_4 ${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix} diff --git a/TP/NGSI-LD/CommonBehaviours/044_04.robot b/TP/NGSI-LD/CommonBehaviours/044_04.robot index b0670b2a9482a5160ec776ee5c96a71188dc3caf..cb71c7473d461512733f56b2551f668b9b361b9a 100644 --- a/TP/NGSI-LD/CommonBehaviours/044_04.robot +++ b/TP/NGSI-LD/CommonBehaviours/044_04.robot @@ -16,7 +16,7 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld *** Test Cases *** -044_04_01_endpoint get /entities/{entityId} +044_04_01 endpoint get /entities/{entityId} [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /entities/{entityId}) [Tags] e-query 6_3_4 ${entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -29,7 +29,7 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld Check Response Status Code ${status_code} ${response.status_code} [Teardown] Delete Entity by Id Returning Response ${entity_id} -044_04_02_endpoint get /subscriptions/{subscriptionId} +044_04_02 endpoint get /subscriptions/{subscriptionId} [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /subscriptions/{subscriptionId}) [Tags] sub-retrieve 6_3_4 ${id}= Generate Random Entity Id ${subscription_id_prefix} @@ -39,19 +39,19 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld Check Response Status Code ${status_code} ${response.status_code} [Teardown] Delete Subscription ${id} -044_04_03_endpoint get /csourceRegistrations/ +044_04_03 endpoint get /csourceRegistrations/ [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceRegistrations/) [Tags] csr-query 6_3_4 ${response}= Query Context Source Registrations With Return type=Building accept=${accept} Check Response Status Code ${status_code} ${response.status_code} -044_04_04_endpoint get /csourceSubscriptions/ +044_04_04 endpoint get /csourceSubscriptions/ [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceSubscriptions/) [Tags] csrsub-query - Query Context Source Registration Subscriptions accept=${accept} + ${response}= Query Context Source Registration Subscriptions accept=${accept} Check Response Status Code ${status_code} ${response.status_code} -044_04_05_endpoint get /temporal/entities +044_04_05 endpoint get /temporal/entities [Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /temporal/entities) [Tags] te-query 6_3_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot index aaeb8c8ccf0b298cdb6b4952e3d714e9348ade8c..365f40cc465381e316bdc70bf7f2dbb694cf4548 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot @@ -16,7 +16,7 @@ ${filename}= building-simple-attributes-sample.json *** Test Cases *** -Retrieve Detailed Representation Of Available Attribute Without Context +027_01_01 Retrieve Detailed Representation Of Available Attribute Without Context [Documentation] Check that you cannot retrieve a detailed representation of an unknown NGSI-LD attribute [Tags] ed-attr 5_7_10 ${response}= Retrieve Attribute attribute_name=airQualityLevel diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_02.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot index 5c3c7b0928d5324beb0f2d618cbb934029093c39..5e8ef77242fefabe5d2120a8d0fc28bd41d7d1b5 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot @@ -17,7 +17,7 @@ ${expectation_file}= types/expectations/attribute-027-01-expectation.json *** Test Cases *** -Retrieve Detailed Representation Of Available Attribute +027_02_01 Retrieve Detailed Representation Of Available Attribute [Documentation] Check that you can retrieve a list with a detailed representation of NGSI-LD attributes [Tags] ed-attr 5_7_10 ${response}= Retrieve Attribute attribute_name=airQualityLevel context=${ngsild_test_suite_context} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot index e954403938871ebb5b272599d25d2bc6d4eeef64..32b3781aa14e7c0a60c4943823f4fac0ac5353ae 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot @@ -16,7 +16,7 @@ ${filename}= building-simple-attributes-sample.json *** Test Cases *** -Retrieve Detailed Representation Of Available Entity Type Without Context +024_01_01 Retrieve Detailed Representation Of Available Entity Type Without Context [Documentation] Check that you cannot retrieve a detailed representation of an unknown NGSI-LD entity type [Tags] ed-type 5_7_7 ${response}= Retrieve Entity Type type=Building diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot similarity index 96% rename from TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_02.robot rename to TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot index e147d6ccf9becea9b7666ba494a98328ba639156..35b58a15378bfaac34480f2e226328437a77948e 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot @@ -17,7 +17,7 @@ ${expectation_file}= types/expectations/entity-type-info-024-01-expectati *** Test Cases *** -Retrieve Detailed Representation Of Available Entity Type +024_02_01 Retrieve Detailed Representation Of Available Entity Type [Documentation] Check that you can retrieve a detailed representation of a specified NGSI-LD entity type [Tags] ed-type 5_7_7 ${response}= Retrieve Entity Type type=Building context=${ngsild_test_suite_context} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot index 6e4586ae1720d54083f9f590e88608a061a1bf45..7f99c790f86ad13d9cea262b0b2fba05417f634c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot @@ -17,7 +17,7 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building *** Test Cases *** -Query several entities based on ids +019_01_01 Query several entities based on ids [Documentation] Check that you can query several entities based on ids [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -48,7 +48,7 @@ Query several entities based on ids ... entity_ids=${entities_ids_to_be_retrieved} ... entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot index e2c6e344f42e4babd04e9c0267ddaf24a3a58a44..f7c95ec23d729aacad1d09f10a4abcf79311f5fc 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_02.robot @@ -23,7 +23,7 @@ ${parking_entity_type}= https://ngsi-ld-test-suite/context#OffStreetParking *** Test Cases *** -Query several entities based on the entities types +019_01_02 Query several entities based on the entities types [Documentation] Check that you can query several entities based on the entities types [Tags] e-query 5_7_2 ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot index 982470b9885b98be41736a975498f784e2a4208e..6c4dfafff743f3bfa12b161cc8dbbe87c7eb8ad8 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot @@ -18,7 +18,7 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.* *** Test Cases *** -Query several entities based on the given id pattern +019_01_03 Query several entities based on the given id pattern [Documentation] Check that you can query several entities based on the given id pattern [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -41,7 +41,7 @@ Query several entities based on the given id pattern ... entity_id_pattern=${entity_id_pattern} ... entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot index 636d64167addaa71c799d1699c9aec892f713789..4f049e05299b4796568a78ddaf53e3c6358cd8a2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot @@ -20,7 +20,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego *** Test Cases *** -Query several entities based on attribute names +019_01_04 Query several entities based on attribute names [Documentation] Check that you can query several entities based on attribute names [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -44,13 +44,13 @@ Query several entities based on attribute names @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${response}= Query Entities attrs=${attributes_to_be_retrieved} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot index 8ff94d0f666fb978b309ad91231875e72cd5ae2e..612d7c81a52cfa361cfe54332fdef5eaf2d7c2fc 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot @@ -18,7 +18,7 @@ ${geometry_property}= location *** Test Cases *** -Query several entities based on a list of properties +019_01_05 Query several entities based on a list of properties [Documentation] Check that you can query entitites based on a list of properties [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -43,7 +43,7 @@ Query several entities based on a list of properties ... geoproperty=${geometry_property} ... accept=${CONTENT_TYPE_LD_JSON} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot index 88d825e1a251572973265b645e3ab1b54da5e00a..9d3ea8fa7a3864199666f0b93c654aa1a9938854 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot @@ -17,7 +17,7 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building *** Test Cases *** -Query several entities via POST Interaction based on ids +019_02_01 Query several entities via POST Interaction based on ids [Documentation] Check that you can query several entities via POST Interaction based on ids [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -53,7 +53,7 @@ Query several entities via POST Interaction based on ids ... entity_ids=${entities_ids_to_be_retrieved} ... entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot index 4f129cb3ed49256bca5b857f531f3c2f320027a5..719f9c7faf5a5ac1e495697c6f8538c4ec0b9920 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_02.robot @@ -23,7 +23,7 @@ ${parking_entity_type}= https://ngsi-ld-test-suite/context#OffStreetParking *** Test Cases *** -Query several entities via POST Interaction based on the entities types +019_02_02 Query several entities via POST Interaction based on the entities types [Documentation] Check that you can query several entities via POST Interaction based on the entities types [Tags] e-query 5_7_2 ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -51,7 +51,7 @@ Query several entities via POST Interaction based on the entities types ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${vehicle_entity_type} ${parking_entity_type} ${response}= Query Entities entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entity_types_to_be_compared} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot index 5f5d50b76b91b3a25740b8156ed40b2a06607182..501cf462754cca76b19fb49f0d53e9f3a2ec53e1 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot @@ -18,7 +18,7 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.* *** Test Cases *** -Query several entities via POST Interaction based on the given id pattern +019_02_03 Query several entities via POST Interaction based on the given id pattern [Documentation] Check that you can query several entities via POST Interaction based on the given id pattern [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -41,7 +41,7 @@ Query several entities via POST Interaction based on the given id pattern ... entity_id_pattern=${entity_id_pattern} ... entity_types=${entity_types_to_be_retrieved} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot index 0e204199c4aa77a8a817305b491d37428daa60d7..5e621262d9df34ab0844cfb504ce46e1e66ac8f3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_04.robot @@ -18,7 +18,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego *** Test Cases *** -Query several entities via POST Interaction based on attribute names +019_02_04 Query several entities via POST Interaction based on attribute names [Documentation] Check that you can query several entities via POST Interaction based on attribute names [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -42,7 +42,7 @@ Query several entities via POST Interaction based on attribute names @{entities_ids_to_be_retrieved}= Create List ${first_entity_id} ${second_entity_id} ${response}= Query Entities attrs=${attributes_to_be_retrieved} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_retrieved} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot index 1efb21bbaad483ea192c40249943dc0c9227c162..717c47872ef9a00e35daa78951bfcbece10fe45e 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_05.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check that you can query entitites via POST Interaction based on a list of properties +Documentation Check that you can query entities via POST Interaction based on a list of properties Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption/ApiUtils.resource # Resource ${EXECDIR}/resources/ApiUtils.resource @@ -18,8 +18,8 @@ ${geometry_property}= location *** Test Cases *** -Query several entities via POST Interaction based on a list of properties - [Documentation] Check that you can query entitites via POST Interaction based on a list of properties +019_02_05 Query several entities via POST Interaction based on a list of properties + [Documentation] Check that you can query entities via POST Interaction based on a list of properties [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} @@ -41,7 +41,7 @@ Query several entities via POST Interaction based on a list of properties ... entity_types=${entity_types_to_be_retrieved} ... geoproperty=${geometry_property} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot index b912976ece3bccd22e8f2055d6077647dac76903..95f6cd635be269fad9c03e9d47f10401753cbcb3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot @@ -18,7 +18,7 @@ ${entity_invalid_id_two}= thisisaninvaliduri2 *** Test Cases *** -Query entities based on incorrect ids +019_03_01 Query entities based on incorrect ids [Documentation] Check that you cannot query entities if the requested ids are incorrect [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot index cfd1b6524cb8dd0aca0fef4880de6fd3642a5c3e..58a859e09a6a09478dc9b778b53051255b5becca 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot @@ -19,7 +19,7 @@ ${invalid_entity_type_two}= invalid_entity_type_two *** Test Cases *** -Query entities based on incorrect entity types +019_03_02 Query entities based on incorrect entity types [Documentation] Check that you cannot query entities if the requested entity types are incorrect [Tags] e-query 5_7_2 ${building_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot index f091a50ba383b1b13ece5b069742fd63adf31702..893006000d5c6e334d3b944957217d1665c851d7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot @@ -17,7 +17,7 @@ ${invalid_entity_id_pattern}= invalid_entity_id_pattern** *** Test Cases *** -Query several entities based on incorrect id pattern +019_03_03 Query several entities based on incorrect id pattern [Documentation] Check that you cannot query entities if the requested id pattern is incorrect [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot index f329c08a080c1a3bc76fa1af346ac3b29cb91f59..8e6ab34b190149a6719179667e76786760620055 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_04.robot @@ -18,7 +18,7 @@ ${invalid_attribute_two}= type *** Test Cases *** -Query several entities based on incorrect attribute names +019_03_04 Query several entities based on incorrect attribute names [Documentation] Check that you cannot query entities if the requested attribute names are incorrect [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot index 998771c7a9fa16e059f0185dcadb4b56d6140250..b9d484785142630c4e2d27c6b0bd30d4b16ebd7a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_05.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check that you cannot query entitites if the request has a wrong geometryProperty +Documentation Check that you cannot query entities if the request has a wrong geometryProperty Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption/ApiUtils.resource # Resource ${EXECDIR}/resources/ApiUtils.resource @@ -20,8 +20,8 @@ ${geoproperty}= location *** Test Cases *** -Query entitites when the request has a wrong geometryProperty - [Documentation] Check that you cannot query entitites if the request has a wrong geometryProperty +019_03_05 Query entities when the request has a wrong geometryProperty + [Documentation] Check that you cannot query entities if the request has a wrong geometryProperty [Tags] e-query 5_7_2 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${first_entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot index 2895591a4a590d673104b6bd6063af2a7a063eaf..c6204e703322c3c7f3818b161525d66aa20bc370 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot @@ -18,7 +18,7 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building *** Test Cases *** -Query entities in a simplified representation +019_04_01 Query entities in a simplified representation [Documentation] Check that the queried entities by Id can be returned in a simplified representation [Tags] e-query 6_3_7 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -50,7 +50,7 @@ Query entities in a simplified representation ... entity_types=${entity_types_to_be_retrieved} ... options=${options_parameter} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot index 7e9a8ac603b5671073189b6e1b3409806c4c9c2f..37fdd035114e4a7dcbf60d3d657e62818b3b904a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot @@ -18,7 +18,7 @@ ${accept_header}= application/geo+json *** Test Cases *** -Get an entity by id that can be returned in a geoJSON format +019_05_01 Get an entity by id that can be returned in a geoJSON format [Documentation] Check that the queried entities by id can be returned in a geoJSON format [Tags] e-query 6_3_7 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} @@ -50,7 +50,7 @@ Get an entity by id that can be returned in a geoJSON format ... entity_types=${entity_types_to_be_retrieved} ... accept=${accept_header} Check Response Status Code 200 ${response.status_code} - Check Response Body Containing List Containing Entity elements + Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} ... ${entities_ids_to_be_compared} ... ${response.json()} 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 6aae3100d735c0e0d46b566893892b9a427a1044..5a472f4c57b63c2571e1913ed156f37d34337fd7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_06.robot @@ -17,7 +17,7 @@ ${limit}= 2 *** Test Cases *** -Query entities specifying a maximum number of results +019_06_01 Query entities specifying a maximum number of results [Documentation] Check that you can query entities specifying a maximum number of results [Tags] e-query 6_3_10 ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot index f2596be662d5faf0cc05f0a99cacc8a392a604ef..3a71217daa717ff5a21b08bc007534b91377ecc1 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot @@ -16,7 +16,7 @@ ${expectation_filename}= building-simple-attributes-expectation.jsonld *** Test Cases *** -018_01_01_Get an entity by id +018_01_01 Get an entity by id [Documentation] Check that you can get an entity by id [Tags] e-retrieve 5_7_1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_02.robot index 93fe8fa90cf43585b99f9dd4d38cc79936b1332a..9644d32e1633df44d535eba48d70a7f4c793829a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_02.robot @@ -18,7 +18,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego *** Test Cases *** -018_01_02_Query some attributes from an entity +018_01_02 Query some attributes from an entity [Documentation] Check that you can query some attributes from an entity [Tags] e-retrieve 5_7_1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_03.robot index 18e9157196f4b869a58ef69d2b69f27dccbe9a2e..49bc76a4d26a939283eb9490d305935facc9a733 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_03.robot @@ -17,7 +17,7 @@ ${geometry_property}= location *** Test Cases *** -018_01_03_Query the geometry property from an entity +018_01_03 Query the geometry property from an entity [Documentation] Check that you can query the geometry property from an entity [Tags] e-retrieve 5_7_1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_02.robot index a5a655c6f36480adef97be4d801ca634fd879a87..6500df584afaec6c2b1ff82d025ae70f54da4101 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_02.robot @@ -9,9 +9,9 @@ Test Template Get Entity With Invalid/Missing Id *** Test Cases *** ENTITY_ID EXPECTED_STATUS_CODE PROBLEM_TYPE -018_02_01_Get an entity if the Entity Id is not present +018_02_01 Get an entity if the Entity Id is not present ${EMPTY} 400 ${ERROR_TYPE_BAD_REQUEST_DATA} -018_02_02_Get an entity if the Entity Id is not a valid URI +018_02_02 Get an entity if the Entity Id is not a valid URI thisisaninvaliduri 400 ${ERROR_TYPE_BAD_REQUEST_DATA} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_01.robot index c06471a16e3a5d33dcfe0d092961c9b3a52d87ac..2ce7aa0dd6fdf3c2d37adffd6a189a20a27367f3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_01.robot @@ -12,7 +12,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Cases *** -Get an entity if the Entity Id is not known to the system +018_03_01 Get an entity if the Entity Id is not known to the system [Documentation] Check that you cannot get an entity if the entity id or attributes are not known to the system [Tags] e-retrieve 5_7_1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_02.robot index 1d1784aede431e00bfed9470d440fd9e04116127..598b79ed91162e89be698dc867e9f75195ffec33 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_03_02.robot @@ -16,7 +16,7 @@ ${attribute_not_known}= property_not_found *** Test Cases *** -Get an entity if an attribute is not known to the system +018_03_02 Get an entity if an attribute is not known to the system [Documentation] Check that you cannot get an entity if an attribute is not known to the system [Tags] e-retrieve 5_7_1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot index 8692a8202a9d772f6caf280d20f55a2e24a71025..810eef74f80ef9c198c3c37884b3a58bd1ea812a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_04.robot @@ -17,7 +17,7 @@ ${options_parameter}= keyValues *** Test Cases *** -Get an entity in a simplified representation +018_04_01 Get an entity in a simplified representation [Documentation] Check that the queried entity by Id can be returned in a simplified representation [Tags] e-retrieve 6_3_7 ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot index 406eebf22ded3e632ef07aa699f7d0798d0130db..8a995df07732b7865b44b460e82825330409e330 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_05.robot @@ -18,7 +18,7 @@ ${accept_header}= application/geo+json *** Test Cases *** -Get an entity by id that can be returned in a geoJSON format +018_05_01 Get an entity by id that can be returned in a geoJSON format [Documentation] Check that the queried entity by id can be returned in a geoJSON format [Tags] e-retrieve 6_3_7 ${entity_id}= Generate Random Entity Id ${building_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot index acacf50dfc4020d8c947ab5f15559957ff3aced8..b1589499a5891660f510fb015c6f23a1656198fd 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_06.robot @@ -19,10 +19,10 @@ ${creation_jsonld_expectation_filename}= building-simple-attributes-sample-co *** Test Cases *** CONTEXT EXPECTED_PAYLOAD -EmptyJsonLdContext +018_06_01 EmptyJsonLdContext [Tags] e-retrieve 6_3_5 ${EMPTY} ${empty_jsonld_expectation_filename} -CreationTimeJsonLdContext +018_06_02 CreationTimeJsonLdContext [Tags] e-retrieve 6_3_5 ${ngsild_test_suite_context} ${creation_jsonld_expectation_filename} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot index 8e7af97821ba672ab2548a7238d9540f56a1dd43..c71f7929d412b6d06002c4d77226dbbc5daebcb2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot @@ -19,9 +19,9 @@ ${bus_payload_file}= 2020-08-bus-temporal-representation-sample.j *** Test Cases *** TIMEREL TIMEAT EXPECTATION_FILE -After [Tags] te-query 5_7_4 +021_01_01 After [Tags] te-query 5_7_4 after 2020-08-01T12:04:00Z vehicles-temporal-representation-021-01-01-expectation.jsonld -Before [Tags] te-query 5_7_4 +021_01_02 Before [Tags] te-query 5_7_4 before 2020-09-01T13:06:00Z vehicles-temporal-representation-021-01-02-expectation.jsonld 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 58cc6a91d60854b8cf9c0a560cfc20b83a7da4c1..baf110a4daddfc970e551e284c7395df230f1fb9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot @@ -17,7 +17,7 @@ ${expectation_file}= vehicles-temporal-representation-021-02-expe *** Test Cases *** -Query the temporal evolution of certain attributes of entities +021_02_01 Query the temporal evolution of certain attributes of entities [Documentation] Check that you can query the temporal evolution of certain attributes of entities [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle 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 816299350ea46b5ff35ba2c44da80fb6fb37e954..d5d247ae4ab849018a4efd0985b05e1497170cd4 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot @@ -17,7 +17,7 @@ ${expectation_file}= vehicles-temporal-representation-021-03-expe *** Test Cases *** -Query the temporal evolution of the last N instances of entities attributes +021_03_01 Query the temporal evolution of the last N instances of entities attributes [Documentation] Check that you can query the temporal evolution of the last N instances of entities attributes [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle 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 6bab8c0478ad3e1a554d5733e4aff370c0a29db5..0bf4cc60a048de0913ae5a567dae5edfd75571bb 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot @@ -17,7 +17,7 @@ ${expectation_file}= vehicles-temporal-representation-021-04-expe *** Test Cases *** -Query the temporal evolution of entities using a context +021_04 Query the temporal evolution of entities using a context [Documentation] Check that you can query the temporal evolution of entities using a context [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle 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 57300cf3dc69f5848d4b83a7310d1052cb89eb68..ec356ffec74752c68b3ef6f35b230be0f3e62a60 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot @@ -18,7 +18,7 @@ ${expectation_file}= vehicles-temporal-representation-021-05-expectation. *** Test Cases *** -Query the temporal evolution of entities matching the given type(s) +021_05_01 Query the temporal evolution of entities matching the given type(s) [Documentation] Check that you can query the temporal evolution of entities matching the given type(s) [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Bus 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 5d94d9bfed05203fd5dbe7d771bfa3b76c0afd7c..5eef64e1fc63d6f46da83b778ae1f18308e9d2c2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot @@ -17,7 +17,7 @@ ${expectation_file}= vehicles-temporal-representation-021-06-expe *** Test Cases *** -Query the temporal evolution of entities matching the given identifier(s) +021_06_01 Query the temporal evolution of entities matching the given identifier(s) [Documentation] Check that you can query the temporal evolution of entities matching the given identifier(s) [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle 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 4fca74804556f6b0fee1417d4d4848514942ac39..f36be849c311ac7c4e829f92d4779e87586c2d9c 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot @@ -17,7 +17,7 @@ ${expectation_file}= vehicles-temporal-representation-021-07-expe *** Test Cases *** -Query the temporal evolution of entities matching the given id pattern +021_07_01 Query the temporal evolution of entities matching the given id pattern [Documentation] Check that you can query the temporal evolution of entities matching the given id pattern [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle 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 c49aaa1a434f0d358f12b8f7599d388a8db7755e..e9bb46195f487e2f105c85b191a15d00dd846fb9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot @@ -17,7 +17,7 @@ ${expectation_file}= vehicles-temporal-representation-021-08-expe *** Test Cases *** -Query the temporal evolution of entities matching the given NGSI-LD query +021_08_01 Query the temporal evolution of entities matching the given NGSI-LD query [Documentation] Check that you can query the temporal evolution of entities matching the given NGSI-LD query [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle 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 bc43971603c31051a0db3effa46e83734f995be3..eb5c8f2712f01b0d8da2f4ff8c23de09bd7824b9 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot @@ -18,9 +18,9 @@ ${expectation_file}= vehicles-temporal-representation-021-09-expe *** Test Cases *** GEOREL GEOMETRY COORDINATES GEOPROPERTY EXPECTATION_FILE -Near Point [Tags] te-query 5_7_4 +021_09_01 Near Point [Tags] te-query 5_7_4 near;maxDistance==2000 Point [-8.503,41.202] ${EMPTY} vehicles-temporal-representation-021-09-01-expectation.jsonld -Within Polygon [Tags] te-query 5_7_4 +021_09_02 Within Polygon [Tags] te-query 5_7_4 contains Polygon [[[-13.503,47.202],[6.541, 52.961],[20.37,44.653],[9.46,32.57],[-13.503,32.57],[-13.503,47.202]]] location vehicles-temporal-representation-021-09-02-expectation.jsonld 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 13ee25750b7f869a00bc463fb2dba052bb67b071..63e9df2e973408e91910409711992c96990f5c0a 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_10.robot @@ -17,7 +17,7 @@ ${context_source_url}= http://${context_source_ *** Test Cases *** -Query the temporal evolution of entities matching the given NGSI-LD context source filter +021_10_01 Query the temporal evolution of entities matching the given NGSI-LD context source filter [Documentation] Check that you can query the temporal evolution of entities matching the given NGSI-LD Context Source filter [Tags] te-query 5_7_4 ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Building 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 459ed3422a853972f1d24de60b32ea65424ded03..6a12d51f4426293f5075ec84cca4a51a5ee57c53 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot @@ -15,7 +15,7 @@ ${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.json *** Test Cases *** -Query the temporal evolution of entities with an invalid request +021_12_01 Query the temporal evolution of entities with an invalid request [Documentation] Check that you cannot query the temporal evolution of entities with an invalid request [Tags] te-query 5_7_4 ${response}= Query Temporal Representation Of Entities diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot index 688ffda75fb988937db79a4a2420476b5e75ff1a..1767587b6326e16b15d5d642f2ad72623d3b6858 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot @@ -16,7 +16,7 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-01-expectati *** Test Cases *** -Retrieve the temporal evolution of an entity +020_01_01 Retrieve the temporal evolution of an entity [Documentation] Check that you can retrieve the temporal evolution of an entity [Tags] te-retrieve 5_7_3 ${response}= Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot index db67528d9bc0dab60035e1d7a233e452968f4039..3a36ea28594cf01a5744d6adfd66d6e1309c5a64 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot @@ -16,7 +16,7 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-02-expectati *** Test Cases *** -Retrieve the temporal evolution of an entity using a context +020_02_01 Retrieve the temporal evolution of an entity using a context [Documentation] Check that you can retrieve the temporal evolution of an entity using a context [Tags] te-retrieve 5_7_3 ${response}= Retrieve Temporal Representation Of Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot index d6ffa927c5c72639dfbc683a8c3e0f49584ba7d4..fa2b9792d496e86227d024bb1168bd1d7f7d2374 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot @@ -16,7 +16,7 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-03-expectati *** Test Cases *** -Retrieve the temporal evolution of certain attributes of an entity +020_03_01 Retrieve the temporal evolution of certain attributes of an entity [Documentation] Check that you can retrieve the temporal evolution of certain attributes of an entity [Tags] te-retrieve 5_7_3 @{temporal_attributes_to_be_retrieved}= Create List fuelLevel diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_06.robot index 0126271574212a6f96fc79768231e1bdd77ff628..150e8417595674ca2fe9391122bc69024d063458 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_06.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_06.robot @@ -7,7 +7,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Test Cases *** -Retrieve the temporal evolution of an entity with an invalid id +020_06_01 Retrieve the temporal evolution of an entity with an invalid id [Documentation] Check that you cannot retrieve the temporal evolution of an entity with an invalid id (invalid URI) [Tags] te-retrieve 5_7_3 ${response}= Retrieve Temporal Representation Of Entity invalidUri diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_07.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_07.robot index 6e6a1d42ae199b39aaf568f6f778edf37fb741a9..c7abd00688f3997953823744bd9f832d811bc80f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_07.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_07.robot @@ -7,7 +7,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Test Cases *** -Retrieve the temporal evolution of a non-existing entity +020_07_01 Retrieve the temporal evolution of a non-existing entity [Documentation] Check that you cannot retrieve the temporal evolution of a non-existing entity [Tags] te-retrieve 5_7_3 ${response}= Retrieve Temporal Representation Of Entity urn:ngsi-ld:Vehicle:unknowEntity 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 e457cb4c8ac8b6bb407b99b15bc70f24250048af..8c62989fc94a5cc12cdfdee00dabd915e67a9252 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot @@ -15,7 +15,7 @@ ${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.json *** Test Cases *** -Retrieve the temporal evolution of non-existing entity attributes +020_08_01 Retrieve the temporal evolution of non-existing entity attributes [Documentation] Check that you cannot retrieve the temporal evolution of non-existing entity attributes [Tags] te-retrieve 5_7_3 @{temporal_attributes_to_be_retrieved}= Create List unknownAttribute 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 69e8d9f67ad49370dec20a48c852dc776d9cbeb0..2e50888ccd1f51cf231bb5eeea98181f19cc9bd0 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot @@ -16,7 +16,7 @@ ${vehicle_expectation_file}= vehicle-temporal-representation-020-10-expectati *** Test Cases *** -Retrieve the temporal evolution of an entity with the simplified temporal representation +020_10_01 Retrieve the temporal evolution of an entity with the simplified temporal representation [Documentation] Check that you can retrieve the temporal evolution of an entity with the simplified temporal representation [Tags] te-retrieve 5_7_3 @{options}= Create List temporalValues diff --git a/doc/analysis/checks.py b/doc/analysis/checks.py index f0518e7b48fa274cc04d9c1e1cc87cb3559587f4..613a17210ab5bf68c28135911d266f91c3437e5c 100644 --- a/doc/analysis/checks.py +++ b/doc/analysis/checks.py @@ -91,16 +91,16 @@ class Checks: }, 'Check Response Headers Containing Content-Type set to': { 'params': ['content_type'], - 'position': [] + 'position': [1] }, 'Check Response Body Containing an Attribute set to': { 'params': ['attribute_name'], 'position': [] }, 'Check Response Body Containing List Containing EntityTemporal elements': { - 'params': ['timeRel', 'timeAt'], - 'position': [] - }, + 'params': ['filename', 'entity_ids'], + 'position': [1, 2] + }, 'Check Response Body Containing List Containing Subscription elements': { 'params': ['number'], 'position': [] @@ -212,7 +212,7 @@ class Checks: @staticmethod def check_response_body_containing_list_containing_entity_elements(kwargs: list) -> str: - return 'Response Body containing a list containing Entity elements, containing ${value} provided' + return 'Response Body containing a list containing Entity Elements, containing ${value} provided' @staticmethod def check_response_body_containing_list_containing_entity_elements_with_different_types(kwargs: list) -> str: @@ -226,12 +226,12 @@ class Checks: @staticmethod def check_response_body_containing_list_containing_entitytemporal_elements(kwargs: list) -> str: - if "timeRel" in kwargs and "timeAt" in kwargs: - return (f"Response Body containing a list containing EntityTemporal elements containing entity type in the " - f"list of entity types provided and entity id matching id pattern provided and attribute instances " - f"'{kwargs['timeRel']}' '{kwargs['timeAt']}'") + if 'filename' in kwargs and 'entity_ids' in kwargs: + return (f"Request response body containing a list that contains Entity Temporal Elements\n" + f" compared with file '{kwargs['filename']}'\n" + f" and using the list of entity ids define in '{kwargs['entity_ids']}'") else: - raise Exception(f'ERROR, timeRel and/or timeAt attributes were not provided, but received: {kwargs}') + raise Exception(f"ERROR, expected parameters 'filename' and 'entity_ids', but received '{kwargs}'") @staticmethod def check_response_body_containing_subscription_element(kwargs: list) -> str: diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index 98fe9bba6672de7b043ccf2e80c908b03ed24469..234597fd3b81c2a35d28e215069d00b8fa4578d2 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -1,13 +1,18 @@ from os.path import dirname from robot.api import TestSuiteBuilder -from doc.analysis.parserobotfile import ParseRobotFile -from doc.analysis.parseapiutilsfile import ParseApiUtilsFile +from analysis.parserobotfile import ParseRobotFile +from analysis.parseapiutilsfile import ParseApiUtilsFile +from analysis.parsevariablesfile import ParseVariablesFile import re class GenerateRobotData: def __init__(self, robot_file: str, execdir: str): - self.robot = ParseRobotFile(filename=robot_file, execdir=execdir) + self.robot_file = robot_file + self.execdir = execdir + + self.config_variables = ParseVariablesFile() + self.robot = ParseRobotFile(filename=robot_file, execdir=execdir, config_file=self.config_variables) self.apiutil = ParseApiUtilsFile(filename=self.robot.resource_file) self.robot.set_apiutils(self.apiutil) @@ -22,9 +27,13 @@ class GenerateRobotData: 'ContextInformation': 'CI', 'CommonBehaviours': 'CB', 'Consumption': 'Cons', + 'Provision': 'Prov', + 'Discovery/RetrieveAvailableAttributeInformation': 'DISC', + 'Discovery/RetrieveAvailableEntityTypeInformation': 'DISC', 'Entity/RetrieveEntity': 'E', 'Entities/CreateEntity': 'E', - 'Provision': 'Prov' + 'Entity/QueryEntities': 'E', + 'TemporalEntity/QueryTemporalEvolutionOfEntities': 'TE' } self.references = { 'v1.3.1': 'ETSI GS CIM 009 V1.3.1 [], clause ' @@ -44,6 +53,9 @@ class GenerateRobotData: self.base_TP_id = str() def get_info(self): + self.test_suite['robotpath'] = (self.robot_file.replace(f'{self.execdir}/TP/NGSI-LD/', '') + .replace(f'/{self.robot.test_suite}.robot', '')) + self.test_suite['robotfile'] = self.robot.test_suite return self.test_suite def parse_robot(self): @@ -66,15 +78,17 @@ class GenerateRobotData: return keys_with_different_values - def get_params(self, string: str): + def get_params(self, test_case: str): # New content - test_case = self.robot.test_cases[string] + # test_case = self.robot.test_cases[string] lines_starting_response = re.findall(r'^\s*\$\{response\}.*', test_case, re.MULTILINE) # If there is more than one line, it means that the test case has several operations, all of them to # create the environment content to execute the last one, which is the correct one to test the Test Case if len(lines_starting_response) > 1: + # The last one corresponds to the execution of the test, the rest corresponds to the initial condition of + # test case... response_to_check = lines_starting_response[-1] else: response_to_check = lines_starting_response[0] @@ -102,8 +116,8 @@ class GenerateRobotData: break else: # the attributes are in the same line - regex = r"\s*\$\{response\}=\s{4}(.*)\n" - matches = re.finditer(regex, string, re.MULTILINE) + regex = r"\s*\$\{response\}=\s{4}(.*)" + matches = re.finditer(regex, response_to_check, re.MULTILINE) request = aux[0].split(' ')[2] # We have two options from here, or the parameters are defined in the same line or the parameters are defined in @@ -115,16 +129,18 @@ class GenerateRobotData: # Get the list of keys params = aux.split(' ')[1:] + print(params) else: - raise Exception(f"Error, unexpected format, received: '{string}'") + raise Exception(f"Error, unexpected format, received: '{response_to_check}'") return request, params def get_step_data(self, test: str): - string = self.robot.get_substring(initial_string=test, final_string=self.suite.name, include=False) + # string = self.robot.get_substring(initial_string=test, final_string=self.suite.name, include=False) + string = self.robot.test_cases[test] # request, params = self.get_params(string=string) - request, params = self.get_params(string=test) + request, params = self.get_params(test_case=string) #self.check_header_parameters(params=params, test=test) @@ -249,7 +265,7 @@ class GenerateRobotData: 'config_id': '', 'parent_release': version, 'pics_selection': pics, - 'keywords': list(self.suite.keywords), + 'keywords': [str(x) for x in self.suite.keywords], 'teardown': str(self.suite.teardown), 'initial_condition': self.suite.setup, 'test_cases': list() diff --git a/doc/analysis/parseapiutilsfile.py b/doc/analysis/parseapiutilsfile.py index 098e81858e4f285fe01eb3687d63240a8415cda6..fd61be0de3dfee34e2cceaa6ff7a69c477438510 100644 --- a/doc/analysis/parseapiutilsfile.py +++ b/doc/analysis/parseapiutilsfile.py @@ -23,12 +23,13 @@ class ParseApiUtilsFile: index = None for i, item in enumerate(string): if 'response' in item: - regex = "\s{4}\$\{response\}=\s{4}(.*)" + regex = "\s{4}\$\{response\}=\s{4}(POST|GET|PUT|PATCH|DELETE).*" match = re.match(pattern=regex, string=item) if match: verb = match.groups()[0] - elif 'url' in item: + + if 'url' in item: #url = item.split('/')[1] url = self.get_url_request(url=item) @@ -36,7 +37,14 @@ class ParseApiUtilsFile: @staticmethod def get_url_request(url: str) -> list: - regex = r"\s*\.{3}\s*url=\$\{url\}\/(.*)" + # We have two options, the url is defined in the same line of the response or it is defined in the following + # lines with '...' + keys = list() + + if 'response' in url: + url = [x for x in url.split(' ') if 'url' in x][0] + + regex = r"\s*\.*\s*url=\$\{url\}\/(.*)" match = re.match(pattern=regex, string=url) if match: diff --git a/doc/analysis/parserobotfile.py b/doc/analysis/parserobotfile.py index f9000cacf92653fdaf92ae65c722786d18091426..d16ce897f3540f8729eaaf569cea535853eabf8f 100644 --- a/doc/analysis/parserobotfile.py +++ b/doc/analysis/parserobotfile.py @@ -1,11 +1,11 @@ import re import os -from doc.analysis.checks import Checks -from doc.analysis.requests import Requests +from analysis.checks import Checks +from analysis.requests import Requests class ParseRobotFile: - def __init__(self, filename: str, execdir: str): + def __init__(self, filename: str, execdir: str, config_file): self.test_suite = os.path.basename(filename).split('.')[0] with open(filename, 'r') as file: @@ -21,6 +21,8 @@ class ParseRobotFile: self.get_apiutils_path() self.get_test_cases() + self.config_file = config_file + def set_apiutils(self, apiutils): self.apiutils = apiutils @@ -37,19 +39,6 @@ class ParseRobotFile: else: raise Exception("Error, the variable is not following the format ${thing} = ") - # def get_expected_status_code(self, keyword: str): - # # Check Response Status Code ${expected_status_code} ${response.status_code} - # # Check Response Body Containing ProblemDetails Element Containing Type Element set to - # # ... ${response.json()} - # # ... ${ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE} - # string = self.get_substring(initial_string=keyword, final_string='\n', include=True) - # expected_status_code = string.split(' ')[1] - # - # if expected_status_code.isdigit(): - # return expected_status_code - # else: - # return self.variables[expected_status_code] - def get_apiutils_path(self): string = self.get_substring(initial_string='Resource', final_string='*** Variables ***', include=True) result = [item for item in string.split('\n') if 'ApiUtils.resource' in item and item[0] != '#'] @@ -90,16 +79,30 @@ class ParseRobotFile: indexes = list() self.test_case_names = list() - for match in matches: - name = match.strip() - self.test_case_names.append(name) - indexes.append(string.find(name)) + if matches: + for match in matches: + name = match.strip() + self.test_case_names.append(name) + indexes.append(string.find(name)) + else: + # The test case has the same id. number as the test suite + pattern = f'{self.test_suite}\s.*' + matches = re.findall(pattern=pattern, string=string) + + for match in matches: + name = match.strip() + self.test_case_names.append(name) + indexes.append(string.find(name)) self.test_cases = dict() for i in range(0, len(indexes)-1): self.test_cases[self.test_case_names[i]] = string[indexes[i]:indexes[i+1]] - self.test_cases[self.test_case_names[-1]] = string[indexes[-1]:] + try: + self.test_cases[self.test_case_names[-1]] = string[indexes[-1]:] + except IndexError: + raise Exception(f"ERROR, List index out of range, " + f"probably the name of the Test Case is not following the pattern '{pattern}'") def get_checks(self, test_name, apiutils): data = Checks() @@ -136,8 +139,9 @@ class ParseRobotFile: return new_list def get_request(self, test_name): - print(test_name) - data = Requests(variables=self.variables, apiutils_variables=self.apiutils.variables) + data = Requests(variables=self.variables, + apiutils_variables=self.apiutils.variables, + config_file=self.config_file) description = data.get_description(string=self.test_cases[test_name]) return description @@ -212,7 +216,6 @@ class ParseRobotFile: for i in range(0, len(position_params['position'])): param_key = position_params['params'][i] param_position = position_params['position'][i] - # param_value = self.variables[params[param_position]-1] param_value = self.get_param_value(position=params[param_position-1]) param[param_key] = param_value diff --git a/doc/analysis/parsevariablesfile.py b/doc/analysis/parsevariablesfile.py new file mode 100644 index 0000000000000000000000000000000000000000..f56bd51cc74f59caa76e5f7b707e826a5313e8f6 --- /dev/null +++ b/doc/analysis/parsevariablesfile.py @@ -0,0 +1,24 @@ +from os.path import dirname + + +class ParseVariablesFile: + def __init__(self): + folder = dirname(dirname(dirname(__file__))) + filename = f'{folder}/resources/variables.py' + self.variables = dict() + + with open(filename, 'r') as file: + # Read the contents of the file + file_content = file.read() + + file_content = file_content.split('\n') + file_content = [x.split('=') for x in file_content if x != ''] + + self.variables = {x[0].strip(): x[1].replace("'", "").strip() for x in file_content} + + def get_variable(self, variable: str) -> str: + # We request the variable in the form '${...}' + variable = variable.strip('${}') + value = self.variables[variable] + + return value diff --git a/doc/analysis/requests.py b/doc/analysis/requests.py index 7899f8efda03740338f3e8746ed36e1e6a0848c7..dffec4f6201c48a1f7b2bcca30b88f58d9f91f66 100644 --- a/doc/analysis/requests.py +++ b/doc/analysis/requests.py @@ -2,30 +2,78 @@ import re class Requests: - def __init__(self, variables, apiutils_variables): + def __init__(self, variables, apiutils_variables, config_file): self.op = { 'Create Entity Selecting Content Type': { - 'positions': [1, 3], + 'positions': [0, 2], 'params': ['filename', 'content_type'] }, 'Create Subscription': { - 'positions': [2, 3], + 'positions': [1, 2], 'params': ['filename', 'content_type'] }, 'Create Or Update Temporal Representation Of Entity Selecting Content Type': { - 'positions': [2, 3], + 'positions': [1, 2], 'params': ['filename', 'content_type'] }, 'Batch Create Entities': { - 'positions': [2], + 'positions': [1], 'params': ['content_type'] }, 'Create Context Source Registration With Return': { - 'positions': [1], + 'positions': [0], 'params': ['filename'] + }, + 'Query Entity': { + 'positions': [1, 1], + 'params': ['context', 'accept'] + }, + 'Retrieve Subscription': { + 'positions': [1], + 'params': ['accept'] + }, + 'Query Context Source Registrations With Return': { + 'positions': [0, 1], + 'params': ["type", "accept"] + }, + 'Query Temporal Representation Of Entities With Return': { + 'positions': [], + 'params': [] + }, + 'Partial Update Entity Attributes': { + 'positions': [2, 3, 4], + 'params': ['filename', "content", "context"] + }, + 'Update Subscription': { + 'positions': [1, 2, 3], + 'params': ['filename', 'content', 'context'] + }, + 'Query Context Source Registration Subscriptions': { + 'positions': [0], + 'params': ['accept'] + }, + 'Query Temporal Representation Of Entities': { + 'positions': [0, 1, 2, 3], + 'params': ['entity_types', 'timerel', 'timeAt', 'accept'] + }, + 'Retrieve Attribute': { + 'positions': [0], + 'params': ['attribute_name'] + }, + 'Retrieve Entity Type': { + 'positions': [0, 1], + 'params': ['type', 'context'] + }, + 'Query Entities': { + 'positions': [0, 1], + 'params': ['entity_ids', 'entity_types', 'accepts'] + }, + 'Retrieve Temporal Representation Of Entity': { + 'params': ['entity_ids', 'entity_types', 'accepts'] } } + self.description = { 'Create Entity Selecting Content Type': Requests.create_entity_selecting_content_type, @@ -36,33 +84,93 @@ class Requests: 'Batch Create Entities': Requests.batch_create_entities, 'Create Context Source Registration With Return': - Requests.create_context_source_registration_with_return - } + Requests.create_context_source_registration_with_return, + 'Query Entity': + Requests.query_entity, + 'Retrieve Subscription': + Requests.retrieve_subscription, + 'Query Context Source Registrations With Return': + Requests.query_context_source_registrations_with_return, + 'Query Temporal Representation Of Entities With Return': + Requests.query_temporal_representation_of_entities_with_return, + 'Partial Update Entity Attributes': + Requests.partial_update_entity_attributes, + 'Update Subscription': + Requests.update_subscription, + 'Query Context Source Registration Subscriptions': + Requests.query_context_source_registration_subscriptions, + 'Query Temporal Representation Of Entities': + Requests.query_temporal_representation_of_entities, + 'Retrieve Attribute': + Requests.retrieve_attribute, + 'Retrieve Entity Type': + Requests.retrieve_entity_type, + 'Query Entities': + Requests.query_entities + } + self.variables = variables self.apiutils_variables = apiutils_variables + self.config_file = config_file def get_description(self, string): keys = self.op.keys() params = dict() - index = None - for k in keys: - index = string.find(k) - if index != -1: - break + # New version + lines_starting_response = re.findall(r'^\s*\$\{response\}.*', string, re.MULTILINE) - pattern = f"^.*{k}.*\n" - lines_starting_with_request = re.findall(pattern, string, re.MULTILINE) - for line in lines_starting_with_request: - data = line.strip().split(" ") - if len(data) == 2: - # We are in multiline definition - params = self.find_attributes_next_line(string=string, position=index, request_name=k) - else: - # The definition of the request is in the same line - params = self.find_attributes_in_the_same_line(request_name=k, params=data[1:]) + # If there is more than one line, it means that the test case has several operations, all of them to + # create the environment content to execute the last one, which is the correct one to test the Test Case + if len(lines_starting_response) > 1: + # The last one corresponds to the execution of the test, the rest corresponds to the initial condition of + # test case... + response_to_check = lines_starting_response[-1] + else: + response_to_check = lines_starting_response[0] + + index = string.find(response_to_check) + aux = string[index:].split('\n') + + params = list() + request = str() + + # Get the list of params of the function, they are the keys + if ' ... ' in aux[1]: + request = aux[0].split(' ')[2] + # We are in the case that the attributes are in following lines + for i in range(1, len(aux)): + if ' ... ' in aux[i]: + regex = '\s{4}\.{3}\s{4}(.*)' + param = re.match(pattern=regex, string=aux[i]) + if aux: + params.append(param.groups()[0]) + else: + break + + #params = self.find_attributes_next_lines(string=string, position=index, request_name=request) + params = self.find_attributes_in_the_same_line(request_name=request, params=params) + else: + # the attributes are in the same line + regex = r"\s*\$\{response\}=\s{4}(.*)" + matches = re.finditer(regex, response_to_check, re.MULTILINE) + request = aux[0].split(' ')[2] + + # We have two options from here, or the parameters are defined in the same line or the parameters are defined in + # following lines, next lines + for match in matches: + # Check that we have 1 group matched + if len(match.groups()) == 1: + aux = match.group(1) - description = self.description[k](params) + # Get the list of keys + params = aux.split(' ')[1:] + else: + raise Exception(f"Error, unexpected format, received: '{response_to_check}'") + + params = self.find_attributes_in_the_same_line(request_name=request, params=params) + + description = self.description[request](params) return description def find_attributes_in_the_same_line(self, request_name, params): @@ -70,12 +178,12 @@ class Requests: for i in range(0, len(self.op[request_name]['positions'])): param_position = self.op[request_name]['positions'][i] param_key = self.op[request_name]['params'][i] - param_value = self.get_value(params=params, param_position=param_position) + param_value = self.get_value(params=params, param_position=param_position, param_key=param_key) param[param_key] = param_value return param - def find_attributes_next_line(self, string, position, request_name): + def find_attributes_next_lines(self, string, position, request_name): aux = string[position+len(request_name)+1:].split('\n') params = list() @@ -90,8 +198,8 @@ class Requests: for i in range(0, len(self.op[request_name]['positions'])): print(i) param_position = self.op[request_name]['positions'][i] - 1 - param_value = self.get_value(params=params, param_position=param_position) param_key = self.op[request_name]['params'][i] + param_value = self.get_value(params=params, param_position=param_position, param_key=param_key) param[param_key] = param_value return param @@ -123,13 +231,163 @@ class Requests: else: raise Exception(f"ERROR, expected filename attribute, but received {kwargs}") - def get_value(self, params, param_position): + @staticmethod + def query_entity(kwargs) -> str: + result = '' + if 'context' in kwargs and kwargs['context'] != '': + result = f"Request Header['Link'] contain the context {kwargs['context']}" + + if 'accept' in kwargs: + result = f"{result}\nHeader['Accept'] set to {kwargs['accept']}" + + if 'context' not in kwargs and 'accept' not in kwargs: + raise Exception(f"ERROR, expected context attribute, but received {kwargs}") + + return result + + @staticmethod + def retrieve_subscription(kwargs) -> str: + if 'accept' in kwargs: + return f"Request a subscription\nHeader['Accept'] set to '{kwargs['accept']}'" + else: + return "Request a subscription" + + def query_context_source_registrations_with_return(kwargs) -> str: + if 'type' in kwargs and 'accept' in kwargs: + result = "Request a Context Source Registration with Return" + + if kwargs['type'] != '': + result = f"{result}\nEntity Type set to '{kwargs['type']}'" + + if kwargs['accept'] != '': + result = f"{result}\nHeader['Accept'] set to '{kwargs['accept']}'" + else: + result = "Request a Context Source Registration with Return" + + return result + + def query_temporal_representation_of_entities_with_return(kwargs) -> str: + return "Request a Temporal Representation of Entities with Return" + + def partial_update_entity_attributes(kwargs) -> str: + if 'context' in kwargs and 'content' in kwargs and 'filename' in kwargs: + context = kwargs['context'] + if context == '': + return (f"Request Partial Update Entity Attributes and \n" + f"Header['Content-Type'] set to '{kwargs['content']}' and\n" + f"Payload defined in file '{kwargs['filename']}'") + else: + return (f"Request Partial Update Entity Attributes and \n" + f"Header['Link'] contain the context '{kwargs['context']}' and \n" + f"Header['Content-Type'] set to '{kwargs['content']}' and\n" + f"Payload defined in file '{kwargs['filename']}'") + else: + raise Exception(f"ERROR, expected context attribute, but received {kwargs}") + + def update_subscription(kwargs) -> str: + if 'context' in kwargs and 'content' in kwargs and 'filename' in kwargs: + context = kwargs['context'] + if context == '': + return (f"Request Update Subscription and \n" + f"Header['Content-Type'] set to '{kwargs['content']}' and\n" + f"Payload defined in file '{kwargs['filename']}'") + else: + return (f"Request Update Subscription and \n" + f"Header['Link'] contain the context '{kwargs['context']}' and\n" + f"Header['Content-Type'] set to '{kwargs['content']}' and\n" + f"Payload defined in file '{kwargs['filename']}'") + else: + raise Exception(f"ERROR, expected context attribute, but received {kwargs}") + + @staticmethod + def query_context_source_registration_subscriptions(kwargs) -> str: + if 'accept' in kwargs: + return (f"Request Context Source Registration Subscriptions\n" + f"Header['Accept'] set to '{kwargs['accept']}'") + else: + raise Exception(f"ERROR, expected accept attribute, but received {kwargs}") + + @staticmethod + def query_temporal_representation_of_entities(kwargs) -> str: + expected_parameters = ['entity_types', 'timerel', 'timeAt', 'accept'] + result = [x for x in expected_parameters if x not in kwargs] + + if len(result) == 0: + response = ("Response containing:\n" + f" * Entity-Type is equal to '{kwargs['entity_types']}'\n" + f" * timeRel is equal to '{kwargs['timerel']}'\n" + f" * timeAt is equal to '{kwargs['timeAt']}'\n" + f" * Accept is equal to '{kwargs['accept']}'") + return response + else: + raise Exception(f"ERROR, unexpected attribute '{result}', the attributes expected are " + f"'{expected_parameters}', but received: {kwargs}") + + @staticmethod + def retrieve_attribute(kwargs) -> str: + if 'attribute_name' in kwargs: + return f"Retrieve Attribute with attributeName set to '{kwargs['attribute_name']}'" + + @staticmethod + def retrieve_entity_type(kwargs) -> str: + result = "Retrieve Entity Type" + if 'type' in kwargs: + result = f"{result}, with type set to '{kwargs['type']}'" + + if 'context' in kwargs and kwargs['context'] != '': + result = f"{result}, with Header['Link'] containing '{kwargs['context']}'" + + if 'type' not in kwargs or 'context' not in kwargs: + raise Exception(f"ERROR, expected type or context attributes, received '{kwargs}'") + + return result + + @staticmethod + def query_entities(kwargs) -> str: + result = "Request Query Entities" + if 'entity_ids' in kwargs and kwargs['entity_ids'] != '': + result = f"{result} with entity_ids set to '{kwargs['entity_ids']}'" + + if 'entity_types' in kwargs and kwargs['entity_types'] != '': + result = f"{result} with entity_types set to '{kwargs['entity_types']}" + + if 'accept' in kwargs and kwargs['accept'] != '': + result = f"{result} with Header['Accept'] set to '{kwargs['accept']}'" + + return result + + def get_value(self, params, param_position, param_key): + data = [x for x in params if f'{param_key}=' in x] + + if len(data) == 1: + # The name of the attribute is passed to the function in the form attribute=value + data = data[0] + data = data.split('=') + if data[0] != param_key: + return '' + + data = data[1] + elif len(data) == 0: + # There is no attribute=something therefore we have to apply the position + try: + data = params[param_position] + + # Workaround + if 'accept' in data and param_key != 'accept': + data = '' + except IndexError: + return '' + try: - value = self.variables[params[param_position]] + value = self.variables[data] return value except KeyError: try: - value = self.apiutils_variables[params[param_position]] + value = self.apiutils_variables[data] return value except KeyError: - return params[param_position] + try: + value = self.config_file.get_variable(variable=data) + return value + except KeyError: + return data diff --git a/doc/files/044_01.json b/doc/files/044_01.json deleted file mode 100644 index 515f5ad50153d6e73131c1fd94988fcb724026c4..0000000000000000000000000000000000000000 --- a/doc/files/044_01.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "tp_id": "TP/NGSI-LD/CB/044_01", - "test_objective": "Verify that PATCH HTTP requests can be done with \"application/merge-patch+json\" as Content-Type", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 6.3.4", - "config_id": "", - "parent_release": "v1.3.1", - "pics_selection": "PICS_6_3_4", - "keywords": [], - "teardown": "None", - "initial_condition": "with {\n the SUT in the \"initial state\"\n}", - "test_cases": [ - { - "name": "044_01_01 endpoint /entities/{entityId}/attrs/{attrId}", - "permutation_tp_id": "TP/NGSI-LD/CB/044_01_01", - "doc": "Verify that PATCH HTTP requests can be done with \"application/merge-patch+json\" as Content-Type", - "tags": [ - "6_3_4", - "ea-partial-update" - ], - "setup": null, - "teardown": "Delete Entity by Id", - "template": null, - "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 204\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'vehicle-simple-attributes-sample.jsonld'", - "http_verb": "PATCH", - "endpoint": "entities/{entityId}/attrs/{attributeId}" - }, - { - "name": "044_01_02 endpoint /subscriptions/{subscriptionId}", - "permutation_tp_id": "TP/NGSI-LD/CB/044_01_02", - "doc": "Verify that PATCH HTTP requests can be done with \"application/merge-patch+json\" as Content-Type", - "tags": [ - "6_3_4", - "sub-update" - ], - "setup": null, - "teardown": "Delete Subscription", - "template": null, - "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 204\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/{subscription_id}'\n method set to 'PATCH'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'subscriptions/subscription-sample.jsonld'", - "http_verb": "PATCH", - "endpoint": "subscriptions/{subscription_id}" - } - ], - "permutations": [ - "endpoint", - "when" - ] -} \ No newline at end of file diff --git a/doc/files/043_01.json b/doc/files/CommonBehaviours/043_01.json similarity index 97% rename from doc/files/043_01.json rename to doc/files/CommonBehaviours/043_01.json index 476e460bcabf5da84323fed728fd21206aa803c6..05efa0258991f32de958a0f9acf83ce222fb8a11 100644 --- a/doc/files/043_01.json +++ b/doc/files/CommonBehaviours/043_01.json @@ -69,7 +69,7 @@ "teardown": "Batch Delete Entities", "template": null, "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/LdContextNotAvailable' and\n Response body containing 'title' element and\n Response Status Code set to 503\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/create'\n method set to 'POST'\n Request Header['Content-Type'] set to 'content_type=${CONTENT_TYPE_LD_JSON}' and\n payload set to a list of entities to be created", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/create'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload set to a list of entities to be created", "http_verb": "POST", "endpoint": "entityOperations/create" }, @@ -91,8 +91,10 @@ } ], "permutations": [ - "when", "endpoint", + "when", "then" - ] + ], + "robotpath": "CommonBehaviours", + "robotfile": "043" } \ No newline at end of file diff --git a/doc/files/CommonBehaviours/044_01.json b/doc/files/CommonBehaviours/044_01.json new file mode 100644 index 0000000000000000000000000000000000000000..e9ee7848541a7c67207b10d8c6a5a65d48424a98 --- /dev/null +++ b/doc/files/CommonBehaviours/044_01.json @@ -0,0 +1,51 @@ +{ + "tp_id": "TP/NGSI-LD/CB/044_01", + "test_objective": "Verify that PATCH HTTP requests can be done with \"application/merge-patch+json\" as Content-Type", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 6.3.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_6_3_4", + "keywords": [], + "teardown": "None", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "044_01_01 endpoint /entities/{entityId}/attrs/{attrId}", + "permutation_tp_id": "TP/NGSI-LD/CB/044_01_01", + "doc": "Verify that PATCH HTTP requests can be done with \"application/merge-patch+json\" as Content-Type", + "tags": [ + "6_3_4", + "ea-partial-update" + ], + "setup": null, + "teardown": "Delete Entity by Id", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 204\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and \nHeader['Link'] contain the context 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and \nHeader['Content-Type'] set to 'application/merge-patch+json' and\nPayload defined in file 'vehicle-brandname-fragment.json'", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "044_01_02 endpoint /subscriptions/{subscriptionId}", + "permutation_tp_id": "TP/NGSI-LD/CB/044_01_02", + "doc": "Verify that PATCH HTTP requests can be done with \"application/merge-patch+json\" as Content-Type", + "tags": [ + "6_3_4", + "sub-update" + ], + "setup": null, + "teardown": "Delete Subscription", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 204\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/{subscription_id}'\n method set to 'PATCH'\n Request Update Subscription and \nHeader['Link'] contain the context 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\nHeader['Content-Type'] set to 'application/merge-patch+json' and\nPayload defined in file 'subscriptions/fragments/subscription-update-sample.json'", + "http_verb": "PATCH", + "endpoint": "subscriptions/{subscription_id}" + } + ], + "permutations": [ + "when", + "endpoint" + ], + "robotpath": "CommonBehaviours", + "robotfile": "044_01" +} \ No newline at end of file diff --git a/doc/files/CommonBehaviours/044_02.json b/doc/files/CommonBehaviours/044_02.json new file mode 100644 index 0000000000000000000000000000000000000000..c81d0211bf2f4e5224a10b706f4059a8e0b90a1d --- /dev/null +++ b/doc/files/CommonBehaviours/044_02.json @@ -0,0 +1,83 @@ +{ + "tp_id": "TP/NGSI-LD/CB/044_02", + "test_objective": "Verify that on a GET HTTP request if nothing is specified on the Accept header, \"application/json\" is assumed", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 6.3.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_6_3_4", + "keywords": [], + "teardown": "None", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "044_02_01 endpoint /entities/{entityId}", + "permutation_tp_id": "TP/NGSI-LD/CB/044_02_01", + "doc": "Verify that on a GET HTTP request if nothing is specified on the Accept header, \"application/json\" is assumed (/entities/{entityId})", + "tags": [ + "6_3_4", + "e-query" + ], + "setup": null, + "teardown": "Delete Entity by Id Returning Response", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Header: Content-Type set to application/json and\n Response Header: Link is not Empty and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}'\n method set to 'GET'\n Request Header['Link'] contain the context https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld\nHeader['Accept'] set to */*", + "http_verb": "GET", + "endpoint": "entities/{id}" + }, + { + "name": "044_02_02 endpoint /subscriptions/{subscriptionId}", + "permutation_tp_id": "TP/NGSI-LD/CB/044_02_02", + "doc": "Verify that on a GET HTTP request if nothing is specified on the Accept header, \"application/json\" is assumed (/subscriptions/{subscriptionId})", + "tags": [ + "6_3_4", + "sub-retrieve" + ], + "setup": null, + "teardown": "Delete Subscription", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Header: Content-Type set to application/json and\n Response Header: Link is not Empty and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/{id}'\n method set to 'GET'\n Request a subscription\nHeader['Accept'] set to '*/*'", + "http_verb": "GET", + "endpoint": "subscriptions/{id}" + }, + { + "name": "044_02_03 endpoint /csourceRegistrations/", + "permutation_tp_id": "TP/NGSI-LD/CB/044_02_03", + "doc": "Verify that on a GET HTTP request if nothing is specified on the Accept header, \"application/json\" is assumed (/csourceRegistrations/)", + "tags": [ + "6_3_4", + "csr-query" + ], + "setup": null, + "teardown": "Delete Context Source Registration", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Header: Content-Type set to application/json and\n Response Header: Link is not Empty and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceRegistrations'\n method set to 'GET'\n Request a Context Source Registration with Return\nEntity Type set to 'Vehicle'\nHeader['Accept'] set to '*/*'", + "http_verb": "GET", + "endpoint": "csourceRegistrations" + }, + { + "name": "044_02_04 endpoint /temporal/entities", + "permutation_tp_id": "TP/NGSI-LD/CB/044_02_04", + "doc": "Verify that on a GET HTTP request if nothing is specified on the Accept header, \"application/json\" is assumed (/temporal/entities)", + "tags": [ + "6_3_4", + "te-query" + ], + "setup": null, + "teardown": "Delete Temporal Representation Of Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Header: Content-Type set to application/json and\n Response Header: Link is not Empty and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Request a Temporal Representation of Entities with Return", + "http_verb": "GET", + "endpoint": "temporal/entities" + } + ], + "permutations": [ + "endpoint", + "when" + ], + "robotpath": "CommonBehaviours", + "robotfile": "044_02" +} \ No newline at end of file diff --git a/doc/files/CommonBehaviours/044_03.json b/doc/files/CommonBehaviours/044_03.json new file mode 100644 index 0000000000000000000000000000000000000000..01db0ed911146beb4b6fa42fd80e0419b8779e41 --- /dev/null +++ b/doc/files/CommonBehaviours/044_03.json @@ -0,0 +1,116 @@ +{ + "tp_id": "TP/NGSI-LD/CB/044_03", + "test_objective": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\"", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 6.3.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_6_3_4", + "keywords": [], + "teardown": "None", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "044_03_01 endpoint patch /entities/{entityId}/attrs/{attrId}", + "permutation_tp_id": "TP/NGSI-LD/CB/044_03_01", + "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (patch /entities/{entityId}/attrs/{attrId})", + "tags": [ + "6_3_4", + "ea-partial-update" + ], + "setup": null, + "teardown": "Delete Entity by Id Returning Response", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 415\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and \nHeader['Content-Type'] set to 'application/xml' and\nPayload defined in file 'vehicle-brandname-fragment.jsonld'", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "044_03_02 endpoint patch /subscriptions/{subscriptionId}", + "permutation_tp_id": "TP/NGSI-LD/CB/044_03_02", + "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (patch /subscriptions/{subscriptionId})", + "tags": [ + "6_3_4", + "sub-update" + ], + "setup": null, + "teardown": "Delete Subscription", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 415\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/{subscription_id}'\n method set to 'PATCH'\n Request Update Subscription and \nHeader['Content-Type'] set to 'application/xml' and\nPayload defined in file 'csourceSubscriptions/fragments/subscription-update-sample.jsonld'", + "http_verb": "PATCH", + "endpoint": "subscriptions/{subscription_id}" + }, + { + "name": "044_03_03 endpoint post /entities/", + "permutation_tp_id": "TP/NGSI-LD/CB/044_03_03", + "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (post /entities/)", + "tags": [ + "6_3_4", + "e-create" + ], + "setup": null, + "teardown": "Delete Entity by Id", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 415\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/xml' and\n payload defined in file: 'building-simple-attributes-sample.jsonld'", + "http_verb": "POST", + "endpoint": "entities/" + }, + { + "name": "044_03_04 endpoint post /subscriptions/", + "permutation_tp_id": "TP/NGSI-LD/CB/044_03_04", + "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (post /subscriptions/)", + "tags": [ + "6_3_4", + "sub-create" + ], + "setup": null, + "teardown": "Delete Subscription", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 415\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/xml' and\n payload defined in file: 'csourceSubscriptions/subscription-sample.jsonld'", + "http_verb": "POST", + "endpoint": "subscriptions/" + }, + { + "name": "044_03_05 endpoint post /entityOperations/create", + "permutation_tp_id": "TP/NGSI-LD/CB/044_03_05", + "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (post /entityOperations/create)", + "tags": [ + "6_3_4", + "be-create" + ], + "setup": null, + "teardown": "Batch Delete Entities", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 415\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entityOperations/create'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/xml' and\n payload set to a list of entities to be created", + "http_verb": "POST", + "endpoint": "entityOperations/create" + }, + { + "name": "044_03_06 endpoint post /temporal/entities/", + "permutation_tp_id": "TP/NGSI-LD/CB/044_03_06", + "doc": "Verify throwing 415 HTTP status code (Unsupported Media Type) if \"Content-Type\" header is not \"application/json\" or \"application/ld+json\" (post /temporal/entities/)", + "tags": [ + "6_3_4", + "te-create" + ], + "setup": null, + "teardown": "Delete Temporal Representation Of Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 415\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/xml' and\n payload defined in file: 'vehicle-temporal-representation-sample.jsonld'", + "http_verb": "POST", + "endpoint": "temporal/entities" + } + ], + "permutations": [ + "endpoint", + "http_verb", + "when" + ], + "robotpath": "CommonBehaviours", + "robotfile": "044_03" +} \ No newline at end of file diff --git a/doc/files/CommonBehaviours/044_04.json b/doc/files/CommonBehaviours/044_04.json new file mode 100644 index 0000000000000000000000000000000000000000..bd14baf7ea8f100d5dc61af7f9490bb0f57355ab --- /dev/null +++ b/doc/files/CommonBehaviours/044_04.json @@ -0,0 +1,98 @@ +{ + "tp_id": "TP/NGSI-LD/CB/044_04", + "test_objective": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\"", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 6.3.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_6_3_4", + "keywords": [], + "teardown": "None", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "044_04_01 endpoint get /entities/{entityId}", + "permutation_tp_id": "TP/NGSI-LD/CB/044_04_01", + "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /entities/{entityId})", + "tags": [ + "6_3_4", + "e-query" + ], + "setup": null, + "teardown": "Delete Entity by Id Returning Response", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 406\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}'\n method set to 'GET'\n \nHeader['Accept'] set to application/xml", + "http_verb": "GET", + "endpoint": "entities/{id}" + }, + { + "name": "044_04_02 endpoint get /subscriptions/{subscriptionId}", + "permutation_tp_id": "TP/NGSI-LD/CB/044_04_02", + "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /subscriptions/{subscriptionId})", + "tags": [ + "6_3_4", + "sub-retrieve" + ], + "setup": null, + "teardown": "Delete Subscription", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 406\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/{id}'\n method set to 'GET'\n Request a subscription\nHeader['Accept'] set to 'application/xml'", + "http_verb": "GET", + "endpoint": "subscriptions/{id}" + }, + { + "name": "044_04_03 endpoint get /csourceRegistrations/", + "permutation_tp_id": "TP/NGSI-LD/CB/044_04_03", + "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /csourceRegistrations/)", + "tags": [ + "6_3_4", + "csr-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 406\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceRegistrations'\n method set to 'GET'\n Request a Context Source Registration with Return\nEntity Type set to 'Building'\nHeader['Accept'] set to 'application/xml'", + "http_verb": "GET", + "endpoint": "csourceRegistrations" + }, + { + "name": "044_04_04 endpoint get /csourceSubscriptions/", + "permutation_tp_id": "TP/NGSI-LD/CB/044_04_04", + "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /csourceSubscriptions/)", + "tags": [ + "csrsub-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 406\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceSubscriptions'\n method set to 'GET'\n Request Context Source Registration Subscriptions\nHeader['Accept'] set to 'application/xml'", + "http_verb": "GET", + "endpoint": "csourceSubscriptions" + }, + { + "name": "044_04_05 endpoint get /temporal/entities", + "permutation_tp_id": "TP/NGSI-LD/CB/044_04_05", + "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /temporal/entities)", + "tags": [ + "6_3_4", + "te-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 406\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Response containing:\n * Entity-Type is equal to '${entity_types_to_be_retrieved}'\n * timeRel is equal to 'after'\n * timeAt is equal to '2020-08-01T12:05:00Z'\n * Accept is equal to 'application/xml'", + "http_verb": "GET", + "endpoint": "temporal/entities" + } + ], + "permutations": [ + "when", + "endpoint" + ], + "robotpath": "CommonBehaviours", + "robotfile": "044_04" +} \ No newline at end of file diff --git a/doc/files/CommonBehaviours/044_05.json b/doc/files/CommonBehaviours/044_05.json new file mode 100644 index 0000000000000000000000000000000000000000..eb80869207719319708bab10649eac4e33df1eaa --- /dev/null +++ b/doc/files/CommonBehaviours/044_05.json @@ -0,0 +1,67 @@ +{ + "tp_id": "TP/NGSI-LD/CB/044_05", + "test_objective": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header is \"application/geo+json\" for operations different than \"Retrieve Entity\" and \"Query Entity\"", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 6.3.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_6_3_4", + "keywords": [], + "teardown": "None", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "044_05_01 Retrieve subscription by id", + "permutation_tp_id": "TP/NGSI-LD/CB/044_05_01", + "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /subscriptions/{subscriptionId})", + "tags": [ + "6_3_4", + "sub-retrieve" + ], + "setup": null, + "teardown": "Delete Subscription", + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 406\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/{id}'\n method set to 'GET'\n Request a subscription\nHeader['Accept'] set to 'application/geo+json'", + "http_verb": "GET", + "endpoint": "subscriptions/{id}" + }, + { + "name": "044_05_02 Query temporal entities", + "permutation_tp_id": "TP/NGSI-LD/CB/044_05_02", + "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /temporal/entities)", + "tags": [ + "6_3_4", + "te-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 406\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Response containing:\n * Entity-Type is equal to '${entity_types_to_be_retrieved}'\n * timeRel is equal to 'after'\n * timeAt is equal to '2020-08-01T12:05:00Z'\n * Accept is equal to 'application/geo+json'", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "044_05_03 Query context source registration", + "permutation_tp_id": "TP/NGSI-LD/CB/044_05_03", + "doc": "Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the \"Accept\" header does not imply \"application/json\" nor \"application/ld+json\" (get /csourceRegistrations)", + "tags": [ + "6_3_4", + "csr-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Status Code set to 406\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/csourceRegistrations'\n method set to 'GET'\n Request a Context Source Registration with Return\nEntity Type set to 'Building'\nHeader['Accept'] set to 'application/geo+json'", + "http_verb": "GET", + "endpoint": "csourceRegistrations" + } + ], + "permutations": [ + "endpoint", + "when" + ], + "robotpath": "CommonBehaviours", + "robotfile": "044_05" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_01_01.json b/doc/files/ContextInformation/Consumption/019_01_01.json new file mode 100644 index 0000000000000000000000000000000000000000..9c1d3532b9feb0072cf720d5ce77847db9444302 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_01_01.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_01_01", + "test_objective": "Check that you can query several entities based on ids", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_2", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_01_01 Query several entities based on ids", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_01_01", + "doc": "Check that you can query several entities based on ids", + "tags": [ + "5_7_2", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing a list containing Entity Elements, containing ${value} provided and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to '${entities_ids_to_be_retrieved}' with entity_types set to '${entity_types_to_be_retrieved}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_01_01" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_01_03.json b/doc/files/ContextInformation/Consumption/019_01_03.json new file mode 100644 index 0000000000000000000000000000000000000000..5158e2d95cf7673b9e224037651adb9d3bad6c77 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_01_03.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_01_03", + "test_objective": "Check that you can query several entities based on the given id pattern", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_2", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_01_03 Query several entities based on the given id pattern", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_01_03", + "doc": "Check that you can query several entities based on the given id pattern", + "tags": [ + "5_7_2", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing a list containing Entity Elements, containing ${value} provided and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to 'entity_id_pattern=${entity_id_pattern}' with entity_types set to '${entity_types_to_be_retrieved}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_01_03" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_01_04.json b/doc/files/ContextInformation/Consumption/019_01_04.json new file mode 100644 index 0000000000000000000000000000000000000000..b6e04430d944e59978b3a0cf1bb9fdbac5f4d39e --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_01_04.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_01_04", + "test_objective": "Check that you can query several entities based on attribute names", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_2", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_01_04 Query several entities based on attribute names", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_01_04", + "doc": "Check that you can query several entities based on attribute names", + "tags": [ + "5_7_2", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing a list containing Entity Elements, containing ${value} provided and\n Response Body containing a list containing Entity Elements, containing ${value} provided and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to 'attrs=${attributes_to_be_retrieved}'", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_01_04" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_02_01.json b/doc/files/ContextInformation/Consumption/019_02_01.json new file mode 100644 index 0000000000000000000000000000000000000000..025698880a5f8ab3a7dababf35e1b8b3100c69a7 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_02_01.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_02_01", + "test_objective": "Check that you can query several entities via POST Interaction based on ids", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_2", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_02_01 Query several entities via POST Interaction based on ids", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_02_01", + "doc": "Check that you can query several entities via POST Interaction based on ids", + "tags": [ + "5_7_2", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing a list containing Entity Elements, containing ${value} provided and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to '${entities_ids_to_be_retrieved}' with entity_types set to '${entity_types_to_be_retrieved}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_02_01" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_02_03.json b/doc/files/ContextInformation/Consumption/019_02_03.json new file mode 100644 index 0000000000000000000000000000000000000000..9042909e95a4c609103d187ea79149005ecf6429 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_02_03.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_02_03", + "test_objective": "Check that you can query several entities via POST Interaction based on the given id pattern", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_2", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_02_03 Query several entities via POST Interaction based on the given id pattern", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_02_03", + "doc": "Check that you can query several entities via POST Interaction based on the given id pattern", + "tags": [ + "5_7_2", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing a list containing Entity Elements, containing ${value} provided and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to 'entity_id_pattern=${entity_id_pattern}' with entity_types set to '${entity_types_to_be_retrieved}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_02_03" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_03_01.json b/doc/files/ContextInformation/Consumption/019_03_01.json new file mode 100644 index 0000000000000000000000000000000000000000..9f31585b67c5e07af0802dbb8f937bd1e2758e79 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_03_01.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_03_01", + "test_objective": "Check that you cannot query entities if the requested ids are incorrect", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_2", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_03_01 Query entities based on incorrect ids", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_03_01", + "doc": "Check that you cannot query entities if the requested ids are incorrect", + "tags": [ + "5_7_2", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to '${entities_ids_to_be_retrieved}' with entity_types set to '${entity_types_to_be_retrieved}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_03_01" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_03_02.json b/doc/files/ContextInformation/Consumption/019_03_02.json new file mode 100644 index 0000000000000000000000000000000000000000..3250d0dfc32ecd904048c0335298d0d6521f9593 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_03_02.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_03_02", + "test_objective": "Check that you cannot query entities if the requested entity types are incorrect", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_2", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_03_02 Query entities based on incorrect entity types", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_03_02", + "doc": "Check that you cannot query entities if the requested entity types are incorrect", + "tags": [ + "5_7_2", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to 'entity_types=${entity_types_to_be_retrieved}' with entity_types set to '${entity_types_to_be_retrieved}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_03_02" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_03_03.json b/doc/files/ContextInformation/Consumption/019_03_03.json new file mode 100644 index 0000000000000000000000000000000000000000..0d03de11d81142016250cd965f960ac5d4c7f897 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_03_03.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_03_03", + "test_objective": "Check that you cannot query entities if the requested id pattern is incorrect", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.2", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_2", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_03_03 Query several entities based on incorrect id pattern", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_03_03", + "doc": "Check that you cannot query entities if the requested id pattern is incorrect", + "tags": [ + "5_7_2", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Response body containing 'title' element and\n Response Status Code set to 400\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to 'entity_id_pattern=${invalid_entity_id_pattern}' with entity_types set to '${entity_types_to_be_retrieved}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_03_03" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_04.json b/doc/files/ContextInformation/Consumption/019_04.json new file mode 100644 index 0000000000000000000000000000000000000000..244d6875c75856d33b9b1e1fa5a1c4b077605c9c --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_04.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_04", + "test_objective": "Check that the queried entities by Id can be returned in a simplified representation", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 6.3.7", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_6_3_7", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_04_01 Query entities in a simplified representation", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_04_01", + "doc": "Check that the queried entities by Id can be returned in a simplified representation", + "tags": [ + "6_3_7", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing a list containing Entity Elements, containing ${value} provided and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to '${entities_ids_to_be_retrieved}' with entity_types set to '${entity_types_to_be_retrieved}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_04" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/019_05.json b/doc/files/ContextInformation/Consumption/019_05.json new file mode 100644 index 0000000000000000000000000000000000000000..2dc504992e78dec7f46446225773ff9e5a80d16e --- /dev/null +++ b/doc/files/ContextInformation/Consumption/019_05.json @@ -0,0 +1,34 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/E/019_05", + "test_objective": "Check that the queried entities by id can be returned in a geoJSON format", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 6.3.7", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_6_3_7", + "keywords": [ + "Delete Entities" + ], + "teardown": "Delete Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "019_05_01 Get an entity by id that can be returned in a geoJSON format", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_05_01", + "doc": "Check that the queried entities by id can be returned in a geoJSON format", + "tags": [ + "6_3_7", + "e-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing a list containing Entity Elements, containing ${value} provided and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Request Query Entities with entity_ids set to '${entities_ids_to_be_retrieved}' with entity_types set to '${entity_types_to_be_retrieved}", + "http_verb": "GET", + "endpoint": "entities/" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Entity/QueryEntities", + "robotfile": "019_05" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/021_02.json b/doc/files/ContextInformation/Consumption/021_02.json new file mode 100644 index 0000000000000000000000000000000000000000..a4c7f0eba191d152797389c1fba9ac71da61f0c9 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/021_02.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TE/021_02", + "test_objective": "Check that you can query the temporal evolution of certain attributes of entities", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.4", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_4", + "keywords": [ + "Setup Initial Entities", + "Delete Initial Entities" + ], + "teardown": "Delete Initial Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "021_02_01 Query the temporal evolution of certain attributes of entities", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_02_01", + "doc": "Check that you can query the temporal evolution of certain attributes of entities", + "tags": [ + "5_7_4", + "te-query" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-02-expectation.jsonld'\n and using the list of entity ids define in '${temporal_entities_representation_ids}' and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Response containing:\n * Entity-Type is equal to '${entity_types_to_be_retrieved}'\n * timeRel is equal to 'after'\n * timeAt is equal to '2020-07-01T12:05:00Z'\n * Accept is equal to 'attrs=${temporal_attributes_to_be_retrieved}'", + "http_verb": "GET", + "endpoint": "temporal/entities" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", + "robotfile": "021_02" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/024_01.json b/doc/files/ContextInformation/Consumption/024_01.json new file mode 100644 index 0000000000000000000000000000000000000000..c66a70b374d615eeda3aa5646c42eedf961c54f7 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/024_01.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/DISC/024_01", + "test_objective": "Check that you cannot retrieve a detailed representation of an unknown NGSI-LD entity type", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.7", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_7", + "keywords": [ + "Setup Initial Entities", + "Delete Initial Entities" + ], + "teardown": "Delete Initial Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "024_01_01 Retrieve Detailed Representation Of Available Entity Type Without Context", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/DISC/024_01_01", + "doc": "Check that you cannot retrieve a detailed representation of an unknown NGSI-LD entity type", + "tags": [ + "5_7_7", + "ed-type" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/ResourceNotFound' and\n Response body containing 'title' element and\n Response Status Code set to 404\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/types/{type}'\n method set to 'GET'\n Retrieve Entity Type, with type set to 'Building'", + "http_verb": "GET", + "endpoint": "types/{type}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation", + "robotfile": "024_01" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/024_02.json b/doc/files/ContextInformation/Consumption/024_02.json new file mode 100644 index 0000000000000000000000000000000000000000..ebce59c0717006260d923adf094cee9ab6389868 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/024_02.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/DISC/024_02", + "test_objective": "Check that you can retrieve a detailed representation of a specified NGSI-LD entity type", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.7", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_7", + "keywords": [ + "Setup Initial Entities", + "Delete Initial Entities" + ], + "teardown": "Delete Initial Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "024_02_01 Retrieve Detailed Representation Of Available Entity Type", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/DISC/024_02_01", + "doc": "Check that you can retrieve a detailed representation of a specified NGSI-LD entity type", + "tags": [ + "5_7_7", + "ed-type" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing an Entity Type Info and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/types/{type}'\n method set to 'GET'\n Retrieve Entity Type, with type set to 'Building', with Header['Link'] containing 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'", + "http_verb": "GET", + "endpoint": "types/{type}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation", + "robotfile": "024_02" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/027_01.json b/doc/files/ContextInformation/Consumption/027_01.json new file mode 100644 index 0000000000000000000000000000000000000000..b75b35f41aba89bcb20ee96493aa0359760d2bd6 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/027_01.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/DISC/027_01", + "test_objective": "Check that you cannot retrieve a detailed representation of an unknown NGSI-LD attribute", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.10", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_10", + "keywords": [ + "Setup Initial Entities", + "Delete Initial Entities" + ], + "teardown": "Delete Initial Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "027_01_01 Retrieve Detailed Representation Of Available Attribute Without Context", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/DISC/027_01_01", + "doc": "Check that you cannot retrieve a detailed representation of an unknown NGSI-LD attribute", + "tags": [ + "5_7_10", + "ed-attr" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/ResourceNotFound' and\n Response body containing 'title' element and\n Response Status Code set to 404\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/attributes/{attribute_name}'\n method set to 'GET'\n Retrieve Attribute with attributeName set to 'airQualityLevel'", + "http_verb": "GET", + "endpoint": "attributes/{attribute_name}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation", + "robotfile": "027_01" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/027_02.json b/doc/files/ContextInformation/Consumption/027_02.json new file mode 100644 index 0000000000000000000000000000000000000000..6401e71b4330e520d20825adf43924e50d84edc7 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/027_02.json @@ -0,0 +1,35 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/DISC/027_02", + "test_objective": "Check that you can retrieve a list with a detailed representation of NGSI-LD attributes", + "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.10", + "config_id": "", + "parent_release": "v1.3.1", + "pics_selection": "PICS_5_7_10", + "keywords": [ + "Setup Initial Entities", + "Delete Initial Entities" + ], + "teardown": "Delete Initial Entities", + "initial_condition": "with {\n the SUT in the \"initial state\"\n}", + "test_cases": [ + { + "name": "027_02_01 Retrieve Detailed Representation Of Available Attribute", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/DISC/027_02_01", + "doc": "Check that you can retrieve a list with a detailed representation of NGSI-LD attributes", + "tags": [ + "5_7_10", + "ed-attr" + ], + "setup": null, + "teardown": null, + "template": null, + "then": "then {\n the SUT sends a valid Response containing:\n Response Body containing an array of Attributes and\n Response Status Code set to 200\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/attributes/{attribute_name}'\n method set to 'GET'\n Retrieve Attribute with attributeName set to 'airQualityLevel'", + "http_verb": "GET", + "endpoint": "attributes/{attribute_name}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation", + "robotfile": "027_02" +} \ No newline at end of file diff --git a/doc/generateDocumentationData.py b/doc/generateDocumentationData.py index 0573fb3c4a881cbf114a0fd39f07e62155d2426c..fc46923f018ec64822e1d3421378970b22dbb08b 100644 --- a/doc/generateDocumentationData.py +++ b/doc/generateDocumentationData.py @@ -1,39 +1,49 @@ -from doc.analysis.generaterobotdata import GenerateRobotData -import json -import sys +from analysis.generaterobotdata import GenerateRobotData +from json import dump +from sys import argv from os.path import dirname, exists -from os import makedirs +from os import makedirs, walk -def create_json_of_robotfile(robot_path_to_be_processed: str, robot_file_to_be_processed: str): + +def create_json_of_robotfile(robot_file_to_be_processed: str): folder_test_suites = dirname(dirname(__file__)) + folder_result_path = f'{folder_test_suites}/doc/results' result_file = f'{folder_result_path}/{robot_file_to_be_processed}.json' - robot_file = f'{folder_test_suites}/TP/NGSI-LD/{robot_path_to_be_processed}/{robot_file_to_be_processed}.robot' + robot_path_to_be_processed, robot_file = find_robot_file(basedir=folder_test_suites, + filename=robot_file_to_be_processed) # Check that the folder '/results' exists and if not, create it if not exists(folder_result_path): makedirs(folder_result_path) - try: - data = GenerateRobotData(robot_file=robot_file, execdir=folder_test_suites) - data.parse_robot() - info = data.get_info() - except Exception as e: - print("WHILE GENERATING ROBOT DATA:", e) - info = {} - info["error_while_parsing"] = True - - info["robotpath"] = robot_path_to_be_processed - info["robotfile"] = robot_file_to_be_processed + #try: + data = GenerateRobotData(robot_file=robot_file, execdir=folder_test_suites) + data.parse_robot() + info = data.get_info() + #except Exception as e: + # print("WHILE GENERATING ROBOT DATA:", e) + # info = dict() + # info["error_while_parsing"] = True with open(result_file, 'w') as fp: - json.dump(obj=info, indent=4, fp=fp) + dump(obj=info, indent=2, fp=fp) return info + +def find_robot_file(basedir: str, filename: str): + filename = f'{filename}.robot' + for root, dirs, files in walk(basedir): + if filename in files: + return root.replace(f'{basedir}/TP/NGSI-LD', ''), f'{root}/{filename}' + + return None, None + + if __name__ == "__main__": - args = sys.argv[1:] - robot_path_tbp = args[0] - robot_file_tbp = args[1] - resulting_json = create_json_of_robotfile(robot_path_tbp, robot_file_tbp) + # Call with the folder below /TP/NGSI-LD which contains the robot file with name args[0] + args = argv[1:] + robot_file_tbp = args[0] + resulting_json = create_json_of_robotfile(robot_file_tbp) print("Correctly exiting") diff --git a/doc/tests/test_CommonBehaviours.py b/doc/tests/test_CommonBehaviours.py index f29ccf1dee4e0a87fd85619e1ae6f666a373b563..13f714f03f3a7a1b8b9dd1946a0570f036211dae 100644 --- a/doc/tests/test_CommonBehaviours.py +++ b/doc/tests/test_CommonBehaviours.py @@ -8,9 +8,10 @@ from os import listdir, remove, makedirs class TestCommonBehaviours(TestCase): - def setUp(self) -> None: - self.folder_test_suites = dirname(dirname(dirname(__file__))) - folder_results = f'{self.folder_test_suites}/doc/results' + @classmethod + def setUpClass(cls): + TestCommonBehaviours.folder_test_suites = dirname(dirname(dirname(__file__))) + folder_results = f'{TestCommonBehaviours.folder_test_suites}/doc/results' # Check that the folder '/results' exists and if not, create it if not exists(folder_results): @@ -19,6 +20,9 @@ class TestCommonBehaviours(TestCase): # Delete the /results folder [remove(f'{folder_results}/{x}') for x in listdir(folder_results) if x.startswith('out')] + def setUp(self) -> None: + self.folder_test_suites = dirname(dirname(dirname(__file__))) + def common_function(self, robot_file, expected_value, difference_file): data = GenerateRobotData(robot_file=robot_file, execdir=self.folder_test_suites) @@ -39,15 +43,42 @@ class TestCommonBehaviours(TestCase): def test_043_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/CommonBehaviours/043.robot' - expected_value = f'{self.folder_test_suites}/doc/files/043_01.json' + expected_value = f'{self.folder_test_suites}/doc/files/CommonBehaviours/043_01.json' difference_file = f'{self.folder_test_suites}/doc/results/out_043_01.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_044_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/CommonBehaviours/044_01.robot' - expected_value = f'{self.folder_test_suites}/doc/files/044_01.json' + expected_value = f'{self.folder_test_suites}/doc/files/CommonBehaviours/044_01.json' difference_file = f'{self.folder_test_suites}/doc/results/out_044_01.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_044_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/CommonBehaviours/044_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/CommonBehaviours/044_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_044_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_044_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/CommonBehaviours/044_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/CommonBehaviours/044_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_044_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_044_04(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/CommonBehaviours/044_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/CommonBehaviours/044_04.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_044_04.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_044_05(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/CommonBehaviours/044_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/CommonBehaviours/044_05.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_044_05.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) diff --git a/doc/tests/test_ContextInformation_Consumption.py b/doc/tests/test_ContextInformation_Consumption.py new file mode 100644 index 0000000000000000000000000000000000000000..7590921cff665c71b850d148301725ebe89c3497 --- /dev/null +++ b/doc/tests/test_ContextInformation_Consumption.py @@ -0,0 +1,279 @@ +#!/usr/bin/env python +from unittest import TestCase +from doc.analysis.generaterobotdata import GenerateRobotData +from json import load, dump +from deepdiff import DeepDiff +from os.path import dirname, exists +from os import listdir, remove, makedirs + + +class TestCIConsumptions(TestCase): + @classmethod + def setUpClass(cls): + # TODO: Test Suites checked until 019_01_01 + TestCIConsumptions.folder_test_suites = dirname(dirname(dirname(__file__))) + folder_results = f'{TestCIConsumptions.folder_test_suites}/doc/results' + + # Check that the folder '/results' exists and if not, create it + if not exists(folder_results): + makedirs(folder_results) + else: + # Delete the /results folder + [remove(f'{folder_results}/{x}') for x in listdir(folder_results) if x.startswith('out')] + + def setUp(self) -> None: + self.folder_test_suites = dirname(dirname(dirname(__file__))) + + def common_function(self, robot_file, expected_value, difference_file): + data = GenerateRobotData(robot_file=robot_file, + execdir=self.folder_test_suites) + data.parse_robot() + obtained_response = data.get_info() + + with open(expected_value, 'r') as file: + expected_response = load(file) + + result = DeepDiff(t1=obtained_response, t2=expected_response, ignore_order=True) + + if len(result) != 0: + # There are some differences + with open(difference_file, 'w') as fp: + dump(obj=obtained_response, indent=2, fp=fp) + + assert False, f'They are some difference between the expected and obtained dictionaries: \n {result}' + + def test_027_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/027_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_027_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_027_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/027_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_027_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_025_01(self): + self.fail("(025_01) Test Suite with Test Template, not yet implemented") + + def test_022_01(self): + self.fail("(022_01) Test Suite with Test Template, not yet implemented") + + def test_026_01(self): + self.fail("(026_01) Test Suite with Test Template, not yet implemented") + + def test_023_01(self): + self.fail("(023_01) Test Suite with Test Template, not yet implemented") + + def test_024_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/024_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_024_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_024_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/024_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_024_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_019_01_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_01_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_01_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_019_01_02(self): + self.fail("(019_01_02) Problems with Request parameters") + + def test_019_01_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_01_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_01_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_019_01_04(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_01_04.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_01_04.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_019_01_05(self): + self.fail("(019_01_05) Problems with Request parameters") + + def test_019_02_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_02_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_02_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_019_02_02(self): + self.fail("(019_02_02) Problems with Request parameters") + + def test_019_02_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_02_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_02_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_019_02_04(self): + self.fail("(019_02_04) Problems with Request parameters") + + def test_019_02_05(self): + self.fail("(019_02_05) Problems with Request parameters") + + def test_019_03_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_03_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_03_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_019_03_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_03_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_03_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_019_03_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_03_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_03_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_03_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_019_03_04(self): + self.fail("(019_03_04) Problems with Request parameters") + + def test_019_03_05(self): + self.fail("(019_03_04) Problems with Request parameters") + + def test_019_04(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_04.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_04.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + self.fail("(019_04) Problems with Request parameters, Query Entities missing options parameter") + + def test_019_05(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_05.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_019_05.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + self.fail("(019_04) Problems with Request parameters, Query Entities missing accept parameter") + + def test_019_06(self): + self.fail("(019_06) Problems with 'Check Response Body Containing Number Of Entities'") + + def test_018_01_01(self): + self.fail("(018_01_01) Problems with Query Entity, context-type information used for Link information") + + def test_018_01_02(self): + self.fail("(018_01_02) Problems with Query Entity") + + def test_018_01_03(self): + self.fail("(018_01_03) Problems with Query Entity") + + def test_018_02(self): + self.fail("(018_02) Test Suite with Test Template, not yet implemented") + + def test_018_03_01(self): + self.fail("(018_03_01) Problems with Query Entity") + + def test_018_03_02(self): + self.fail("(018_03_02) Problems with Query Entity") + + def test_018_04(self): + self.fail("(018_04) Problems with Request parameters, Query Entity missing options parameter") + + def test_018_05(self): + self.fail("(018_05) Problems with Request parameters, Query Entity missing options parameter") + + def test_018_06(self): + self.fail("(018_06) Test Suite with Test Template, not yet implemented") + + def test_021_01(self): + self.fail("(021_01) Test Suite with Test Template, not yet implemented") + + def test_021_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/021_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_021_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_021_03(self): + self.fail("(021_03) Problems with Request parameters, 'Query Temporal Representation Of Entities'") + + def test_021_04(self): + self.fail("(021_04) Problems with Request parameters, 'Query Temporal Representation Of Entities'") + + def test_021_05(self): + self.fail("(021_05) Problems with Request parameters, 'Query Temporal Representation Of Entities'") + + def test_021_06(self): + self.fail("(021_06) Problems with Request parameters, 'Query Temporal Representation Of Entities'") + + def test_021_07(self): + self.fail("(021_07) Problems with Request parameters, 'Query Temporal Representation Of Entities'") + + def test_021_08(self): + self.fail("(021_08) Problems with Request parameters, 'Query Temporal Representation Of Entities'") + + def test_021_09(self): + self.fail("(021_09) Test Suite with Test Template, not yet implemented") + + def test_021_10(self): + self.fail("(021_10) Problems with Request parameters, 'Query Temporal Representation Of Entities'") + + def test_021_11(self): + self.fail("(021_11) Test Suite with Test Template, not yet implemented") + + def test_021_12(self): + self.fail("(021_12) Problems with Request parameters, 'Query Temporal Representation Of Entities'") + + def test_021_13(self): + self.fail("(021_13) Test Suite with Test Template, not yet implemented") + + def test_020_01(self): + self.fail("(020_01) Problems with Request parameters, 'Retrieve Temporal Representation Of Entity'") + + def test_020_02(self): + self.fail("(020_02) Problems with Request parameters, 'Retrieve Temporal Representation Of Entity'") + + def test_020_03(self): + self.fail("(020_03) Problems with Request parameters, 'Retrieve Temporal Representation Of Entity'") + + def test_020_04(self): + self.fail("(020_04) Test Suite with Test Template, not yet implemented") + + def test_020_05(self): + self.fail("(020_05) Test Suite with Test Template, not yet implemented") + + def test_020_06(self): + self.fail("(020_06) Problems with Request parameters, 'Retrieve Temporal Representation Of Entity'") + + def test_020_07(self): + self.fail("(020_07) Problems with Request parameters, 'Retrieve Temporal Representation Of Entity'") + + def test_020_08(self): + self.fail("(020_08) Problems with Request parameters, 'Retrieve Temporal Representation Of Entity'") + + def test_020_09(self): + self.fail("(020_09) Test Suite with Test Template, not yet implemented") + + def test_020_10(self): + self.fail("(020_10) Test Suite with Test Template, not yet implemented") diff --git a/doc/tests/test_ContextInformation_Provision.py b/doc/tests/test_ContextInformation_Provision.py new file mode 100644 index 0000000000000000000000000000000000000000..3459303688d14acd8e021573889cee1513a1ab9b --- /dev/null +++ b/doc/tests/test_ContextInformation_Provision.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +from unittest import TestCase +from doc.analysis.generaterobotdata import GenerateRobotData +from json import load, dump +from deepdiff import DeepDiff +from os.path import dirname, exists +from os import listdir, remove, makedirs + + +class TestCIProvision(TestCase): + @classmethod + def setUpClass(cls): + TestCIProvision.folder_test_suites = dirname(dirname(dirname(__file__))) + folder_results = f'{TestCIProvision.folder_test_suites}/doc/results' + + # Check that the folder '/results' exists and if not, create it + if not exists(folder_results): + makedirs(folder_results) + else: + # Delete the /results folder + [remove(f'{folder_results}/{x}') for x in listdir(folder_results) if x.startswith('out')] + + def setUp(self) -> None: + self.folder_test_suites = dirname(dirname(dirname(__file__))) + + def common_function(self, robot_file, expected_value, difference_file): + data = GenerateRobotData(robot_file=robot_file, + execdir=self.folder_test_suites) + data.parse_robot() + obtained_response = data.get_info() + + with open(expected_value, 'r') as file: + expected_response = load(file) + + result = DeepDiff(t1=obtained_response, t2=expected_response, ignore_order=True) + + if len(result) != 0: + # There are some differences + with open(difference_file, 'w') as fp: + dump(obj=obtained_response, indent=2, fp=fp) + + assert False, f'They are some difference between the expected and obtained dictionaries: \n {result}' + + # def test_027_01(self): + # robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_01.robot' + # expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/027_01.json' + # difference_file = f'{self.folder_test_suites}/doc/results/out_027_01.json' + # + # self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + # + # def test_025_01(self): + # self.fail("(025_01) Test Suite with Test Template, not yet implemented") diff --git a/requirements.txt b/requirements.txt index 686ff92bd9922404d3f5dcb9deda0a55ac875c77..c0fe356791ed83241d8c0a9e37f37b2e29fa95c3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ robotframework==6.1.1 robotframework-jsonlibrary==0.5 robotframework-requests==0.9.5 -deepdiff==6.3.1 +deepdiff==6.5.0 prettydiff==0.1.0 robotframework-httpctrl==0.3.1 robotframework-tidy==4.5.0