From 912f24a1c6da6caad6df493229ab54c88733f69e Mon Sep 17 00:00:00 2001 From: piscione Date: Wed, 13 Mar 2024 16:54:01 +0100 Subject: [PATCH] Review of MEC012v2.2.1 TCs --- MEC012/SRV/RNIS/RnisAllSubscriptions.robot | 7 ++-- MEC012/SRV/RNIS/RnisNotifications.robot | 1 - MEC012/SRV/RNIS/RnisQuery.robot | 7 ++-- .../SRV/RNIS/RnisSpecificSubscription.robot | 10 +++--- MEC012/SRV/RNIS/environment/variables.txt | 4 ++- .../RNIS/environment/variables_sandbox.txt | 33 +++++++++++++++++++ .../RNIS/jsons/CellChangeSubscription.json | 5 ++- .../RNIS/jsons/NrMeasRepUeSubscription.json | 3 +- ...UpdateCellChangeSubscriptionRequestNf.json | 10 ++++++ .../RadioNetworkInformationAPI.robot | 3 +- 10 files changed, 67 insertions(+), 16 deletions(-) create mode 100644 MEC012/SRV/RNIS/environment/variables_sandbox.txt create mode 100644 MEC012/SRV/RNIS/jsons/UpdateCellChangeSubscriptionRequestNf.json diff --git a/MEC012/SRV/RNIS/RnisAllSubscriptions.robot b/MEC012/SRV/RNIS/RnisAllSubscriptions.robot index 2bdc4f8..465efd7 100644 --- a/MEC012/SRV/RNIS/RnisAllSubscriptions.robot +++ b/MEC012/SRV/RNIS/RnisAllSubscriptions.robot @@ -2,7 +2,7 @@ ... Test Suite to validate RNIS/Subscription (RNIS) operations. *** Settings *** -Resource environment/variables.txt +Resource environment/variables_sandbox.txt Resource ../../../pics.txt Resource ../../../GenericKeywords.robot #Resource resources/RadioNetworkInformationAPI.robot @@ -54,7 +54,7 @@ TC_MEC_MEC012_SRV_RNIS_012_OK ... Check that the RNIS service creates a new RNIS subscription ... ETSI GS MEC 012 2.2.1, clause 7.6.3.4 ... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml - [Setup] Send a request for a subscription and get sub ID CellChangeSubscription + Send a request for a subscription and get sub ID CellChangeSubscription ${sub_type} Get value entry from JSON file CellChangeSubscription subscriptionType ${callback_ref} Get value entry from JSON file CellChangeSubscription callbackReference Check HTTP Response Status Code Is 201 @@ -89,7 +89,7 @@ Send a request for a subscription and get sub ID [Arguments] ${content} Send a request for a subscription ${content} ${elements} = Split String ${response['headers']['Location']} / - Set Suite Variable ${SUB_ID} ${elements[4]} + Set Suite Variable ${SUB_ID} ${elements[-1]} Send a request for a subscription @@ -99,6 +99,7 @@ Send a request for a subscription Set Headers {"Authorization":"${TOKEN}"} ${file}= Catenate SEPARATOR= jsons/ ${content} .json ${body}= Get File ${file} + Log ${apiRoot}/${apiName}/${apiVersion}/subscriptions Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/MEC012/SRV/RNIS/RnisNotifications.robot b/MEC012/SRV/RNIS/RnisNotifications.robot index 984ac76..d02296e 100644 --- a/MEC012/SRV/RNIS/RnisNotifications.robot +++ b/MEC012/SRV/RNIS/RnisNotifications.robot @@ -2,7 +2,6 @@ ... Test Suite to validate RNIS/Notification (RNIS) operations. *** Settings *** - Resource environment/variables.txt Resource ../../../pics.txt Resource ../../../GenericKeywords.robot diff --git a/MEC012/SRV/RNIS/RnisQuery.robot b/MEC012/SRV/RNIS/RnisQuery.robot index 4bddb1d..ea28910 100644 --- a/MEC012/SRV/RNIS/RnisQuery.robot +++ b/MEC012/SRV/RNIS/RnisQuery.robot @@ -2,7 +2,7 @@ ... Test Suite to validate RNIS/Subscription (RNIS) operations. *** Settings *** -Resource environment/variables.txt +Resource environment/variables_sandbox.txt Resource ../../../pics.txt Resource ../../../GenericKeywords.robot Resource resources/RadioNetworkInformationAPI.robot @@ -13,7 +13,8 @@ Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_v *** Test Cases *** TC_MEC_MEC012_SRV_RNIS_016_BR [Documentation] Request RabInfo info using wrong parameters - ... Check that the RNIS service returns an error when the RAB information is requested with a malformatted message + ... Check that the RNIS service returns an error when the RAB + ... information is requested with a malformatted message ... ETSI GS MEC 012 2.2.1, clause 7.3.3.1 ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo Get RabInfo info using wrong parameters @@ -83,7 +84,7 @@ TC_MEC_MEC012_SRV_RNIS_019_NF ... ETSI GS MEC 012 2.2.1, clause 7.5a.3.1 ... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/S1BearerInfo Get L2Meas info using non existing cell id - Check HTTP Response Status Code Is 200 + Check HTTP Response Status Code Is 404 TC_MEC_MEC012_SRV_RNIS_016_OK diff --git a/MEC012/SRV/RNIS/RnisSpecificSubscription.robot b/MEC012/SRV/RNIS/RnisSpecificSubscription.robot index 20617a7..13a6dc9 100644 --- a/MEC012/SRV/RNIS/RnisSpecificSubscription.robot +++ b/MEC012/SRV/RNIS/RnisSpecificSubscription.robot @@ -3,7 +3,7 @@ *** Settings *** Library OperatingSystem -Resource environment/variables.txt +Resource environment/variables_sandbox.txt Resource ../../../GenericKeywords.robot Resource resources/RadioNetworkInformationAPI.robot Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false @@ -31,7 +31,7 @@ TC_MEC_MEC012_SRV_RNIS_014_BR ... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml [Setup] Post RNIS subscription request CellChangeSubscription ${elements} = Split String ${response['headers']['Location']} / - Set Suite Variable ${SUB_ID} ${elements[4]} + Set Suite Variable ${SUB_ID} ${elements[-1]} Update Individual RNIS Subscription ${SUB_ID} UpdateCellChangeSubscriptionRequestBr Check HTTP Response Status Code Is 400 [TearDown] Delete Individual RNIS Subscription ${SUB_ID} @@ -43,7 +43,7 @@ TC_MEC_MEC012_SRV_RNIS_014_NF ... ETSI GS MEC 012 2.2.1, clause 7.8.3.2 ... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml [Setup] Delete Individual RNIS Subscription ${NON_EXISTENT_SUBSCRIPTION_ID} - Update Individual RNIS Subscription ${NON_EXISTENT_SUBSCRIPTION_ID} UpdateCellChangeSubscriptionRequest + Update Individual RNIS Subscription ${NON_EXISTENT_SUBSCRIPTION_ID} UpdateCellChangeSubscriptionRequestNf Check HTTP Response Status Code Is 404 TC_MEC_MEC012_SRV_RNIS_015_NF @@ -63,7 +63,7 @@ TC_MEC_MEC012_SRV_RNIS_013_OK ... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml [Setup] Post RNIS subscription request CellChangeSubscription ${elements} = Split String ${response['headers']['Location']} / - Set Suite Variable ${SUB_ID} ${elements[4]} + Set Suite Variable ${SUB_ID} ${elements[-1]} Get Individual RNIS Subscription ${SUB_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is CellChangeSubscription @@ -162,6 +162,6 @@ Delete Individual RNIS Subscription Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - Delete ${apiRoot}/rni/${apiVersion}/subscriptions/${SUBSCRIPTION_ID} + Delete ${apiRoot}/rni/${apiVersion}/subscriptions/${subscription_id} ${output}= Output response Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/MEC012/SRV/RNIS/environment/variables.txt b/MEC012/SRV/RNIS/environment/variables.txt index da47b01..f655911 100644 --- a/MEC012/SRV/RNIS/environment/variables.txt +++ b/MEC012/SRV/RNIS/environment/variables.txt @@ -20,9 +20,11 @@ ${NOTIFICATION_SERVER_URI} /callback_url ${NOTIFICATION_SERVER_TIMEOUT} 5 +${NON_EXISTENT_SUBSCRIPTION_ID} 123456789 ${APP_INS_ID} appInsId ${NOT_EXISTENT_APP_INS_ID} NOT_EXISTENT_APP_INS_ID ${NOT_EXISTENT_CELL_ID} 0x8000099 ${CELL_ID} 6060606 - +${HREF} +${LINKS_SELF} ${PIC_PROBLEM_DETAILS_ON_4xx} 0 \ No newline at end of file diff --git a/MEC012/SRV/RNIS/environment/variables_sandbox.txt b/MEC012/SRV/RNIS/environment/variables_sandbox.txt new file mode 100644 index 0000000..baa76a1 --- /dev/null +++ b/MEC012/SRV/RNIS/environment/variables_sandbox.txt @@ -0,0 +1,33 @@ +*** Variables *** +####Env variable for the ETSI MEC Sandbox +${MEC-APP_SCHEMA} https +${MEC-APP_HOST} try-mec.etsi.org +${MEC-APP_PORT} 443 +#${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} //mep1 +${apiName} rni +${apiVersion} v2 + + + +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${SUB_ID} 15 + + +##Notification Server variables +${NOTIFICATION_SERVER_IP} 127.0.0.1 +${NOTIFICATION_SERVER_PORT} 8888 +${NOTIFICATION_SERVER_HTTP_METHOD} POST +${NOTIFICATION_SERVER_URI} /callback_url +${NOTIFICATION_SERVER_TIMEOUT} 5 + + +${NON_EXISTENT_SUBSCRIPTION_ID} 123456789 +${APP_INS_ID} appInsId +${NOT_EXISTENT_APP_INS_ID} NOT_EXISTENT_APP_INS_ID +${NOT_EXISTENT_CELL_ID} 0xffff8000099 +${CELL_ID} 6060606 +${HREF} +${LINKS_SELF} +${PIC_PROBLEM_DETAILS_ON_4xx} 0 \ No newline at end of file diff --git a/MEC012/SRV/RNIS/jsons/CellChangeSubscription.json b/MEC012/SRV/RNIS/jsons/CellChangeSubscription.json index 2e8a4cf..8997a18 100644 --- a/MEC012/SRV/RNIS/jsons/CellChangeSubscription.json +++ b/MEC012/SRV/RNIS/jsons/CellChangeSubscription.json @@ -8,7 +8,10 @@ }, "filterCriteriaAssocHo": { "associateId": [ - "associatedId" + { + "type":0, + "value":"associatedId" + } ] } } \ No newline at end of file diff --git a/MEC012/SRV/RNIS/jsons/NrMeasRepUeSubscription.json b/MEC012/SRV/RNIS/jsons/NrMeasRepUeSubscription.json index 9680519..51bdb65 100644 --- a/MEC012/SRV/RNIS/jsons/NrMeasRepUeSubscription.json +++ b/MEC012/SRV/RNIS/jsons/NrMeasRepUeSubscription.json @@ -2,6 +2,7 @@ "subscriptionType": "NrMeasRepUeSubscription", "callbackReference": "http://10.30.8.189:8888/callback_url", "filterCriteriaNrMrs": { - "appInstanceId": "appInstanceId" + "appInstanceId": "appInstanceId", + "associateId":["assoicateId01"] } } \ No newline at end of file diff --git a/MEC012/SRV/RNIS/jsons/UpdateCellChangeSubscriptionRequestNf.json b/MEC012/SRV/RNIS/jsons/UpdateCellChangeSubscriptionRequestNf.json new file mode 100644 index 0000000..8910d5b --- /dev/null +++ b/MEC012/SRV/RNIS/jsons/UpdateCellChangeSubscriptionRequestNf.json @@ -0,0 +1,10 @@ +{ + "subscriptionType": "CellChangeSubscription", + "callbackReference": "http://10.30.8.189:8888/new_callback_url", + "_links": { + "self": { + "href": "${LINKS_SELF}" + } + }, + "filterCriteriaAssocHo": {} +} \ No newline at end of file diff --git a/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot b/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot index 0bf3639..47a3eb3 100644 --- a/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot +++ b/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot @@ -44,4 +44,5 @@ Check S1BearerInfo Check L2MeasInfo [Arguments] ${received_value} log ${received_value} - Should Be Equal As Strings ${received_value['cellInfo'][0]['ecgi'][0]['cellId']} ${CELL_ID} + #Should Be Equal As Strings ${received_value['cellInfo'][0]['ecgi'][0]['cellId']} ${CELL_ID} + Should Be Equal As Strings ${received_value['cellInfo'][0]['ecgi']['cellId']} ${CELL_ID} -- GitLab