From 2789ad97c857cd84fe11dcccf9288c1c42bf4c6f Mon Sep 17 00:00:00 2001 From: piscione Date: Mon, 3 Jun 2024 17:16:37 +0200 Subject: [PATCH] Refactoring of some MEC012 TCs --- MEC012/SRV/RNIS/RnisAllSubscriptions.robot | 3 +- MEC012/SRV/RNIS/RnisQuery.robot | 31 ++++++++++-- .../SRV/RNIS/RnisSpecificSubscription.robot | 3 +- MEC012/SRV/RNIS/environment/variables.txt | 2 +- MEC012/SRV/RNIS/resources/LocationAPI.robot | 12 ----- .../RadioNetworkInformationAPI.robot | 48 ------------------- 6 files changed, 31 insertions(+), 68 deletions(-) delete mode 100644 MEC012/SRV/RNIS/resources/LocationAPI.robot delete mode 100644 MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot diff --git a/MEC012/SRV/RNIS/RnisAllSubscriptions.robot b/MEC012/SRV/RNIS/RnisAllSubscriptions.robot index 465efd7..11d78f7 100644 --- a/MEC012/SRV/RNIS/RnisAllSubscriptions.robot +++ b/MEC012/SRV/RNIS/RnisAllSubscriptions.robot @@ -2,10 +2,9 @@ ... Test Suite to validate RNIS/Subscription (RNIS) operations. *** Settings *** -Resource environment/variables_sandbox.txt +Resource environment/variables.txt Resource ../../../pics.txt Resource ../../../GenericKeywords.robot -#Resource resources/RadioNetworkInformationAPI.robot Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false Library String diff --git a/MEC012/SRV/RNIS/RnisQuery.robot b/MEC012/SRV/RNIS/RnisQuery.robot index ea28910..4ebe27f 100644 --- a/MEC012/SRV/RNIS/RnisQuery.robot +++ b/MEC012/SRV/RNIS/RnisQuery.robot @@ -2,10 +2,9 @@ ... Test Suite to validate RNIS/Subscription (RNIS) operations. *** Settings *** -Resource environment/variables_sandbox.txt +Resource environment/variables.txt Resource ../../../pics.txt Resource ../../../GenericKeywords.robot -Resource resources/RadioNetworkInformationAPI.robot Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false @@ -261,4 +260,30 @@ Get Layer2Meas Info Set Headers {"Content-Length":"0"} Get ${apiRoot}/rni/${apiVersion}/queries/layer2_meas?cell_id=${CELL_ID} ${output}= Output response - Set Suite Variable ${response} ${output} \ No newline at end of file + Set Suite Variable ${response} ${output} + + +Check RabInfo + [Arguments] ${received_value} + log ${received_value} + Should Not Be Empty ${received_value['requestId']} + Run Keyword If 'cellUserInfo' in ${received_value} Should Be Equal As Strings ${received_value['cellUserInfo'][0]['ecgi']['cellId']} ${CELL_ID} + +Check PlmnInfo + [Arguments] ${received_value} + log ${received_value} + Should Be Equal As Strings ${received_value['appInstanceId']} ${APP_INS_ID} + Should Not Be Empty ${received_value['plmn'][0]['mcc']} + Should Not Be Empty ${received_value['plmn'][0]['mnc']} + + +Check S1BearerInfo + [Arguments] ${received_value} + log ${received_value} + Should Be Equal As Strings ${received_value['s1UeInfo'][0]['ecgi'][0]['cellId']} ${CELL_ID} + +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']['cellId']} ${CELL_ID} diff --git a/MEC012/SRV/RNIS/RnisSpecificSubscription.robot b/MEC012/SRV/RNIS/RnisSpecificSubscription.robot index 13a6dc9..3b6ba71 100644 --- a/MEC012/SRV/RNIS/RnisSpecificSubscription.robot +++ b/MEC012/SRV/RNIS/RnisSpecificSubscription.robot @@ -3,9 +3,8 @@ *** Settings *** Library OperatingSystem -Resource environment/variables_sandbox.txt +Resource environment/variables.txt Resource ../../../GenericKeywords.robot -Resource resources/RadioNetworkInformationAPI.robot Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false Library String diff --git a/MEC012/SRV/RNIS/environment/variables.txt b/MEC012/SRV/RNIS/environment/variables.txt index f655911..e494041 100644 --- a/MEC012/SRV/RNIS/environment/variables.txt +++ b/MEC012/SRV/RNIS/environment/variables.txt @@ -19,7 +19,7 @@ ${NOTIFICATION_SERVER_HTTP_METHOD} POST ${NOTIFICATION_SERVER_URI} /callback_url ${NOTIFICATION_SERVER_TIMEOUT} 5 - +${PIC_RNIS_SPECIFIC_SUBSCRIPTION} 1 ${NON_EXISTENT_SUBSCRIPTION_ID} 123456789 ${APP_INS_ID} appInsId ${NOT_EXISTENT_APP_INS_ID} NOT_EXISTENT_APP_INS_ID diff --git a/MEC012/SRV/RNIS/resources/LocationAPI.robot b/MEC012/SRV/RNIS/resources/LocationAPI.robot deleted file mode 100644 index 012566b..0000000 --- a/MEC012/SRV/RNIS/resources/LocationAPI.robot +++ /dev/null @@ -1,12 +0,0 @@ -*** Settings *** -Resource ../environment/variables.txt -Resource LocationAPI.robot -#Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false -Library JSONSchemaLibrary schemas/ - -*** Keywords *** -Check Location - [Arguments] ${value} - Log Check Location for userInfo element - Should be Equal ${response['body']['userInfo']['zoneId']} ${value} - Log Location OK diff --git a/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot b/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot deleted file mode 100644 index fe7edad..0000000 --- a/MEC012/SRV/RNIS/resources/RadioNetworkInformationAPI.robot +++ /dev/null @@ -1,48 +0,0 @@ -*** Settings *** -Resource ../environment/variables.txt -Resource ../../../../pics.txt -Resource ../../../../GenericKeywords.robot -Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false -Library JSONSchemaLibrary schemas/ - - -*** Keywords *** -Check Subscription - [Arguments] ${received_value} ${expected_value} - Should Be Equal ${received_value['_links']['self']} ${LINKS_SELF} - ${length} Get Length ${received_value['subscription']} - :FOR ${item} IN RANGE 0 ${length} - \ Exit For Loop If ${received_value['subscription'][${item}]} == ${expected_value} - Log Item found ${received_value['subscription'][${item}]} - [return] ${received_value['subscription'][${item}]} - - -Check CellChangeSubscription - [Arguments] ${received_value} - Should Be Equal ${received_value['_links']['self']['href']} ${LINKS_SELF} - - -Check RabInfo - [Arguments] ${received_value} - log ${received_value} - Should Not Be Empty ${received_value['requestId']} - Run Keyword If 'cellUserInfo' in ${received_value} Should Be Equal As Strings ${received_value['cellUserInfo'][0]['ecgi']['cellId']} ${CELL_ID} - -Check PlmnInfo - [Arguments] ${received_value} - log ${received_value} - Should Be Equal As Strings ${received_value['appInstanceId']} ${APP_INS_ID} - Should Not Be Empty ${received_value['plmn'][0]['mcc']} - Should Not Be Empty ${received_value['plmn'][0]['mnc']} - - -Check S1BearerInfo - [Arguments] ${received_value} - log ${received_value} - Should Be Equal As Strings ${received_value['s1UeInfo'][0]['ecgi'][0]['cellId']} ${CELL_ID} - -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']['cellId']} ${CELL_ID} -- GitLab