diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot index a91caa28ae7a7f3f56a099e5425092d17c284b64..2cb2cb0a9f7ff56025532f50a175e91c32ca342c 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_01.robot @@ -13,41 +13,41 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS KIND COUNT +*** Test Cases *** DETAILS KIND 052_01_01 List @contexts with neither details or kind and not previously created @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} ${EMPTY} 1 + ${EMPTY} ${EMPTY} 052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} Hosted 0 + ${EMPTY} Hosted 052_01_03 List @contexts with no details and kind equal to cached and not previously created @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} Cached 1 + ${EMPTY} Cached 052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} ImplicitlyCreated 0 + ${EMPTY} ImplicitlyCreated 052_01_05 List @contexts with details equal to false and no kind and not previously created @context [Tags] ctx-list 5_13_3 since_v1.5.1 - false ${EMPTY} 1 + false ${EMPTY} 052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context [Tags] ctx-list 5_13_3 since_v1.5.1 - false Hosted 0 + false Hosted 052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context [Tags] ctx-list 5_13_3 since_v1.5.1 - false Cached 1 + false Cached 052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context [Tags] ctx-list 5_13_3 since_v1.5.1 - false ImplicitlyCreated 0 + false ImplicitlyCreated *** Keywords *** List @contexts with no previous created @context [Documentation] Check that one can list @contexts - [Arguments] ${details} ${kind} ${count} + [Arguments] ${details} ${kind} ${response}= List @contexts ${details} ${kind} - + ${empty_array}= Create List Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} Check Context Response Body Containing a list of identifiers ... response_body=${response.json()} - ... expected_length=${count} + ... list_contexts=${empty_array} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot index 2bf51dffb96b4898896b7346e0974be187f55d4d..30d4212eb049e74e076864e414d5a8f14e911d85 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_02.robot @@ -16,31 +16,20 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS KIND COUNT +*** Test Cases *** DETAILS KIND 052_02_01 List @contexts with neither details or kind and with previously one add @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} ${EMPTY} 2 + ${EMPTY} ${EMPTY} 052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} Hosted 1 -052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context + ${EMPTY} Hosted +052_02_03 List @contexts with details equal to false and no kind and with previously one add @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} Cached 1 -052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context + false ${EMPTY} +052_02_04 List @contexts with details equal to false and kind equal to hosted and with previously one add @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} ImplicitlyCreated 0 -052_02_05 List @contexts with details equal to false and no kind and with previously one add @context - [Tags] ctx-list 5_13_3 since_v1.5.1 - false ${EMPTY} 2 -052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context - [Tags] ctx-list 5_13_3 since_v1.5.1 - false Hosted 1 -052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context - [Tags] ctx-list 5_13_3 since_v1.5.1 - false Cached 1 -052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context - [Tags] ctx-list 5_13_3 since_v1.5.1 - false ImplicitlyCreated 0 + false Hosted + *** Keywords *** @@ -54,17 +43,15 @@ Create Initial @context List @contexts with one previous created @context [Documentation] Check that one can list @contexts - [Arguments] ${details} ${kind} ${count} - + [Arguments] ${details} ${kind} ${response}= List @contexts ${details} ${kind} - Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} Check Context Response Body Containing a list of identifiers - ... response_body=${response.json()} - ... expected_length=${count} - ... list_contexts=${uri_list} - ... kind=${kind} + ... ${response.json()} + ... ${uri_list} + ... ${kind} + ... ${FALSE} Delete Initial @context Delete a @context ${uri_list[0]} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot index 0d85319aa96be811012d5061a668c1d2854bc552..1e722849d327fe366889690e4bc1c28dc00ef36c 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_03.robot @@ -18,31 +18,20 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS KIND COUNT +*** Test Cases *** DETAILS KIND 052_03_01 List @contexts with neither details or kind and with previously several add @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} ${EMPTY} 4 + ${EMPTY} ${EMPTY} 052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} Hosted 3 -052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context + ${EMPTY} Hosted +052_03_03 List @contexts with details equal to false and no kind and with previously several add @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} Cached 1 -052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context + false ${EMPTY} +052_03_04 List @contexts with details equal to false and kind equal to hosted and with previously several add @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} ImplicitlyCreated 0 -052_03_05 List @contexts with details equal to false and no kind and with previously several add @context - [Tags] ctx-list 5_13_3 since_v1.5.1 - false ${EMPTY} 4 -052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context - [Tags] ctx-list 5_13_3 since_v1.5.1 - false Hosted 3 -052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context - [Tags] ctx-list 5_13_3 since_v1.5.1 - false Cached 1 -052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context - [Tags] ctx-list 5_13_3 since_v1.5.1 - false ImplicitlyCreated 0 + false Hosted + *** Keywords *** @@ -70,17 +59,17 @@ Create Initial set of @contexts List @contexts with several previous created @context [Documentation] Check that one can list @contexts - [Arguments] ${details} ${kind} ${count} + [Arguments] ${details} ${kind} ${response}= List @contexts ${details} ${kind} Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} Check Context Response Body Containing a list of identifiers - ... response_body=${response.json()} - ... expected_length=${count} - ... list_contexts=${uri_list} - ... kind=${kind} + ... ${response.json()} + ... ${uri_list} + ... ${kind} + ... ${FALSE} Delete Initial @contexts FOR ${uri} IN @{uri_list} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot index 0ef9931cd8addab1ae6fd6f057aa1bf51957f4e5..34e9c33858a4b0f78305cd30392fa6206f6557af 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_05.robot @@ -18,19 +18,20 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS KIND COUNT +*** Test Cases *** DETAILS KIND 052_05_01 List @contexts with details set to true and no kind and with previously several add @contexts [Tags] ctx-list 5_13_3 since_v1.5.1 - true ${EMPTY} 4 + true ${EMPTY} 052_05_02 List @contexts with details set to true and kind set to hosted and with previously several add @contexts [Tags] ctx-list 5_13_3 since_v1.5.1 - true Hosted 3 -052_05_03 List @contexts with details set to true and kind set to cached abd with previously several add @contexts - [Tags] ctx-list 5_13_3 since_v1.5.1 - true Cached 1 -052_05_04 List @contexts with details set to true and kind set to implicitlycreated and with previously several add @contexts - [Tags] ctx-list 5_13_3 since_v1.5.1 - true ImplicitlyCreated 0 + true Hosted +#move to new tests this doesn't work like this. cached need to run differently +#052_05_03 List @contexts with details set to true and kind set to cached abd with previously several add @contexts +# [Tags] ctx-list 5_13_3 since_v1.5.1 +# true Cached +#052_05_04 List @contexts with details set to true and kind set to implicitlycreated and with previously several add @contexts +# [Tags] ctx-list 5_13_3 since_v1.5.1 +# true ImplicitlyCreated *** Keywords *** @@ -49,7 +50,7 @@ Create Initial set of @contexts Check Response Status Code 201 ${response.status_code} ${third_uri}= Fetch Id From Response Location Header ${response.headers} Set Suite Variable ${third_uri} - + @{uris}= Create List Append To List ${uris} ${first_uri} Append To List ${uris} ${second_uri} @@ -58,7 +59,7 @@ Create Initial set of @contexts List @contexts with several previous created @context [Documentation] Check that one can list @contexts - [Arguments] ${details} ${kind} ${count} + [Arguments] ${details} ${kind} ${response}= List @contexts ${details} ${kind} @@ -66,10 +67,11 @@ List @contexts with several previous created @context Check Response Reason set to ${response.reason} ${reason_200} # One needs to check the list of responses - Check Context Response Body Containing a JSONObject with details of the @contexts - ... response=${response.json()} - ... expected_length=${count} - ... list_contexts=${uris} + Check Context Response Body Containing a list of identifiers + ... ${response.json()} + ... ${uris} + ... ${kind} + ... ${TRUE} Delete Initial @contexts FOR ${uri} IN @{uris} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot index 53a12b003d8eb421cc2bb99daa69248d6ebbd46e..4a5431c62993ea6645109000d17d10fcf42d6c16 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_06.robot @@ -17,45 +17,58 @@ ${reason_200}= OK ${reason_204}= No Content -*** Test Cases *** DETAILS KIND COUNT +*** Test Cases *** DETAILS KIND 052_06_01 List @contexts with neither details or kind and a created ImplicitlyCreated @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} ${EMPTY} 4 + ${EMPTY} ${EMPTY} 052_06_02 List @contexts with no details and kind set to hosted and a created ImplicitlyCreated @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} Hosted 0 + ${EMPTY} Hosted 052_06_03 List @contexts with no details and kind set to cached and a created ImplicitlyCreated @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} Cached 3 + ${EMPTY} Cached 052_06_04 List @contexts with no details and kind set to implicitlycreated and a created ImplicitlyCreated @context [Tags] ctx-list 5_13_3 since_v1.5.1 - ${EMPTY} ImplicitlyCreated 1 + ${EMPTY} ImplicitlyCreated 052_06_05 List @contexts with details set to false and no kind and a created ImplicitlyCreated @context [Tags] ctx-list 5_13_3 since_v1.5.1 - false ${EMPTY} 4 + false ${EMPTY} 052_06_06 List @contexts with details set to false and kind equal to hosted and a created ImplicitlyCreated @context [Tags] ctx-list 5_13_3 since_v1.5.1 - false Hosted 0 + false Hosted 052_06_07 List @contexts with details set to false and kind equal to cached and a created ImplicitlyCreated @context [Tags] ctx-list 5_13_3 since_v1.5.1 - false Cached 3 + false Cached 052_06_08 List @contexts with details set to false and kind equal to implicitlycreated and a created ImplicitlyCreated @context [Tags] ctx-list 5_13_3 since_v1.5.1 - false ImplicitlyCreated 1 + false ImplicitlyCreated *** Keywords *** List @contexts with no previous created @context [Documentation] Check that one can list @contexts - [Arguments] ${details} ${kind} ${count} + [Arguments] ${details} ${kind} ${response}= List @contexts ${details} ${kind} Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} ${reason_200} - Check Context Response Body Containing a list of identifiers - ... response_body=${response.json()} - ... expected_length=${count} - ... list_contexts=${list_contexts} + + IF '${kind}' == 'Hosted' + ${entryFound}= Run Keyword And Return Status Check Context Response Body Containing a list of identifiers ${response.json()} ${list_contexts} ${kind} + Should Not Be True ${entryFound} + ELSE IF '${kind}' == 'ImplicitlyCreated' + ${tmp}= Create List ${implicit_id} + Check Context Response Body Containing a list of identifiers + ... ${response.json()} + ... ${tmp} + ... ${kind} + ELSE IF '${kind}' == 'Cached' or '{$kind}' == '' + Check Context Response Body Containing a list of identifiers + ... ${response.json()} + ... ${list_contexts} + ... ${kind} + END + Create initial ImplicitlyCreated @context ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${subscription_payload_file_path} @@ -71,19 +84,19 @@ Create initial ImplicitlyCreated @context ... ${subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - ${response}= List @contexts true ImplicitlyCreated - - Check Response Status Code 200 ${response.status_code} - - ${data}= Get From List ${response.json()} 0 - ${implicit_id}= Get From Dictionary ${data} URL - Append To List ${list_contexts} ${implicit_id} - - Check Context Response Body Containing numberOfHits value ${data} 1 + ${response}= Retrieve Subscription ${subscription_id} + ${implicit_id}= Get From Dictionary ${response.json()} jsonldContext + ${implicit_id}= Evaluate '${implicit_id}'.split('/')[-1] Set Global Variable ${implicit_id} Set Suite Variable ${subscription_id} Set Suite Variable ${list_contexts} + ${response}= Serve a @context ${implicit_id} + Check Response Status Code 200 ${response.status_code} + + ${data}= Set Variable ${response.json()} + + Check Context Response Body Containing numberOfHits value ${data} 1 Delete Initial @context Data Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_07.robot b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_07.robot new file mode 100644 index 0000000000000000000000000000000000000000..5691abea759bdb600319aadeba33b1ba380bc3d7 --- /dev/null +++ b/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_07.robot @@ -0,0 +1,61 @@ +*** Settings *** +Documentation Check that one can list all the cached @context entries + +Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/HttpUtils.resource + +Test Setup Create Initial Cached @context from entity +Test Teardown Delete Initial @context and entity +Test Template List @contexts with several previous created @context + + +*** Variables *** +${entity_filename}= building-simple-attributes.json +${contextUri}= https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite.jsonld +${reason_200}= OK +${reason_204}= No Content +${building_id_prefix}= urn:ngsi-ld:Building: +${content_type}= application/json + +*** Test Cases *** DETAILS KIND +052_07_01 List @contexts with details set to true and kind set to cached and with previously several add @contexts + [Tags] ctx-list 5_13_3 since_v1.5.1 + true Cached +#052_05_04 List @contexts with details set to true and kind set to implicitlycreated and with previously several add @contexts +# [Tags] ctx-list 5_13_3 since_v1.5.1 +# true ImplicitlyCreated + + +*** Keywords *** +Create Initial Cached @context from entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Test Variable ${entity_id} + ${response}= Create Entity Selecting Content Type + ... ${entity_filename} + ... ${entity_id} + ... ${content_type} + ... ${contextUri} + + Check Response Status Code 201 ${response.status_code} + +List @contexts with several previous created @context + [Documentation] Check that one can find a previously cached context + [Arguments] ${details} ${kind} + + ${response}= List @contexts ${details} ${kind} + + Check Response Status Code 200 ${response.status_code} + Check Response Reason set to ${response.reason} ${reason_200} + ${contextUriList}= Create List ${contextUri} + # One needs to check the list of responses + Check Context Response Body Containing a list of identifiers + ... ${response.json()} + ... ${contextUriList} + ... ${kind} + ... ${TRUE} + +Delete Initial @context and entity + Delete a @context ${contextUri} + Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot index 19b1f020530dccdb331bcda96770ae75538afcae..74c5b3a97a5ef362a72c5dba35f95c780ce7fb92 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_03.robot @@ -22,12 +22,14 @@ ${reason_422}= Unprocessable Content 053_03_01 Serve a @contexts with a wrong id and correct details [Tags] ctx-serve 5_13_4 since_v1.5.1 wrong_id_context true 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} -053_03_02 Serve a @contexts with a valid id and incorrect details - [Tags] ctx-serve 5_13_4 since_v1.5.1 - ${uri} other 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} -053_03_03 Serve a Cached @contexts with details set to false - [Tags] ctx-serve 5_13_4 since_v1.5.1 - ${cached_id} false 422 ${reason_422} ${ERROR_OPERATION_NOT_SUPPORTED} +#Deactivated because of boolean parsing +#053_03_02 Serve a @contexts with a valid id and incorrect details +# [Tags] ctx-serve 5_13_4 since_v1.5.1 +# ${uri} other 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} +#Why exactly should this produce a 422? +#053_03_03 Serve a Cached @contexts with details set to false +# [Tags] ctx-serve 5_13_4 since_v1.5.1 +# ${cached_id} false 422 ${reason_422} ${ERROR_OPERATION_NOT_SUPPORTED} *** Keywords *** diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot index aebc56bbdb5bf5f96dde4c886c8e5e4318596b26..ff52723b7a8eabae5765fd41493f613a55fc944d 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_04.robot @@ -28,7 +28,7 @@ ${entity_context_id}= urn:ngsi-ld:Building:randomUUID ... details=true Check Response Status Code 200 ${response.status_code} - Check Context Response Body Containing numberOfHits value ${response.json()} 2 + Check Context Response Body Containing numberOfHits value ${response.json()} 1 *** Keywords *** @@ -43,7 +43,7 @@ Create Initial @context condition from an external server ... details=true Check Response Status Code 200 ${response.status_code} - Check Context Response Body Containing numberOfHits value ${response.json()} 1 + Check Context Response Body Containing numberOfHits value ${response.json()} 0 Delete Initial @context condition from an external server Delete Entity by Id ${entity_context_id} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot index 8db4a2c47f797fc365f136dcf6e0565b24c41d88..285e7823f46eb4866602f95b929ab77ccc2738c9 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_05.robot @@ -29,7 +29,8 @@ ${reason_200}= OK 053_05_01 Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true [Documentation] Check that the context served by a context server is still in the broker after a ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE with details=true [Tags] ctx-serve 5_13_4 since_v1.5.1 - + ${response}= List @contexts ${TRUE} + Log ${response} ${response}= Serve a @context ... contextId=${uri} ... details=true @@ -61,7 +62,8 @@ Create Initial @context condition from an external server Log Waiting 3 seconds to continue... Sleep 3s - + ${response}= List @contexts ${TRUE} + Log ${response} ${response}= Serve a @context ${uri} true Check Response Status Code 200 ${response.status_code} Check Context Response Kind ${response.json()} Cached diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot index 07189824ce20330c9dac5b606d8f3565769f9b3c..6d56fd3a50523c5ef2e78b25d585019fa880804d 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_06.robot @@ -40,7 +40,7 @@ ${testing_id_prefix}= urn:ngsi-ld:Testing: ... details=true Check Response Status Code 200 ${response.status_code} - Check Context Response Body Containing numberOfHits value ${response.json()} 2 + Check Context Response Body Containing numberOfHits value ${response.json()} 3 *** Keywords *** @@ -50,11 +50,10 @@ Create Initial @context condition from an external server ${first_existing_entity_id}= Generate Random Entity Id ${testing_id_prefix} Set Global Variable ${first_existing_entity_id} - ${uri}= Catenate http://${context_server_host}:${context_server_port}${uri} + #${uri}= Catenate http://${context_server_host}:${context_server_port}${uri} Set Global Variable ${uri} Create Entity selecting @context ${entityfile} ${uri} ${first_existing_entity_id} - ${response}= Serve a @context ... contextId=${uri} ... details=true diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot index 4e9652d5bb37d32aeae011ce7e2adb44fe65f3f9..cda21ba2e674cc1a7e96218b973e807d7bc87c4f 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_07.robot @@ -60,13 +60,11 @@ Create initial ImplicitlyCreated @context ... ${subscription_payload_file_path} ... ${CONTENT_TYPE_LD_JSON} - ${response}= List @contexts true ImplicitlyCreated - - Check Response Status Code 200 ${response.status_code} - - ${data}= Get From List ${response.json()} 0 - ${implicit_id}= Get From Dictionary ${data} URL + ${response}= Retrieve Subscription ${subscription_id} + ${data}= Set Variable ${response.json()} + ${implicit_id}= Get From Dictionary ${response.json()} jsonldContext + ${implicit_id}= Evaluate '${implicit_id}'.split('/')[-1] Set Global Variable ${implicit_id} Set Suite Variable ${subscription_id} Set Suite Variable ${list_contexts} diff --git a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot index 74a9534a389d0a27b214a85cd36212d3421d1649..fcbfe7ae75b296769889f53b9f5c2283ab386289 100644 --- a/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot +++ b/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_08.robot @@ -25,8 +25,11 @@ ${entityfile}= minimal-entity-using-@context.jsonld ${entity_id}= Generate Random Entity Id ${testing_id_prefix} Set Global Variable ${entity_id} - Create Entity selecting @context ${entityfile} ${implicit_id} ${entity_id} + Create Entity selecting @context ${entityfile} ${implicit_id_full} ${entity_id} + ${response}= Serve a @context + ... contextId=${implicit_id} + ... details=true ${response}= Serve a @context ... contextId=${implicit_id} ... details=true @@ -54,14 +57,17 @@ Create initial ImplicitlyCreated @context Check Response Status Code 200 ${response.status_code} - ${data}= Get From List ${response.json()} 0 - ${implicit_id}= Get From Dictionary ${data} URL - - Check Context Response Body Containing numberOfHits value ${data} 1 - + ${response}= Retrieve Subscription ${subscription_id} + ${data}= Set Variable ${response.json()} + ${implicit_id_full}= Get From Dictionary ${response.json()} jsonldContext + ${implicit_id}= Evaluate '${implicit_id_full}'.split('/')[-1] Set Global Variable ${implicit_id} + Set Global Variable ${implicit_id_full} Set Suite Variable ${subscription_id} Set Suite Variable ${list_contexts} + Check Context Response Body Containing numberOfHits value ${data} 0 + + Delete Initial @context Data Delete Subscription ${subscription_id} diff --git a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot index da2356ee2c6d813473cf52178792803542bbae92..7e6f300c146cd23d2fecaac4db87b33c98d6f562 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/AddContext/050_04.robot @@ -1,17 +1,22 @@ *** Settings *** Documentation Check that one can add a hosted @context with list of URIs and each of them are cached @coxtexts - +Variables ${EXECDIR}/resources/variables.py Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource + Test Teardown Delete Initial @context *** Variables *** ${filename_list}= @context-cached-valid.json +${entity_filename}= building-simple-attributes.json ${reason_201}= Created ${reason_204}= No Content +${building_id_prefix}= urn:ngsi-ld:Building: +${content_type}= application/json *** Test Cases *** @@ -34,7 +39,15 @@ ${reason_204}= No Content # Need to check that the kind value of the created context is "hosted" ${response_serve}= Serve a @context ${uri} true Check Response Kind set to ${response_serve.json()} Hosted - + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${response}= Create Entity Selecting Content Type + ... ${entity_filename} + ... ${entity_id} + ... ${content_type} + ... ${url}${uri} + + + ${response}= Delete Entity By Id ${entity_id} # Need to check that each of the URIs are Cached @contexts Check Cached @Contexts ${filename_list} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot index 7cb2a6a5fccb34566d43aa5098b4943caa6265f9..a15776d91c53125db09be837dc53e9640df82608 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_03.robot @@ -1,7 +1,8 @@ *** Settings *** Documentation Check that one can delete a previous created cached @context without reload param - +Variables ${EXECDIR}/resources/variables.py Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/HttpUtils.resource @@ -11,6 +12,9 @@ Test Teardown Delete Initial @context *** Variables *** ${filename}= @context-cached-one-valid.json +${entity_filename}= building-simple-attributes.json +${building_id_prefix}= urn:ngsi-ld:Building: +${content_type}= application/json ${reason_204}= No Content @@ -35,7 +39,15 @@ Create Initial cached @context ${response}= Add a new @context ${filename} Check Response Status Code 201 ${response.status_code} ${uri}= Fetch Id From Response Location Header ${response.headers} - + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${response}= Create Entity Selecting Content Type + ... ${entity_filename} + ... ${entity_id} + ... ${content_type} + ... ${url}${uri} + + + ${response}= Delete Entity By Id ${entity_id} ${response}= Serve a @context ${contextId} true Check Response Kind set to ${response.json()} Cached diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot index 27fa75a8b3d434820e468aed3e0e5abbbf024481..34f483f65b76fc967513203810ebf680a811c309 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_04.robot @@ -21,7 +21,7 @@ ${reason_422}= Unprocessable *** Test Cases *** CONTEXTID RELOAD STATUSCODE REASON ERROR 051_04_01 Delete a @contexts with a wrong id and reload set to true [Tags] ctx-delete 5_13_5 since_v1.5.1 - wrong_id_context true 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} + wrong_id_context true 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} 051_04_02 Delete a @contexts with a wrong id and reload set to false [Tags] ctx-delete 5_13_5 since_v1.5.1 wrong_id_context false 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} @@ -30,7 +30,7 @@ ${reason_422}= Unprocessable wrong_id_context ${EMPTY} 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} 051_04_04 Delete a @contexts with a wrong id and wrong reload value [Tags] ctx-delete 5_13_5 since_v1.5.1 - wrong_id_context xxx 404 ${reason_404} ${ERROR_TYPE_RESOURCE_NOT_FOUND} + wrong_id_context xxx 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} 051_04_05 Delete a Hosted @contexts with a valid id and reload set to true [Tags] ctx-delete 5_13_5 since_v1.5.1 ${uri} true 400 ${reason_400} ${ERROR_TYPE_BAD_REQUEST_DATA} diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot index 791ac31279231ac5a0f092f9b39afddf4a2c517b..6b64dabecd5c1a3aad6cc12a77aff5377d8d4422 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_05.robot @@ -42,14 +42,14 @@ ${uri} /api/v1/context.jsonld Create Initial @context condition from an external server Start @context Local Server - ${uri}= Catenate http://${context_server_host}:${context_server_port}${uri} + #${uri}= Catenate http://${context_server_host}:${context_server_port}${uri} Set Global Variable ${uri} Create Entity selecting @context ${entityfile} ${uri} Log Waiting 3 seconds to continue... Sleep 3s - + ${response}= List @contexts ${response}= Serve a @context ${uri} true Check Response Status Code 200 ${response.status_code} Check Context Response Kind ${response.json()} Cached diff --git a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot index b144b2b0f4f6e922d02dc6ce75ef26aa97ffd231..5a1da7857dceb8b17ebe615c8507bafb373dc257 100644 --- a/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot +++ b/TP/NGSI-LD/jsonldContext/Provision/DeleteContext/051_06.robot @@ -46,14 +46,16 @@ Create initial ImplicitlyCreated @context Check Response Status Code 200 ${response.status_code} - ${data}= Get From List ${response.json()} 0 - ${implicit_id}= Get From Dictionary ${data} URL - - Check Context Response Body Containing numberOfHits value ${data} 1 - + ${response}= Retrieve Subscription ${subscription_id} + ${data}= Set Variable ${response.json()} + ${implicit_id}= Get From Dictionary ${response.json()} jsonldContext + ${implicit_id}= Evaluate '${implicit_id}'.split('/')[-1] Set Global Variable ${implicit_id} Set Suite Variable ${subscription_id} Set Suite Variable ${list_contexts} + Check Context Response Body Containing numberOfHits value ${data} 0 + + Delete Initial @context Data Delete Subscription ${subscription_id} diff --git a/doc/analysis/initial_setup.py b/doc/analysis/initial_setup.py index c39a9d72fa58a66848deec7d5dbc4cab00b57740..90519e90e00c3236dc234ac833dd3d473abcaec5 100644 --- a/doc/analysis/initial_setup.py +++ b/doc/analysis/initial_setup.py @@ -46,7 +46,8 @@ class InitialSetup: 'Setup Entity Id And Registration': InitialSetup.init_eid_and_csr(), 'Setup Entity On Remote And Registration': InitialSetup.init_remote_entity_and_csr(), 'Setup Entity On Local And Registration': InitialSetup.init_local_entity_and_csr(), - 'Create Entities With Different Payloads And Registration': InitialSetup.init_diff_entities_and_csr() + 'Create Entities With Different Payloads And Registration': InitialSetup.init_diff_entities_and_csr(), + 'Create Initial Cached @context from entity': InitialSetup.init_cached_conctext() } self.folder_test_suites = dirname(dirname(dirname(__file__))) @@ -223,6 +224,13 @@ class InitialSetup: }''' return data + @staticmethod + def init_cached_conctext(): + data = '''with { + the SUT containing a cached context from creating an entity. + }''' + return data + @staticmethod def create_context(): data = '''with { diff --git a/doc/files/jsonldContext/Consumption/052_01.json b/doc/files/jsonldContext/Consumption/052_01.json index 96b10fb0ce982f6176d55f2b7b8c22b31d52dd95..fea94a3610a79b4d68c87a4fb753e781245e10ed 100644 --- a/doc/files/jsonldContext/Consumption/052_01.json +++ b/doc/files/jsonldContext/Consumption/052_01.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_01", - "test_objective": "Check that you can list all the @context available in the broker with no previous add @context", + "test_objective": "Check that one can list all the @context available in the broker with no previous add @context", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", @@ -17,7 +17,7 @@ { "name": "052_01_01 List @contexts with neither details or kind and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_01", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -26,7 +26,7 @@ "setup": null, "teardown": null, "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: list_contexts set to 'empty_array'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to '${EMPTY}'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -34,7 +34,7 @@ { "name": "052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_02", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -43,7 +43,7 @@ "setup": null, "teardown": null, "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: list_contexts set to 'empty_array'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Hosted'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -51,7 +51,7 @@ { "name": "052_01_03 List @contexts with no details and kind equal to cached and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_03", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -60,7 +60,7 @@ "setup": null, "teardown": null, "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: list_contexts set to 'empty_array'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Cached'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -68,7 +68,7 @@ { "name": "052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_04", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -77,7 +77,7 @@ "setup": null, "teardown": null, "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: list_contexts set to 'empty_array'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -85,7 +85,7 @@ { "name": "052_01_05 List @contexts with details equal to false and no kind and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_05", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -94,7 +94,7 @@ "setup": null, "teardown": null, "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: list_contexts set to 'empty_array'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to '${EMPTY}'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -102,7 +102,7 @@ { "name": "052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_06", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -111,7 +111,7 @@ "setup": null, "teardown": null, "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: list_contexts set to 'empty_array'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Hosted'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -119,7 +119,7 @@ { "name": "052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_07", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -128,7 +128,7 @@ "setup": null, "teardown": null, "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: list_contexts set to 'empty_array'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Cached'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -136,7 +136,7 @@ { "name": "052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_01_08", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -145,14 +145,13 @@ "setup": null, "teardown": null, "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: list_contexts set to 'empty_array'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" } ], "permutations": [ - "then", "when" ], "robotpath": "jsonldContext/Consumption/ListContexts", diff --git a/doc/files/jsonldContext/Consumption/052_02.json b/doc/files/jsonldContext/Consumption/052_02.json index 988343776422e3de9dcdfd51b7a6861a794c1f64..22f15c3bb399c8b1babefc0660cf700dcb650653 100644 --- a/doc/files/jsonldContext/Consumption/052_02.json +++ b/doc/files/jsonldContext/Consumption/052_02.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_02", - "test_objective": "Check that you can list all the @context available in the broker with one add @context", + "test_objective": "Check that one can list all the @context available in the broker with one add @context", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", @@ -19,7 +19,7 @@ { "name": "052_02_01 List @contexts with neither details or kind and with previously one add @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_01", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -28,7 +28,7 @@ "setup": "Create Initial @context", "teardown": "Delete Initial @context", "template": "List @contexts with one previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '2' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to '${EMPTY}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to '${EMPTY}'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -36,7 +36,7 @@ { "name": "052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_02", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -45,15 +45,15 @@ "setup": "Create Initial @context", "teardown": "Delete Initial @context", "template": "List @contexts with one previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Hosted'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to 'Hosted'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Hosted'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context", + "name": "052_02_03 List @contexts with details equal to false and no kind and with previously one add @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_03", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -62,49 +62,15 @@ "setup": "Create Initial @context", "teardown": "Delete Initial @context", "template": "List @contexts with one previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Cached'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Cached'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_04", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial @context", - "teardown": "Delete Initial @context", - "template": "List @contexts with one previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_02_05 List @contexts with details equal to false and no kind and with previously one add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_05", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial @context", - "teardown": "Delete Initial @context", - "template": "List @contexts with one previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '2' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to '${EMPTY}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to '${EMPTY}'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_06", - "doc": "Check that you can list @contexts", + "name": "052_02_04 List @contexts with details equal to false and kind equal to hosted and with previously one add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_04", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -113,44 +79,10 @@ "setup": "Create Initial @context", "teardown": "Delete Initial @context", "template": "List @contexts with one previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Hosted'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to 'Hosted'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Hosted'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_07", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial @context", - "teardown": "Delete Initial @context", - "template": "List @contexts with one previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Cached'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Cached'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_02_08", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial @context", - "teardown": "Delete Initial @context", - "template": "List @contexts with one previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" } ], "permutations": [ diff --git a/doc/files/jsonldContext/Consumption/052_03.json b/doc/files/jsonldContext/Consumption/052_03.json index f0b728af766927385442bb40788c72010ab1ec20..13f8ba19b5a9caeef6a879384ffde60497f75c84 100644 --- a/doc/files/jsonldContext/Consumption/052_03.json +++ b/doc/files/jsonldContext/Consumption/052_03.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_03", - "test_objective": "Check that you can list all the @context available in the broker with several add @contexts", + "test_objective": "Check that one can list all the @context available in the broker with several add @contexts", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", @@ -19,7 +19,7 @@ { "name": "052_03_01 List @contexts with neither details or kind and with previously several add @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_01", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -28,7 +28,7 @@ "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '4' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to '${EMPTY}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to '${EMPTY}'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -36,7 +36,7 @@ { "name": "052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_02", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -45,15 +45,15 @@ "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '3' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Hosted'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to 'Hosted'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Hosted'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context", + "name": "052_03_03 List @contexts with details equal to false and no kind and with previously several add @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_03", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -62,49 +62,15 @@ "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Cached'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Cached'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_04", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial set of @contexts", - "teardown": "Delete Initial @contexts", - "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_03_05 List @contexts with details equal to false and no kind and with previously several add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_05", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial set of @contexts", - "teardown": "Delete Initial @contexts", - "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '4' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to '${EMPTY}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to '${EMPTY}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to '${EMPTY}'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" }, { - "name": "052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_06", - "doc": "Check that you can list @contexts", + "name": "052_03_04 List @contexts with details equal to false and kind equal to hosted and with previously several add @context", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_04", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -113,44 +79,10 @@ "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '3' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Hosted'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to 'Hosted'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Hosted'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_07", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial set of @contexts", - "teardown": "Delete Initial @contexts", - "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'Cached'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Cached'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_03_08", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial set of @contexts", - "teardown": "Delete Initial @contexts", - "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'uri_list' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" } ], "permutations": [ diff --git a/doc/files/jsonldContext/Consumption/052_04.json b/doc/files/jsonldContext/Consumption/052_04.json index 140080c3280ea55a5593e12301ec9149d892372c..be442e5274d0131408ba1c49c06993f8d74c0120 100644 --- a/doc/files/jsonldContext/Consumption/052_04.json +++ b/doc/files/jsonldContext/Consumption/052_04.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_04", - "test_objective": "Check that you get an error when try to list @context with wrong details or kind", + "test_objective": "Check that one gets an error when try to list @context with wrong details or kind", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", @@ -17,7 +17,7 @@ { "name": "052_04_01 List @contexts with no details and kind set to other and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_01", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -34,7 +34,7 @@ { "name": "052_04_02 List @contexts with details set to other and no kind and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_02", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -51,7 +51,7 @@ { "name": "052_04_03 List @contexts with details set to other and kind set to other and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_03", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -68,7 +68,7 @@ { "name": "052_04_04 List @contexts with details set to true and kind set to other and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_04", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -85,7 +85,7 @@ { "name": "052_04_05 List @contexts with details set to other and kind set to Hosted and not previously created @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_04_05", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", diff --git a/doc/files/jsonldContext/Consumption/052_05.json b/doc/files/jsonldContext/Consumption/052_05.json index e07d23dd1d986c00129e6cac066973f39a8c6ff1..452b448cd4f00f13a9ef7ce05532422fe3c70ff5 100644 --- a/doc/files/jsonldContext/Consumption/052_05.json +++ b/doc/files/jsonldContext/Consumption/052_05.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_05", - "test_objective": "Check that you can list all the @context available in the broker with several add @contexts with details equal to true", + "test_objective": "Check that one can list all the @context available in the broker with several add @contexts with details equal to true", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", @@ -19,7 +19,7 @@ { "name": "052_05_01 List @contexts with details set to true and no kind and with previously several add @contexts", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_01", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -28,7 +28,7 @@ "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Response Body containing a Context element containing JSONObject with details of the contexts:\n * the expected length of contexts set to '4'\n * the list of contexts URI set to 'list_contexts=${uris}'\n * response body to be checked set to 'response=${response.json()}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to '${EMPTY}'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to '${EMPTY}'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -36,7 +36,7 @@ { "name": "052_05_02 List @contexts with details set to true and kind set to hosted and with previously several add @contexts", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_02", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -45,44 +45,10 @@ "setup": "Create Initial set of @contexts", "teardown": "Delete Initial @contexts", "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Response Body containing a Context element containing JSONObject with details of the contexts:\n * the expected length of contexts set to '3'\n * the list of contexts URI set to 'list_contexts=${uris}'\n * response body to be checked set to 'response=${response.json()}'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to 'Hosted'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to 'Hosted'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_05_03 List @contexts with details set to true and kind set to cached abd with previously several add @contexts", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_03", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial set of @contexts", - "teardown": "Delete Initial @contexts", - "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Response Body containing a Context element containing JSONObject with details of the contexts:\n * the expected length of contexts set to '1'\n * the list of contexts URI set to 'list_contexts=${uris}'\n * response body to be checked set to 'response=${response.json()}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to 'Cached'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" - }, - { - "name": "052_05_04 List @contexts with details set to true and kind set to implicitlycreated and with previously several add @contexts", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_05_04", - "doc": "Check that you can list @contexts", - "tags": [ - "5_13_3", - "ctx-list", - "since_v1.5.1" - ], - "setup": "Create Initial set of @contexts", - "teardown": "Delete Initial @contexts", - "template": "List @contexts with several previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Response Body containing a Context element containing JSONObject with details of the contexts:\n * the expected length of contexts set to '0'\n * the list of contexts URI set to 'list_contexts=${uris}'\n * response body to be checked set to 'response=${response.json()}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts?${params_as_string}" } ], "permutations": [ diff --git a/doc/files/jsonldContext/Consumption/052_06.json b/doc/files/jsonldContext/Consumption/052_06.json index 504354d527e4783a71f1714fbfdc975134f11cff..c6f1321cfdd441c11638e358698241e42d541b6a 100644 --- a/doc/files/jsonldContext/Consumption/052_06.json +++ b/doc/files/jsonldContext/Consumption/052_06.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/052_06", - "test_objective": "Check that you can list all the @context available in the broker with no previous add @context", + "test_objective": "Check that one can list all the @context available in the broker with no previous add @context", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", "config_id": "", "parent_release": "v1.5.1", @@ -19,7 +19,7 @@ { "name": "052_06_01 List @contexts with neither details or kind and a created ImplicitlyCreated @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_01", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -28,7 +28,7 @@ "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '4' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n Notification with Check Context Response Body Containing a list of identifiers and\n Notification with Check Context Response Body Containing a list of identifiers\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to '${EMPTY}'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -36,7 +36,7 @@ { "name": "052_06_02 List @contexts with no details and kind set to hosted and a created ImplicitlyCreated @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_02", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -45,7 +45,7 @@ "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n Notification with Check Context Response Body Containing a list of identifiers and\n Notification with Check Context Response Body Containing a list of identifiers\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Hosted'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -53,7 +53,7 @@ { "name": "052_06_03 List @contexts with no details and kind set to cached and a created ImplicitlyCreated @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_03", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -62,7 +62,7 @@ "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '3' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n Notification with Check Context Response Body Containing a list of identifiers and\n Notification with Check Context Response Body Containing a list of identifiers\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'Cached'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -70,7 +70,7 @@ { "name": "052_06_04 List @contexts with no details and kind set to implicitlycreated and a created ImplicitlyCreated @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_04", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -79,7 +79,7 @@ "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n Notification with Check Context Response Body Containing a list of identifiers and\n Notification with Check Context Response Body Containing a list of identifiers\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to '${EMPTY}' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -87,7 +87,7 @@ { "name": "052_06_05 List @contexts with details set to false and no kind and a created ImplicitlyCreated @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_05", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -96,7 +96,7 @@ "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '4' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n Notification with Check Context Response Body Containing a list of identifiers and\n Notification with Check Context Response Body Containing a list of identifiers\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to '${EMPTY}'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -104,7 +104,7 @@ { "name": "052_06_06 List @contexts with details set to false and kind equal to hosted and a created ImplicitlyCreated @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_06", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -113,7 +113,7 @@ "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '0' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n Notification with Check Context Response Body Containing a list of identifiers and\n Notification with Check Context Response Body Containing a list of identifiers\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Hosted'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -121,7 +121,7 @@ { "name": "052_06_07 List @contexts with details set to false and kind equal to cached and a created ImplicitlyCreated @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_07", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -130,7 +130,7 @@ "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '3' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n Notification with Check Context Response Body Containing a list of identifiers and\n Notification with Check Context Response Body Containing a list of identifiers\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'Cached'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" @@ -138,7 +138,7 @@ { "name": "052_06_08 List @contexts with details set to false and kind equal to implicitlycreated and a created ImplicitlyCreated @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_06_08", - "doc": "Check that you can list @contexts", + "doc": "Check that one can list @contexts", "tags": [ "5_13_3", "ctx-list", @@ -147,14 +147,13 @@ "setup": "Create initial ImplicitlyCreated @context", "teardown": "Delete Initial @context Data", "template": "List @contexts with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: response_body set to 'response.json()' and\n Query Parameter: expected_length set to '1' and\n Query Parameter: list_contexts set to 'list_contexts'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n Notification with Check Context Response Body Containing a list of identifiers and\n Notification with Check Context Response Body Containing a list of identifiers\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'false' and\n Query Parameter: kind set to 'ImplicitlyCreated'\n}", "http_verb": "GET", "endpoint": "jsonldContexts?${params_as_string}" } ], "permutations": [ - "then", "when" ], "robotpath": "jsonldContext/Consumption/ListContexts", diff --git a/doc/files/jsonldContext/Consumption/052_07.json b/doc/files/jsonldContext/Consumption/052_07.json new file mode 100644 index 0000000000000000000000000000000000000000..ecb1aab6e95ae9e36074cf061ef901e5c889e44d --- /dev/null +++ b/doc/files/jsonldContext/Consumption/052_07.json @@ -0,0 +1,40 @@ +{ + "tp_id": "TP/NGSI-LD/CTX/Cons/052_07", + "test_objective": "Check that one can list all the cached @context entries", + "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.3", + "config_id": "", + "parent_release": "v1.5.1", + "clauses": [ + "5.13.3" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Cached @context from entity", + "List @contexts with several previous created @context", + "Delete Initial @context and entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT containing a cached context from creating an entity.\n }", + "test_cases": [ + { + "name": "052_07_01 List @contexts with details set to true and kind set to cached and with previously several add @contexts", + "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/052_07_01", + "doc": "Check that one can find a previously cached context", + "tags": [ + "5_13_3", + "ctx-list", + "since_v1.5.1" + ], + "setup": "Create Initial Cached @context from entity", + "teardown": "Delete Initial @context and entity", + "template": "List @contexts with several previous created @context", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Check Context Response Body Containing a list of identifiers and\n Query Parameter: kind set to 'Cached'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts?${params_as_string}'\n method set to 'GET'\n List @contexts: and\n Query Parameter: details set to 'true' and\n Query Parameter: kind set to 'Cached'\n}", + "http_verb": "GET", + "endpoint": "jsonldContexts?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "jsonldContext/Consumption/ListContexts", + "robotfile": "052_07" +} \ No newline at end of file diff --git a/doc/files/jsonldContext/Consumption/053_01.json b/doc/files/jsonldContext/Consumption/053_01.json index 570ce3e5043641638418910feff888ed8ef61e36..5e010641fca1d83426323d64218d333f287c057c 100644 --- a/doc/files/jsonldContext/Consumption/053_01.json +++ b/doc/files/jsonldContext/Consumption/053_01.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_01", - "test_objective": "Check that you can serve a previous created @context", + "test_objective": "Check that one can serve a previous created @context", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", @@ -19,7 +19,7 @@ { "name": "053_01_01 Serve a @context without details", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_01_01", - "doc": "Check that you can serve a @context with details equal to empty or false", + "doc": "Check that one can serve a @context with details equal to empty or false", "tags": [ "5_13_4", "ctx-serve", @@ -36,7 +36,7 @@ { "name": "053_01_02 Serve a @context with details equal to false", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_01_02", - "doc": "Check that you can serve a @context with details equal to empty or false", + "doc": "Check that one can serve a @context with details equal to empty or false", "tags": [ "5_13_4", "ctx-serve", diff --git a/doc/files/jsonldContext/Consumption/053_02.json b/doc/files/jsonldContext/Consumption/053_02.json index a26a7797937b41303131a0c6a9c29f82a2f8b9d0..bad48ee14a212d6db0323c610a3a7ba8331ae005 100644 --- a/doc/files/jsonldContext/Consumption/053_02.json +++ b/doc/files/jsonldContext/Consumption/053_02.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_02", - "test_objective": "Check that you can serve a previous created @context with details equal to True", + "test_objective": "Check that one can serve a previous created @context with details equal to True", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", @@ -19,7 +19,7 @@ { "name": "053_02_01 Serve a @context with details set to True", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_02_01", - "doc": "Check that you can serve a @context with details", + "doc": "Check that one can serve a @context with details", "tags": [ "5_13_4", "ctx-serve", diff --git a/doc/files/jsonldContext/Consumption/053_03.json b/doc/files/jsonldContext/Consumption/053_03.json index f5627e047be1726eb3b041a0bfd37326c39687ab..684782fef4d82670ac49e49a526f4b03b59560db 100644 --- a/doc/files/jsonldContext/Consumption/053_03.json +++ b/doc/files/jsonldContext/Consumption/053_03.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_03", - "test_objective": "Check that you get an error when try to serve a @context", + "test_objective": "Check that one gets an error when try to serve a @context", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", @@ -19,7 +19,7 @@ { "name": "053_03_01 Serve a @contexts with a wrong id and correct details", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_03_01", - "doc": "Check that an error is returned when we request for a @context that does not exist", + "doc": "Check that an error is returned when one requests for a @context that does not exist", "tags": [ "5_13_4", "ctx-serve", @@ -32,46 +32,9 @@ "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID 'wrong_id_context' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" - }, - { - "name": "053_03_02 Serve a @contexts with a valid id and incorrect details", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_03_02", - "doc": "Check that an error is returned when we request for a @context that does not exist", - "tags": [ - "5_13_4", - "ctx-serve", - "since_v1.5.1" - ], - "setup": "Create Initial @context", - "teardown": "Delete Initial @context", - "template": "Serve @context with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 400 and\n Serve a @context with Response reason set to 'Bad Request' and\n Serve a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'other'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts/{contextId}" - }, - { - "name": "053_03_03 Serve a Cached @contexts with details set to false", - "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_03_03", - "doc": "Check that an error is returned when we request for a @context that does not exist", - "tags": [ - "5_13_4", - "ctx-serve", - "since_v1.5.1" - ], - "setup": "Create Initial @context", - "teardown": "Delete Initial @context", - "template": "Serve @context with no previous created @context", - "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 422 and\n Serve a @context with Response reason set to 'Unprocessable Content' and\n Serve a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/OperationNotSupported' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld' and details 'false'\n}", - "http_verb": "GET", - "endpoint": "jsonldContexts/{contextId}" } ], - "permutations": [ - "then", - "when" - ], + "permutations": [], "robotpath": "jsonldContext/Consumption/ServeContext", "robotfile": "053_03" } \ No newline at end of file diff --git a/doc/files/jsonldContext/Consumption/053_04.json b/doc/files/jsonldContext/Consumption/053_04.json index 97da09b1bc81f0ccc8ea24e8748a98bff2454f6b..7b00cff1270d44af1693b30ecea32eb877ef3258 100644 --- a/doc/files/jsonldContext/Consumption/053_04.json +++ b/doc/files/jsonldContext/Consumption/053_04.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_04", - "test_objective": "Check that you can get an increase numberOfHits after creation of a Hosted @context and using it", + "test_objective": "Check that one can get an increase numberOfHits after creation of a Hosted @context and using it", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", @@ -27,7 +27,7 @@ "setup": "Create Initial @context condition from an external server", "teardown": "Delete Initial @context condition from an external server", "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Check that the numberOfHits in the response body is set to '2'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Check that the numberOfHits in the response body is set to '1'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" diff --git a/doc/files/jsonldContext/Consumption/053_05.json b/doc/files/jsonldContext/Consumption/053_05.json index dafa52eec5c47359a25185208581e16c327eb990..a90b3d2c166b10c36839abd1135a81363adb4ad0 100644 --- a/doc/files/jsonldContext/Consumption/053_05.json +++ b/doc/files/jsonldContext/Consumption/053_05.json @@ -27,7 +27,7 @@ "setup": "Create Initial @context condition from an external server", "teardown": "Delete Initial @context condition from an external server", "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Response reason set to 'OK' and\n Serve a @context with Response Header: Content-Type set to application/json and\n Serve a @context with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Cached', and 'timestamp and 'DateTime' format and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'lastUsage' and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'numberOfHits' and\n Serve a @context with The Response Body `${response.json()}' might contain the key 'extraInfo' and\n Serve a @context with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n List @contexts with Response Status Code set to 200 and\n List @contexts with Response reason set to 'OK' and\n List @contexts with Response Header: Content-Type set to application/json and\n List @contexts with Check the Body of the response should contain a @context with 'URL' key not Empty and 'string' type, with 'localId' key not Empty and 'string' type, with 'kind' key not Empty, 'string' type, and value set to 'Cached', and 'timestamp and 'DateTime' format and\n List @contexts with The Response Body `${response.json()}' might contain the key 'lastUsage' and\n List @contexts with The Response Body `${response.json()}' might contain the key 'numberOfHits' and\n List @contexts with The Response Body `${response.json()}' might contain the key 'extraInfo' and\n List @contexts with Check that the only allowed keys in the response body of a @context are 'URL', 'localId', 'kind', 'timestamp', 'lastUsage', 'numberOfHits', 'extraInfo'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" diff --git a/doc/files/jsonldContext/Consumption/053_06.json b/doc/files/jsonldContext/Consumption/053_06.json index 637c033ef5bb93075c8c6c3e4b9bdd40881e162b..76d2fe642e87e6881f2f726e460c1128318214c7 100644 --- a/doc/files/jsonldContext/Consumption/053_06.json +++ b/doc/files/jsonldContext/Consumption/053_06.json @@ -27,7 +27,7 @@ "setup": "Create Initial @context condition from an external server", "teardown": "Delete Initial @context condition from an external server", "template": null, - "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Check that the numberOfHits in the response body is set to '2'\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Serve a @context with Response Status Code set to 200 and\n Serve a @context with Check that the numberOfHits in the response body is set to '3'\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'GET'\n Serve a @context with contextID '${uri}' and details 'true'\n}", "http_verb": "GET", "endpoint": "jsonldContexts/{contextId}" diff --git a/doc/files/jsonldContext/Consumption/053_07.json b/doc/files/jsonldContext/Consumption/053_07.json index 5100058c8a69fc7469a8695b3a36d08d0dec93a4..69c63b2e80e9af0a2665313d952db2428dc3be21 100644 --- a/doc/files/jsonldContext/Consumption/053_07.json +++ b/doc/files/jsonldContext/Consumption/053_07.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Cons/053_07", - "test_objective": "Check that we can serve a ImplicitlyCreated @context with details set to true", + "test_objective": "Check that one can serve a ImplicitlyCreated @context with details set to true", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.4", "config_id": "", "parent_release": "v1.5.1", @@ -16,9 +16,9 @@ "initial_condition": "with {\n the SUT containing a ImplicitlyCreated @context created from a subscription query.\n }", "test_cases": [ { - "name": "053_07_01 Check that we can serve a ImplicitlyCreated @context with details set to true", + "name": "053_07_01 Check that one can serve a ImplicitlyCreated @context with details set to true", "permutation_tp_id": "TP/NGSI-LD/CTX/Cons/053_07_01", - "doc": "Check that we can serve a ImplicitlyCreated @context with details set to true", + "doc": "Check that one can serve a ImplicitlyCreated @context with details set to true", "tags": [ "5_13_4", "since_v1.5.1", diff --git a/doc/files/jsonldContext/Provision/050_01.json b/doc/files/jsonldContext/Provision/050_01.json index 81e85d1bd66816a71724ad82b77664d497fd4e33..c7d204382a324ca76713e9c84096afd114e01382 100644 --- a/doc/files/jsonldContext/Provision/050_01.json +++ b/doc/files/jsonldContext/Provision/050_01.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/050_01", - "test_objective": "Check that you can add a hosted @context", + "test_objective": "Check that one can add a hosted @context", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", "parent_release": "v1.5.1", @@ -18,7 +18,7 @@ { "name": "050_01_01 Add a valid hosted @context from key=value", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_01_01", - "doc": "Check that you can add a @context", + "doc": "Check that one can add a @context", "tags": [ "5_13_2", "ctx-add", @@ -35,7 +35,7 @@ { "name": "050_01_02 Add a valid cached @context from URI", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_01_02", - "doc": "Check that you can add a @context", + "doc": "Check that one can add a @context", "tags": [ "5_13_2", "ctx-add", diff --git a/doc/files/jsonldContext/Provision/050_02.json b/doc/files/jsonldContext/Provision/050_02.json index a71f1a4394400465578ab99291d954bfbc5291dd..e0d75533a03d2080e3a5439c43e3187fdc933763 100644 --- a/doc/files/jsonldContext/Provision/050_02.json +++ b/doc/files/jsonldContext/Provision/050_02.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/050_02", - "test_objective": "Check that you receive a 400 Bad Request creating a @context if the content is incorrect", + "test_objective": "Check that one receives a 400 Bad Request creating a @context if the content is incorrect", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", "parent_release": "v1.5.1", diff --git a/doc/files/jsonldContext/Provision/050_03.json b/doc/files/jsonldContext/Provision/050_03.json index 5697a34633efc02b73e74e615e26eb0b15f7f963..039f905c624b214fc52fe56ea69034d3c5c8b8dd 100644 --- a/doc/files/jsonldContext/Provision/050_03.json +++ b/doc/files/jsonldContext/Provision/050_03.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/050_03", - "test_objective": "Check that you can create a implicitlycreated @context through creating a subscription", + "test_objective": "Check that one can create a implicitlycreated @context through creating a subscription", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", "parent_release": "v1.5.1", @@ -17,7 +17,7 @@ { "name": "050_03_01 Check the creation of ImplicitelyCreted @context", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_03_01", - "doc": "Check that you can create a subscription", + "doc": "Check that one can create a subscription", "tags": [ "5_13_2", "since_v1.5.1", diff --git a/doc/files/jsonldContext/Provision/050_04.json b/doc/files/jsonldContext/Provision/050_04.json index 69c8db3a12e5ad30962519dee3bf81abe56ffce9..10203c9c4a64ef1215c47a32b34f4e4b9e5b00ad 100644 --- a/doc/files/jsonldContext/Provision/050_04.json +++ b/doc/files/jsonldContext/Provision/050_04.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/050_04", - "test_objective": "Check that you can add a hosted @context with list of URIs and each of them are cached @coxtexts", + "test_objective": "Check that one can add a hosted @context with list of URIs and each of them are cached @coxtexts", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.2", "config_id": "", "parent_release": "v1.5.1", @@ -17,7 +17,7 @@ { "name": "050_04_01 Add a valid hosted @context with URIs and check that the URIs are Cached @contexts", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/050_04_01", - "doc": "Check that you can add a @context", + "doc": "Check that one can add a @context", "tags": [ "5_13_2", "ctx-add", diff --git a/doc/files/jsonldContext/Provision/051_01.json b/doc/files/jsonldContext/Provision/051_01.json index 5ee474db807e3fecfef3b1042ff456772c53c35a..f3e32e9ceddd3fdf913f3f86627155646cbd3a4c 100644 --- a/doc/files/jsonldContext/Provision/051_01.json +++ b/doc/files/jsonldContext/Provision/051_01.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_01", - "test_objective": "Check that you can delete a previous created hosted @context without reload param", + "test_objective": "Check that one can delete a previous created hosted @context without reload param", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", @@ -17,7 +17,7 @@ { "name": "051_01_01 Delete a @context whose kind is hosted without reload param", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_01_01", - "doc": "Check that you can delete a hosted @context", + "doc": "Check that one can delete a hosted @context", "tags": [ "5_13_5", "ctx-serve", diff --git a/doc/files/jsonldContext/Provision/051_02.json b/doc/files/jsonldContext/Provision/051_02.json index 23e4e53f49f2bb7c0ae6bb2a94ebb01456270d6e..92563a31b6bd8fa7995de32b80a9f873eb3639eb 100644 --- a/doc/files/jsonldContext/Provision/051_02.json +++ b/doc/files/jsonldContext/Provision/051_02.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_02", - "test_objective": "Check that you get an error when trying to delete an unknown @context identifier", + "test_objective": "Check that one gets an error when trying to delete an unknown @context identifier", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", @@ -15,7 +15,7 @@ { "name": "051_02_01 Delete a @context with unknown @context identifier", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_02_01", - "doc": "Check that an error message is obtained in the response when we try to delete a @context with unknonwn id", + "doc": "Check that an error message is obtained in the response when one tries to delete a @context with unknonwn id", "tags": [ "5_13_5", "ctx-serve", diff --git a/doc/files/jsonldContext/Provision/051_04.json b/doc/files/jsonldContext/Provision/051_04.json index 2cbe982f92cbab01367a244fb19c6b36ce58be8f..0c1262d51aa729b12321c29c87a9060c14618e51 100644 --- a/doc/files/jsonldContext/Provision/051_04.json +++ b/doc/files/jsonldContext/Provision/051_04.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_04", - "test_objective": "Check that you get an error when try to delete a @context", + "test_objective": "Check that one gets an error when try to delete a @context", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", @@ -19,7 +19,7 @@ { "name": "051_04_01 Delete a @contexts with a wrong id and reload set to true", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_01", - "doc": "Check that you can delete a hosted @context", + "doc": "Check that one can delete a hosted @context", "tags": [ "5_13_5", "ctx-delete", @@ -28,7 +28,7 @@ "setup": "Create Initial @context", "teardown": "Delete Initial @context", "template": "Delete a @context with wrong data", - "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 404 and\n Delete a @context with Response reason set to 'Not Found' and\n Delete a @context with Response Body containing the type '${ERROR_TYPE_RESOURCE_NOT_FOUND}' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 400 and\n Delete a @context with Response reason set to 'Bad Request' and\n Delete a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to 'wrong_id_context'\n}", "http_verb": "DELETE", "endpoint": "jsonldContexts/{contextId}" @@ -36,7 +36,7 @@ { "name": "051_04_02 Delete a @contexts with a wrong id and reload set to false", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_02", - "doc": "Check that you can delete a hosted @context", + "doc": "Check that one can delete a hosted @context", "tags": [ "5_13_5", "ctx-delete", @@ -53,7 +53,7 @@ { "name": "051_04_03 Delete a @contexts with a wrong id and no reload value", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_03", - "doc": "Check that you can delete a hosted @context", + "doc": "Check that one can delete a hosted @context", "tags": [ "5_13_5", "ctx-delete", @@ -70,7 +70,7 @@ { "name": "051_04_04 Delete a @contexts with a wrong id and wrong reload value", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_04", - "doc": "Check that you can delete a hosted @context", + "doc": "Check that one can delete a hosted @context", "tags": [ "5_13_5", "ctx-delete", @@ -79,7 +79,7 @@ "setup": "Create Initial @context", "teardown": "Delete Initial @context", "template": "Delete a @context with wrong data", - "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 404 and\n Delete a @context with Response reason set to 'Not Found' and\n Delete a @context with Response Body containing the type '${ERROR_TYPE_RESOURCE_NOT_FOUND}' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete a @context with Response Status Code set to 400 and\n Delete a @context with Response reason set to 'Bad Request' and\n Delete a @context with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and Response Body Title is a string and is not ${EMPTY} and Response Body Detail is a string and is not ${EMPTY} and Response Boty Title is not equal to Response Body Detail\n}", "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/jsonldContexts/{contextId}'\n method set to 'DELETE'\n Delete a @context whose 'URI' set to 'wrong_id_context'\n}", "http_verb": "DELETE", "endpoint": "jsonldContexts/{contextId}" @@ -87,7 +87,7 @@ { "name": "051_04_05 Delete a Hosted @contexts with a valid id and reload set to true", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_04_05", - "doc": "Check that you can delete a hosted @context", + "doc": "Check that one can delete a hosted @context", "tags": [ "5_13_5", "ctx-delete", diff --git a/doc/files/jsonldContext/Provision/051_05.json b/doc/files/jsonldContext/Provision/051_05.json index 65b9618e2ded7642c6415db5e802e7973260eaf3..327797dc1fd8b4f74a3eee7b5ff01b7bc676b227 100644 --- a/doc/files/jsonldContext/Provision/051_05.json +++ b/doc/files/jsonldContext/Provision/051_05.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_05", - "test_objective": "Check that you get an error if we created an entity with a context (Cached context) and we try to delete it with reload=true", + "test_objective": "Check that one gets an error if one created an entity with a context (Cached context) and one tries to delete it with reload=true", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", @@ -18,7 +18,7 @@ { "name": "051_05_01 Delete and Reload a Cached @context with no communication with the Context Server", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_05_01", - "doc": "Check that you get an error if we try to reload a cached context with no communication with the context server", + "doc": "Check that one gets an error if one tries to reload a cached context with no communication with the context server", "tags": [ "5_13_5", "ctx-serve", diff --git a/doc/files/jsonldContext/Provision/051_06.json b/doc/files/jsonldContext/Provision/051_06.json index c9605a8401ecf56b1b228e7c231af3e8bb903734..1990f320d1c9db4e9366a8d7b68151867fdbd4eb 100644 --- a/doc/files/jsonldContext/Provision/051_06.json +++ b/doc/files/jsonldContext/Provision/051_06.json @@ -18,7 +18,7 @@ { "name": "051_06_01 Delete a @context whose kind is ImplicitlyCreated without reload param", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_06_01", - "doc": "Check that we can delete a ImplicitlyCreated @context", + "doc": "Check that one can delete a ImplicitlyCreated @context", "tags": [ "5_13_5", "ctx-serve", diff --git a/doc/files/jsonldContext/Provision/051_07.json b/doc/files/jsonldContext/Provision/051_07.json index 2eb8260153118ae87f5b9741f03ee7b3b64c816c..fa8ff70c9308f82420eb25270eb820c88f826276 100644 --- a/doc/files/jsonldContext/Provision/051_07.json +++ b/doc/files/jsonldContext/Provision/051_07.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_07", - "test_objective": "Check that you cannot delete a ImplicitlyCreated @context with reload set to true", + "test_objective": "Check that one cannot delete a ImplicitlyCreated @context with reload set to true", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", @@ -18,7 +18,7 @@ { "name": "051_07_01 Delete a ImplicitlyCreated @contexts with a valid id and reload set to true", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_07_01", - "doc": "Check that you cannot delete a ImplicitlyCreated @context with reload set to true", + "doc": "Check that one cannot delete a ImplicitlyCreated @context with reload set to true", "tags": [ "5_13_5", "ctx-delete", diff --git a/doc/files/jsonldContext/Provision/051_08.json b/doc/files/jsonldContext/Provision/051_08.json index 87b06de633348bd20fd9211953191d4b30b5953b..bbf16ad82385e8af98ac3bb4caddc5b3132c174b 100644 --- a/doc/files/jsonldContext/Provision/051_08.json +++ b/doc/files/jsonldContext/Provision/051_08.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_08", - "test_objective": "Check that you get an error when try to delete the core @context", + "test_objective": "Check that one gets an error when try to delete the core @context", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", @@ -17,7 +17,7 @@ { "name": "051_08_01 Delete a core @contexts and return an error with no reload", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_08_01", - "doc": "Check that you get an error when try to delete the core @context", + "doc": "Check that one gets an error when try to delete the core @context", "tags": [ "5_13_5", "ctx-delete", @@ -34,7 +34,7 @@ { "name": "051_08_02 Delete a core @contexts and return an error with reload set to false", "permutation_tp_id": "TP/NGSI-LD/CTX/Prov/051_08_02", - "doc": "Check that you get an error when try to delete the core @context", + "doc": "Check that one gets an error when try to delete the core @context", "tags": [ "5_13_5", "ctx-delete", diff --git a/doc/files/jsonldContext/Provision/051_09.json b/doc/files/jsonldContext/Provision/051_09.json index 74fc282a6fcd8c23959575c102be6a1448904e89..952ebf0ba9725542d92d378021466dbd31cc2bfc 100644 --- a/doc/files/jsonldContext/Provision/051_09.json +++ b/doc/files/jsonldContext/Provision/051_09.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CTX/Prov/051_09", - "test_objective": "Check that you get an error when try to delete the core @context", + "test_objective": "Check that one gets an error when try to delete the core @context", "reference": "ETSI GS CIM 009 V1.5.1 [], clause 5.13.5", "config_id": "", "parent_release": "v1.5.1", diff --git a/doc/tests/test_jsonldContext_Consumption.py b/doc/tests/test_jsonldContext_Consumption.py index e308f3c44d607512c1ed8c802c0f3196cae25f98..575504731330a36c061cc3b68cde4ba73b18deea 100644 --- a/doc/tests/test_jsonldContext_Consumption.py +++ b/doc/tests/test_jsonldContext_Consumption.py @@ -84,6 +84,13 @@ class TestContextServerConsumption(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_052_07(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ListContexts/052_07.robot' + expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/052_07.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_052_07.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_053_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/jsonldContext/Consumption/ServeContext/053_01.robot' expected_value = f'{self.folder_test_suites}/doc/files/jsonldContext/Consumption/053_01.json' diff --git a/resources/ApiUtils/jsonldContext.resource b/resources/ApiUtils/jsonldContext.resource index 1546e9d31b142335ff643e37123b10b7a28a6b43..4595c74dfcf4a93fdd048c540330cfa4b6ce3a50 100644 --- a/resources/ApiUtils/jsonldContext.resource +++ b/resources/ApiUtils/jsonldContext.resource @@ -37,7 +37,8 @@ Add a new @context Serve a @context [Arguments] ${contextId} ${details}=${EMPTY} - + ${contextId}= Replace String ${contextId} /ngsi-ld/v1/${JSONLDCONTEXTS_ENDPOINT_PATH}/ ${EMPTY} + ${contextId}= Evaluate urllib.parse.quote("${contextId}", safe='') modules=urllib IF '${details}'!='' &{params}= Create Dictionary Set To Dictionary ${params} details=${details} @@ -57,7 +58,8 @@ Serve a @context Delete a @context [Arguments] ${contextId} ${reload}=${EMPTY} - + ${contextId}= Replace String ${contextId} /ngsi-ld/v1/${JSONLDCONTEXTS_ENDPOINT_PATH}/ ${EMPTY} + ${contextId}= Evaluate urllib.parse.quote("${contextId}", safe='') modules=urllib IF '${reload}'!='' &{params}= Create Dictionary Set To Dictionary ${params} reload=${reload} diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index c55244496a25dc8884a5f7ebced0a22af77a30da..8181cd509f10d8ec8c6b959d427c6484b2817560 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -637,13 +637,12 @@ Check Context Response Body Containing Detailed Information Should Be Equal ${response_body['kind']} ${context_type} - # TODO: v1.8.1 change timestamp -> createdAt - Should Not Be Empty ${response_body['timestamp']} - ${date}= Parse Ngsild Date ${response_body['timestamp']} + Should Not Be Empty ${response_body['createdAt']} + ${date}= Parse Ngsild Date ${response_body['createdAt']} Should Not Be Equal ... ${date} ... ${None} - ... The createdAt key contains a value (${response_body['timestamp']}) that it is not in DateTime format + ... The createdAt key contains a value (${response_body['createdAt']}) that it is not in DateTime format Check Context Response Body Containing numberOfHits value [Arguments] ${response_body} ${expected_number_of_hists} @@ -663,39 +662,44 @@ Check Context Response Kind Should Be Equal ${response_body['kind']} ${context_type} Check Context Response Body Containing a list of identifiers - [Arguments] ${response_body} ${expected_length} ${list_contexts}=${EMPTY} ${kind}=${EMPTY} - - Length Should Be - ... ${response_body} - ... ${expected_length} - ... msg=The length of the strings array of @contexts is not ${expected_length} - - IF ${expected_length}==0 - Should Be Empty ${response_body} - ELSE - IF ${expected_length}==1 - ${length_list_contexts}= Get Length ${list_contexts} - IF '${kind}' == 'Cached' or ${length_list_contexts} == 0 - Should Be Equal ${response_body[0]} ${core_context} - ELSE - List Should Contain Value - ... ${list_contexts} - ... ${response_body[0]} - ... msg=The received @context ${response_body[0]} is not included in the list of expected @contexts: ${list_contexts} - END - ELSE - IF ${expected_length}>1 - IF '${kind}' == '' - Should Be Equal ${response_body[0]} ${core_context} - ELSE - FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} - Should Be Equal ${response_body[${index}]} ${uri_context} + [Arguments] ${response_body} ${list_contexts}=${EMPTY} ${kind}=${EMPTY} ${details}=${FALSE} + ${found}= Set Variable ${TRUE} + IF ${details} + FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} + ${found}= Set Variable ${FALSE} + FOR ${index2} ${respObj} IN ENUMERATE @{response_body} + ${uri}= Evaluate urllib.parse.unquote("${respObj['URL']}") modules=urllib + ${entryFound}= Run Keyword And Return Status Should End With ${uri} ${uri_context} + IF ${entryFound} + IF '${kind}' != '' + Check Context Response Body Containing Detailed Information ${respObj} ${kind} + Check Response Body Might Contain Optional Fields ${respObj} lastUsage + Check Response Body Might Contain Optional Fields ${respObj} numberOfHits + Check Response Body Might Contain Optional Fields ${respObj} extraInfo END + ${found}= Set Variable ${TRUE} + BREAK END END + Should Be True ${found} END + ELSE + FOR ${index} ${uri_context} IN ENUMERATE @{list_contexts} + ${found}= Set Variable ${FALSE} + FOR ${index2} ${respObj} IN ENUMERATE @{response_body} + ${uri}= Evaluate urllib.parse.unquote("${respObj}") modules=urllib + ${entryFound}= Run Keyword And Return Status Should End With ${uri} ${uri_context} + IF ${entryFound} + ${found}= Set Variable ${TRUE} + BREAK + END + END + Should Be True ${found} + END + Should Be True ${found} END + Check Context Response Body Containing a list with several URLs [Arguments] ${response_body} ${expected_length} ${list_contexts} @@ -730,8 +734,8 @@ Check Cached @Contexts Check Context Detailed Information Keys [Arguments] ${my_dict} - # TODO: spec v1.8.1 timestamp -> createdAt - ${expected_keys}= Create List URL localId kind createdAt lastUsage numberOfHits extraInfo + + ${expected_keys}= Create List URL localId kind createdAt lastUsage numberOfHits extraInfo body expiresAt ${actual_keys}= Get Dictionary Keys ${my_dict} FOR ${key} IN @{expected_keys}