From e681c0a72f91f71ad03b4620c4e60099c40083ca Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Tue, 5 Nov 2019 16:48:02 +0100 Subject: [PATCH] Minor fixies on variables --- GenericKeywords.robot | 110 ------ MEO/UEAPPCTX/SysUeAppsContext.robot | 9 +- MEO/UEAPPS/SysUeApplications.robot | 2 +- SRV/APPSAQ/PlatAppServices.robot | 127 +++++-- SRV/APPSAQ/environment/variables.txt | 34 ++ SRV/APPSAQ/jsons/ServiceInfo.json | 0 SRV/APPSAQ/jsons/ServiceInfoError.json | 0 SRV/APPSAQ/jsons/ServiceInfoUpdated.json | 0 SRV/APPSAQ/schemas/ServiceInfo.schema.json | 0 .../schemas/ServiceInfoList.schema.json | 49 +++ SRV/APPSUB/PlatAppSubscriptions.robot | 81 ++-- SRV/APPSUB/environment/variables.txt | 37 ++ ...ppTerminationNotificationSubscription.json | 0 .../schemas/SubscriptionsLinkList.schema.json | 0 SRV/BWA/PlatBandwidthManager.robot | 161 +++++--- SRV/BWA/environment/variables.txt | 37 +- SRV/BWA/jsons/BwInfo.json | 0 SRV/BWA/jsons/BwInfoError.json | 0 SRV/BWA/jsons/BwInfoUpdate.json | 0 SRV/BWA/jsons/BwInfoUpdateDelta.json | 0 SRV/BWA/jsons/BwInfoUpdateDeltaError.json | 0 SRV/BWA/resources/BandwidthManagerAPI.robot | 57 --- SRV/BWA/schemas/BwInfo.schema.json | 0 SRV/DNS/PlatDnsRules.robot | 78 ++-- SRV/DNS/environment/variables.txt | 31 ++ SRV/DNS/jsons/DnsRuleUpdate.json | 0 SRV/DNS/jsons/DnsRuleUpdateError.json | 0 SRV/DNS/schemas/DnsRule.schema.json | 0 SRV/DNS/schemas/DnsRuleList.schema.json | 0 SRV/FAIS/PlatFixedAcessInfo.robot | 349 ++++++++++-------- SRV/FAIS/environment/variables.txt | 34 ++ SRV/FAIS/jsons/DevInfoSubscription.json | 0 SRV/FAIS/jsons/OnuAlarmSubscription.json | 0 SRV/FAIS/jsons/OnuAlarmSubscriptionError.json | 0 .../jsons/OnuAlarmSubscriptionUpdate.json | 0 .../OnuAlarmSubscriptionUpdateError.json | 0 SRV/FAIS/schemas/CableLineInfo.schema.json | 0 .../schemas/DevInfoSubscription.schema.json | 0 SRV/FAIS/schemas/DeviceInfo.schema.json | 0 SRV/FAIS/schemas/FaInfo.schema.json | 0 .../schemas/OnuAlarmSubscription.schema.json | 0 SRV/FAIS/schemas/PonInfo.schema.json | 0 .../schemas/SubscriptionLinkList.schema.json | 0 SRV/RLOCLOOK/PlatRadioNodeLocation.robot | 30 +- SRV/RLOCLOOK/environment/variables.txt | 14 + .../schemas/AccessPointList.schema.json | 0 SRV/RNIS/RnisNotifications.robot | 4 +- SRV/SAQ/PlatServices.robot | 54 ++- SRV/SAQ/environment/variables.txt | 41 ++ SRV/SAQ/schemas/ServiceInfo.schema.json | 0 SRV/SAQ/schemas/ServiceInfoList.schema.json | 0 SRV/SRVSUB/PlatSrvSubscriptions.robot | 83 +++-- SRV/SRVSUB/environment/variables.txt | 17 + ...rAvailabilityNotificationSubscription.json | 0 ...labilityNotificationSubscriptionError.json | 0 ...rAvailabilityNotificationSubscription.json | 0 .../schemas/SubscriptionLinkList.schema.json | 0 SRV/TIME/PlatTiming.robot | 37 +- SRV/TIME/environment/variables.txt | 25 ++ SRV/TIME/schemas/CurrentTime.schema.json | 0 SRV/TIME/schemas/TimingCaps.schema.json | 0 SRV/TRAF/PlatTrafficRules.robot | 89 +++-- SRV/TRAF/environment/variables.txt | 17 + SRV/TRAF/jsons/TrafficRuleUpdate.json | 0 SRV/TRAF/jsons/TrafficRuleUpdateError.json | 0 SRV/TRAF/schemas/TrafficRule.schema.json | 0 SRV/TRAF/schemas/TrafficRuleList.schema.json | 0 SRV/TRANS/PlatTransport.robot | 23 +- SRV/TRANS/environment/variables.txt | 17 + .../schemas/TransportInfoList.schema.json | 0 SRV/UEAREASUB/PlatUeAreaSubscription.robot | 67 ++-- SRV/UEAREASUB/environment/variables.txt | 18 + .../jsons/CircleNotificationSubscription.json | 17 + .../CircleNotificationSubscriptionError.json | 17 + ...CircleNotificationSubscription.schema.json | 0 SRV/UEDISTLOOK/PlatUeDistanceLookup.robot | 23 +- SRV/UEDISTLOOK/environment/variables.txt | 15 + .../schemas/TerminalDistance.schema.json | 0 .../PlatUeDistanceSubscription.robot | 50 ++- SRV/UEDISTSUB/environment/variables.txt | 18 + .../DistanceNotificationSubscription.json | 16 + ...DistanceNotificationSubscriptionError.json | 16 + ...stanceNotificationSubscription.schema.json | 0 SRV/UEINFOLOOK/PlatUeInformationLookup.robot | 34 +- SRV/UEINFOLOOK/environment/variables.txt | 14 + .../PlatUeInformationSubscription.robot | 67 ++-- SRV/UEINFOSUB/environment/variables.txt | 18 + .../jsons/ZonalTrafficSubscription.json | 11 + .../jsons/ZonalTrafficSubscriptionError.json | 11 + .../ZonalTrafficSubscription.schema.json | 0 SRV/UELOCLOOK/PlatUeLocationLookup.robot | 34 +- SRV/UELOCLOOK/environment/variables.txt | 14 + SRV/UELOCSUB/PlatUeLocationSubscription.robot | 48 ++- SRV/UELOCSUB/environment/variables.txt | 18 + .../jsons/UserTrackingSubscription.json | 10 + .../jsons/UserTrackingSubscriptionError.json | 10 + .../UserTrackingSubscription.schema.json | 0 .../PlatUeTrackingSubscription.robot | 49 ++- SRV/UETRACKSUB/environment/variables.txt | 18 + .../PeriodicNotificationSubscription.json | 12 + ...PeriodicNotificationSubscriptionError.json | 12 + ...riodicNotificationSubscription.schema.json | 0 variables.py => variables.txt | 1 + 103 files changed, 1547 insertions(+), 738 deletions(-) create mode 100644 SRV/APPSAQ/environment/variables.txt create mode 100644 SRV/APPSAQ/jsons/ServiceInfo.json create mode 100644 SRV/APPSAQ/jsons/ServiceInfoError.json create mode 100644 SRV/APPSAQ/jsons/ServiceInfoUpdated.json create mode 100644 SRV/APPSAQ/schemas/ServiceInfo.schema.json create mode 100644 SRV/APPSAQ/schemas/ServiceInfoList.schema.json create mode 100644 SRV/APPSUB/environment/variables.txt create mode 100644 SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json create mode 100644 SRV/APPSUB/schemas/SubscriptionsLinkList.schema.json create mode 100644 SRV/BWA/jsons/BwInfo.json create mode 100644 SRV/BWA/jsons/BwInfoError.json create mode 100644 SRV/BWA/jsons/BwInfoUpdate.json create mode 100644 SRV/BWA/jsons/BwInfoUpdateDelta.json create mode 100644 SRV/BWA/jsons/BwInfoUpdateDeltaError.json delete mode 100644 SRV/BWA/resources/BandwidthManagerAPI.robot create mode 100644 SRV/BWA/schemas/BwInfo.schema.json create mode 100644 SRV/DNS/environment/variables.txt create mode 100644 SRV/DNS/jsons/DnsRuleUpdate.json create mode 100644 SRV/DNS/jsons/DnsRuleUpdateError.json create mode 100644 SRV/DNS/schemas/DnsRule.schema.json create mode 100644 SRV/DNS/schemas/DnsRuleList.schema.json create mode 100644 SRV/FAIS/environment/variables.txt create mode 100644 SRV/FAIS/jsons/DevInfoSubscription.json create mode 100644 SRV/FAIS/jsons/OnuAlarmSubscription.json create mode 100644 SRV/FAIS/jsons/OnuAlarmSubscriptionError.json create mode 100644 SRV/FAIS/jsons/OnuAlarmSubscriptionUpdate.json create mode 100644 SRV/FAIS/jsons/OnuAlarmSubscriptionUpdateError.json create mode 100644 SRV/FAIS/schemas/CableLineInfo.schema.json create mode 100644 SRV/FAIS/schemas/DevInfoSubscription.schema.json create mode 100644 SRV/FAIS/schemas/DeviceInfo.schema.json create mode 100644 SRV/FAIS/schemas/FaInfo.schema.json create mode 100644 SRV/FAIS/schemas/OnuAlarmSubscription.schema.json create mode 100644 SRV/FAIS/schemas/PonInfo.schema.json create mode 100644 SRV/FAIS/schemas/SubscriptionLinkList.schema.json create mode 100644 SRV/RLOCLOOK/environment/variables.txt create mode 100644 SRV/RLOCLOOK/schemas/AccessPointList.schema.json create mode 100644 SRV/SAQ/environment/variables.txt create mode 100644 SRV/SAQ/schemas/ServiceInfo.schema.json create mode 100644 SRV/SAQ/schemas/ServiceInfoList.schema.json create mode 100644 SRV/SRVSUB/environment/variables.txt create mode 100644 SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscription.json create mode 100644 SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscriptionError.json create mode 100644 SRV/SRVSUB/schemas/SerAvailabilityNotificationSubscription.json create mode 100644 SRV/SRVSUB/schemas/SubscriptionLinkList.schema.json create mode 100644 SRV/TIME/environment/variables.txt create mode 100644 SRV/TIME/schemas/CurrentTime.schema.json create mode 100644 SRV/TIME/schemas/TimingCaps.schema.json create mode 100644 SRV/TRAF/environment/variables.txt create mode 100644 SRV/TRAF/jsons/TrafficRuleUpdate.json create mode 100644 SRV/TRAF/jsons/TrafficRuleUpdateError.json create mode 100644 SRV/TRAF/schemas/TrafficRule.schema.json create mode 100644 SRV/TRAF/schemas/TrafficRuleList.schema.json create mode 100644 SRV/TRANS/environment/variables.txt create mode 100644 SRV/TRANS/schemas/TransportInfoList.schema.json create mode 100644 SRV/UEAREASUB/environment/variables.txt create mode 100644 SRV/UEAREASUB/jsons/CircleNotificationSubscription.json create mode 100644 SRV/UEAREASUB/jsons/CircleNotificationSubscriptionError.json create mode 100644 SRV/UEAREASUB/schemas/CircleNotificationSubscription.schema.json create mode 100644 SRV/UEDISTLOOK/environment/variables.txt create mode 100644 SRV/UEDISTLOOK/schemas/TerminalDistance.schema.json create mode 100644 SRV/UEDISTSUB/environment/variables.txt create mode 100644 SRV/UEDISTSUB/jsons/DistanceNotificationSubscription.json create mode 100644 SRV/UEDISTSUB/jsons/DistanceNotificationSubscriptionError.json create mode 100644 SRV/UEDISTSUB/schemas/DistanceNotificationSubscription.schema.json create mode 100644 SRV/UEINFOLOOK/environment/variables.txt create mode 100644 SRV/UEINFOSUB/environment/variables.txt create mode 100644 SRV/UEINFOSUB/jsons/ZonalTrafficSubscription.json create mode 100644 SRV/UEINFOSUB/jsons/ZonalTrafficSubscriptionError.json create mode 100644 SRV/UEINFOSUB/schemas/ZonalTrafficSubscription.schema.json create mode 100644 SRV/UELOCLOOK/environment/variables.txt create mode 100644 SRV/UELOCSUB/environment/variables.txt create mode 100644 SRV/UELOCSUB/jsons/UserTrackingSubscription.json create mode 100644 SRV/UELOCSUB/jsons/UserTrackingSubscriptionError.json create mode 100644 SRV/UELOCSUB/schemas/UserTrackingSubscription.schema.json create mode 100644 SRV/UETRACKSUB/environment/variables.txt create mode 100644 SRV/UETRACKSUB/jsons/PeriodicNotificationSubscription.json create mode 100644 SRV/UETRACKSUB/jsons/PeriodicNotificationSubscriptionError.json create mode 100644 SRV/UETRACKSUB/schemas/PeriodicNotificationSubscription.schema.json rename variables.py => variables.txt (90%) diff --git a/GenericKeywords.robot b/GenericKeywords.robot index 59f7eb7..90d51c5 100644 --- a/GenericKeywords.robot +++ b/GenericKeywords.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Library BuiltIn -Library REST ${AMS_SCHEMA}://${AMS_HOST}:${AMS_PORT} ssl_verify=false Library OperatingSystem *** Variables *** @@ -54,113 +53,4 @@ Check HTTP Response Contain Header with value Check HTTP Response Header Contains ${HEADER_TOCHECK} Should Be Equal As Strings ${value} ${response['headers']['Content-Type']} -vGET - [Arguments] ${uri} - - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - - GET ${uri} - ${output}= Output response - Set Suite Variable ${response} ${output} - -vPOST - [Arguments] ${uri} ${content} - - ${file}= Catenate SEPARATOR= json/ ${content} .json - ${body}= Get File ${file} - - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - - POST ${uri} ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - -vPUT - [Arguments] ${uri} ${content} - - ${file}= Catenate SEPARATOR= json/ ${content} .json - ${body}= Get File ${file} - - # Retrieve the e-tag value to ensure a proper update. - vGET ${uri} - Set Headers {"If-Match":"${response['headers']['If-Match']}"} - - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - - PUT ${uri} ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - -vPUT without e-tag - [Arguments] ${uri} ${content} - - ${file}= Catenate SEPARATOR= json/ ${content} .json - ${body}= Get File ${file} - - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - - PUT ${uri} ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - -vPUT invalid e-tag - [Arguments] ${uri} ${content} - - ${file}= Catenate SEPARATOR= json/ ${content} .json - ${body}= Get File ${file} - - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - Set Headers {"If-Match":"__some_invalid_value__"} - - PUT ${uri} ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - -vDELETE - [Arguments] ${uri} - - # Retrieve the e-tag value to ensure a proper delete. - vGET ${uri} - Set Headers {"If-Match":"${response['headers']['If-Match']}"} - - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - - DELETE ${uri} - ${output}= Output response - Set Suite Variable ${response} ${output} - -vDELETE without e-tag - [Arguments] ${uri} - - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - - DELETE ${uri} - ${output}= Output response - Set Suite Variable ${response} ${output} - -vDELETE invalid e-tag - [Arguments] ${uri} - - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - Set Headers {"If-Match":"__some_invalid_value__"} - - DELETE ${uri} - ${output}= Output response - Set Suite Variable ${response} ${output} diff --git a/MEO/UEAPPCTX/SysUeAppsContext.robot b/MEO/UEAPPCTX/SysUeAppsContext.robot index 3456976..f0ce384 100644 --- a/MEO/UEAPPCTX/SysUeAppsContext.robot +++ b/MEO/UEAPPCTX/SysUeAppsContext.robot @@ -6,6 +6,7 @@ Resource environment/variables.txt Resource ../../pics.txt Resource ../../GenericKeywords.robot Resource resources/UeAppsContextAPI.robot +Library String Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false @@ -43,7 +44,7 @@ Update of the application context Should Be True ${PIC_SERVICES} == 1 Create an application context # Test Body - ${CREATE_APP_CTX['callbackReference']}= ${CALLBACK_REFERENCE_1} + ${CREATE_APP_CTX}= Set Variable ${CALLBACK_REFERENCE_1} Update application context ${APP_CTX_ID} ${CREATE_APP_CTX} Check HTTP Response Status Code Is 204 Check HTTP Response Body Json Schema Is AppContext @@ -62,7 +63,7 @@ Update of the application context with wrong parameters Should Be True ${PIC_SERVICES} == 1 Create an application context # Test Body - ${CREATE_APP_CTX['callbackReference']}= '' # Empty string + ${CREATE_APP_CTX}= Set Variable '' # Empty string Update application context ${APP_CTX_ID} ${CREATE_APP_CTX} Check HTTP Response Status Code Is 400 Check ProblemDetails 400 @@ -80,7 +81,7 @@ Update of the application context with unknown URI Should Be True ${PIC_SERVICES} == 1 Create an application context # Test Body - ${CREATE_APP_CTX['callbackReference']}= ${CALLBACK_REFERENCE_1} + ${CREATE_APP_CTX}= Set Variable ${CALLBACK_REFERENCE_1} Update application context ${NON_EXISTENT_APP_CTX_ID} ${CREATE_APP_CTX} Check HTTP Response Status Code Is 404 Check ProblemDetails 404 @@ -102,7 +103,7 @@ Delete of the application context Check HTTP Response Status Code Is 204 -Delete of the application context +Delete of the application context with non esistent APP CTX ID [Documentation] TC_MEC_MEO_UEAPPCTX_003_NF ... Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application ... Reference ETSI GS MEC 016 V1.1.1, clause 7.5.3.5 diff --git a/MEO/UEAPPS/SysUeApplications.robot b/MEO/UEAPPS/SysUeApplications.robot index 13ec79f..f8d589f 100644 --- a/MEO/UEAPPS/SysUeApplications.robot +++ b/MEO/UEAPPS/SysUeApplications.robot @@ -46,7 +46,7 @@ Get the list of the application contexts with wrong parameter Delete an application context ${APP_CTX_ID} -Get the list of the application contexts with wrong parameter +Get the list of the application contexts with non esistent parameter [Documentation] TC_MEC_MEO_UEAPPS_001_NF ... Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application ... Reference ETSI GS MEC 016 V1.1.1, clause 7.3.3.1 diff --git a/SRV/APPSAQ/PlatAppServices.robot b/SRV/APPSAQ/PlatAppServices.robot index e54b60a..ed80ff1 100644 --- a/SRV/APPSAQ/PlatAppServices.robot +++ b/SRV/APPSAQ/PlatAppServices.robot @@ -4,16 +4,16 @@ Documentation ... A test suite for validating Application Service Availability Query (APPSAQ) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false -Default Tags TP_MEC_SRV_APPSAQ +Default Tags TC_MEC_SRV_APPSAQ -*** Variables *** - *** Test Cases *** -TP_MEC_SRV_APPSAQ_001_OK +TC_MEC_SRV_APPSAQ_001_OK [Documentation] ... Check that the IUT responds with a list of available MEC services ... for a given application instance when queried by a MEC Application @@ -23,12 +23,12 @@ TP_MEC_SRV_APPSAQ_001_OK [Tags] PIC_MEC_PLAT PIC_SERVICES - vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services + Get a list of mecService of an application instance ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfoList -TP_MEC_SRV_APPSAQ_001_BR +TC_MEC_SRV_APPSAQ_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -38,11 +38,11 @@ TP_MEC_SRV_APPSAQ_001_BR [Tags] PIC_MEC_PLAT PIC_SERVICES # Wrong query parameter name should trigger an error response. - vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services?id=some_instance_id + Get a list of mecService of an application instance with parameters ${APP_INSTANCE_ID} ${INSTANCE_ID} ${FAKE_INSTANCE_ID_VALUE} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_APPSAQ_002_OK +TC_MEC_SRV_APPSAQ_002_OK [Documentation] ... Check that the IUT notifies the authorised relevant (subscribed) application ... instances when a new service for a given application instance is registered @@ -51,16 +51,14 @@ TP_MEC_SRV_APPSAQ_002_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services ${MEC_APP_NEW_SVC_DATA} + Create new service ServiceInfo ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is ServiceInfo Check HTTP Response Header Contains Location - Check Result Contains ${response['body']['ServiceInfo']} serName ${SERVICE_NAME} - Check Plaform IUT notifies the MEC Application instances ServiceAvailabilityNotification +# Check Result Contains ${response['body']['ServiceInfo']} serName ${SERVICE_NAME} -TP_MEC_SRV_APPSAQ_002_BR +TC_MEC_SRV_APPSAQ_002_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -69,12 +67,11 @@ TP_MEC_SRV_APPSAQ_002_BR ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services ${MEC_APP_NEW_SVC_DATA_BR} + Create new service ServiceInfoError ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_APPSAQ_002_NF +TC_MEC_SRV_APPSAQ_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -83,12 +80,11 @@ TP_MEC_SRV_APPSAQ_002_NF ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_MEC_SVC_MGMT_APPS_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/services ${MEC_APP_NEW_SVC_DATA} + Create new service ServiceInfo ${NON_EXISTENT_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_APPSAQ_003_OK +TC_MEC_SRV_APPSAQ_003_OK [Documentation] ... Check that the IUT responds with the information on a specific service ... for a given application instance when queried by a MEC Application @@ -97,14 +93,13 @@ TP_MEC_SRV_APPSAQ_003_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services/${SERVICE_ID} + Get individual service ${APP_INSTANCE_ID} ${SERVICE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfo Check Result Contains ${response['body']['ServiceInfo']} serInstanceId ${SERVICE_ID} -TP_MEC_SRV_APPSAQ_003_NF +TC_MEC_SRV_APPSAQ_003_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -112,12 +107,11 @@ TP_MEC_SRV_APPSAQ_003_NF ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.7.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services/${NON_EXISTENT_SERVICE_ID} + Get individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_APPSAQ_004_OK +TC_MEC_SRV_APPSAQ_004_OK [Documentation] ... Check that the IUT updates a service information for a given ... application instance when commanded by a MEC Application @@ -126,14 +120,13 @@ TP_MEC_SRV_APPSAQ_004_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services/${SERVICE_ID} ${MEC_APP_SVC_UPDT_DATA} + Update service ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdated Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfo - Check Result Contains ${response['body']['ServiceInfo']} version ${SVC_NEW_VERSION} + #Check Result Contains ${response['body']['ServiceInfo']} version ${SVC_NEW_VERSION} -TP_MEC_SRV_APPSAQ_004_BR +TC_MEC_SRV_APPSAQ_004_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -142,12 +135,11 @@ TP_MEC_SRV_APPSAQ_004_BR ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services/${SERVICE_ID} ${MEC_APP_SVC_UPDT_DATA_BR} + Update service ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdatedError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_APPSAQ_004_NF +TC_MEC_SRV_APPSAQ_004_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -156,12 +148,11 @@ TP_MEC_SRV_APPSAQ_004_NF ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services/${NON_EXISTENT_SERVICE_ID} ${MEC_APP_SVC_UPDT_DATA} + Update service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID} ServiceInfoUpdated Check HTTP Response Status Code Is 404 -TP_MEC_SRV_APPSAQ_004_PF +TC_MEC_SRV_APPSAQ_004_PF [Documentation] ... Check that the IUT responds with an error when ... a request sent by a MEC Application doesn't comply with a required condition @@ -170,19 +161,73 @@ TP_MEC_SRV_APPSAQ_004_PF ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT invalid e-tag /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services/${SERVICE_ID} ${MEC_APP_SVC_UPDT_DATA} + Update service with invalid etag ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdated Check HTTP Response Status Code Is 412 *** Keywords *** +Get a list of mecService of an application instance with parameters + [Arguments] ${appInstanceId} ${key}=None ${value}=None + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get a list of mecService of an application instance + [Arguments] ${appInstanceId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services + ${output}= Output response + Set Suite Variable ${response} ${output} + -Check Plaform IUT notifies the MEC Application instances - [Documentation] - ... +Create new service + [Arguments] ${content} ${appInstanceId} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Get individual service + [Arguments] ${appInstanceId} ${serviceName} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceName} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Update service + [Arguments] ${appInstanceId} ${serviceId} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceId} ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + + + +Update service with invalid etag + [Arguments] ${appInstanceId} ${serviceId} ${content} + Set Headers {"If-Match": ${INVALID_ETAG}} + Update service ${appInstanceId} ${serviceId} ${content} + + +# Check Plaform IUT notifies the MEC Application instances + # [Documentation] + # ... - [Arguments] ${instance_id} ${content} + # [Arguments] ${instance_id} ${content} # TODO check how to send the message (isn't defined). Does it need to be tested as it's not defined? diff --git a/SRV/APPSAQ/environment/variables.txt b/SRV/APPSAQ/environment/variables.txt new file mode 100644 index 0000000..fae67a3 --- /dev/null +++ b/SRV/APPSAQ/environment/variables.txt @@ -0,0 +1,34 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} mec_service_mgmt +${apiVersion} v1 + +# Specific variables +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${INSTANCE_ID} instance_id +${FAKE_INSTANCE_ID_VALUE} 5 +${NON_EXISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID +${SERVICE_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SERVICE_ID} NON_EXISTENT_SERVICE_ID +${INVALID_ETAG} INVALID_ETAG + +# ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription +# ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +# ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID +# ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} NON_EXISTENT_APP_MOBILITY_SERVICE_ID + +# # Notifications variables +# ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +# ${callback_port} 9091 +# ${callback_uri} http://172.22.1.7:${callback_port} +# ${callback_endpoint} /amsi/subscriptions +# ${callback_endpoint_error} /subs_404 +# ${total_polling_time} 2 min +# ${polling_interval} 10 sec \ No newline at end of file diff --git a/SRV/APPSAQ/jsons/ServiceInfo.json b/SRV/APPSAQ/jsons/ServiceInfo.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/APPSAQ/jsons/ServiceInfoError.json b/SRV/APPSAQ/jsons/ServiceInfoError.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/APPSAQ/jsons/ServiceInfoUpdated.json b/SRV/APPSAQ/jsons/ServiceInfoUpdated.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/APPSAQ/schemas/ServiceInfo.schema.json b/SRV/APPSAQ/schemas/ServiceInfo.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/APPSAQ/schemas/ServiceInfoList.schema.json b/SRV/APPSAQ/schemas/ServiceInfoList.schema.json new file mode 100644 index 0000000..f8bd4fc --- /dev/null +++ b/SRV/APPSAQ/schemas/ServiceInfoList.schema.json @@ -0,0 +1,49 @@ +{ + "type": "array", + "items": { + "type": "object", + "required": [ + "serInstanceId", + "version", + "state", + "transportInfo", + "serializer" + ], + "properties": { + "serInstanceId": { + "type": "string" + }, + "serName": { + "type": "string" + }, + "serCategory": { + "type": "string" + }, + "version": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE" + ] + }, + "transportInfo": { + "type": "string" + }, + "serializer": { + "type": "string" + }, + "scopeOfLocality": { + "type": "string" + }, + "consumedLocalOnly": { + "type": "string" + }, + "isLocal": { + "type": "string" + } + } + } +} diff --git a/SRV/APPSUB/PlatAppSubscriptions.robot b/SRV/APPSUB/PlatAppSubscriptions.robot index bc09cea..0909017 100644 --- a/SRV/APPSUB/PlatAppSubscriptions.robot +++ b/SRV/APPSUB/PlatAppSubscriptions.robot @@ -4,16 +4,16 @@ Documentation ... A test suite for validating Application Subscriptions (APPSUB) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_APPSUB - - -*** Variables *** +Default Tags TC_MEC_SRV_APPSUB *** Test Cases *** -TP_MEC_SRV_APPSUB_001_OK +TC_MEC_SRV_APPSUB_001_OK [Documentation] ... Check that the IUT responds with a list of subscriptions for notifications ... on services availability when queried by a MEC Application @@ -22,13 +22,12 @@ TP_MEC_SRV_APPSUB_001_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/MecAppSuptApiSubscriptionLinkList [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions + Get Subscriptions list ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SubscriptionLinkList -TP_MEC_SRV_APPSUB_001_NF +TC_MEC_SRV_APPSUB_001_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -36,12 +35,11 @@ TP_MEC_SRV_APPSUB_001_NF ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.3.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/subscriptions + Get Subscriptions list ${NON_EXISTENT_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_APPSUB_002_OK +TC_MEC_SRV_APPSUB_002_OK [Documentation] ... Check that the IUT acknowledges the subscription by a MEC Application ... to notifications on service availability events @@ -50,8 +48,7 @@ TP_MEC_SRV_APPSUB_002_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/AppTerminationNotificationSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions ${APP_TERM_NOTIF_SUB} + Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription Check HTTP Response Header Contains Location @@ -59,7 +56,7 @@ TP_MEC_SRV_APPSUB_002_OK Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI} -TP_MEC_SRV_APPSUB_003_OK +TC_MEC_SRV_APPSUB_003_OK [Documentation] ... Check that the IUT responds with the information on a specific subscription ... when queried by a MEC Application @@ -68,14 +65,13 @@ TP_MEC_SRV_APPSUB_003_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/AppTerminationNotificationSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID} + Get individual subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} subscriptionType "AppTerminationNotificationSubscription" -TP_MEC_SRV_APPSUB_003_NF +TC_MEC_SRV_APPSUB_003_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -83,12 +79,11 @@ TP_MEC_SRV_APPSUB_003_NF ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions/${NON_EXISTENT_SUBSCRIPTION_ID} + Get individual subscription ${APP_INSTANCE_ID} ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_APPSUB_004_OK +TC_MEC_SRV_APPSUB_004_OK [Documentation] ... Check that the IUT acknowledges the unsubscribe from service availability event notifications ... when commanded by a MEC Application @@ -96,12 +91,11 @@ TP_MEC_SRV_APPSUB_004_OK ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID} + Remove subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_SRV_APPSUB_004_NF +TC_MEC_SRV_APPSUB_004_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -109,6 +103,43 @@ TP_MEC_SRV_APPSUB_004_NF ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_ME_APP_SUPPORT_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID} + Remove subscription ${NON_EXISTENT_APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 + + +*** Keywords *** +Get Subscriptions List + [Arguments] ${appInstanceId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + +Create new subscription + [Arguments] ${appInstanceId} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Get individual subscription + [Arguments] ${appInstanceId} ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Remove subscription + [Arguments] ${appInstanceId} ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/APPSUB/environment/variables.txt b/SRV/APPSUB/environment/variables.txt new file mode 100644 index 0000000..c28506f --- /dev/null +++ b/SRV/APPSUB/environment/variables.txt @@ -0,0 +1,37 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} mec_app_support +${apiVersion} v1 + +# Specific variables +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${NON_EXISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID + + +${APP_TERM_NOTIF_CALLBACK_URI} http://127.0.0.1/subscribe + +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID + + + +# ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription +# ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +# +# ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} NON_EXISTENT_APP_MOBILITY_SERVICE_ID + +# # Notifications variables +# ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +# ${callback_port} 9091 +# ${callback_uri} http://172.22.1.7:${callback_port} +# ${callback_endpoint} /amsi/subscriptions +# ${callback_endpoint_error} /subs_404 +# ${total_polling_time} 2 min +# ${polling_interval} 10 sec \ No newline at end of file diff --git a/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json b/SRV/APPSUB/jsons/AppTerminationNotificationSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/APPSUB/schemas/SubscriptionsLinkList.schema.json b/SRV/APPSUB/schemas/SubscriptionsLinkList.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/BWA/PlatBandwidthManager.robot b/SRV/BWA/PlatBandwidthManager.robot index 315c584..664f54a 100644 --- a/SRV/BWA/PlatBandwidthManager.robot +++ b/SRV/BWA/PlatBandwidthManager.robot @@ -5,8 +5,8 @@ Resource environment/variables.txt Resource ../../pics.txt Resource ../../GenericKeywords.robot -Resource resources/BandwidthManagerAPI.robot -Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem *** Test Cases *** @@ -17,7 +17,7 @@ Request the list of configured bandwidth allocations ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json Retrieve the list of configured bandwidth allocations ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is bwInfo + Check HTTP Response Body Json Schema Is BwInfo Check AppInstanceId ${APP_INSTANCE_ID} @@ -28,7 +28,7 @@ Request the list of configured bandwidth allocations with wrong app instance id ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json Retrieve the list of configured bandwidth allocations ${NON_EXISTENT_APP_INSTANCE_ID} Check HTTP Response Status Code Is 400 - Check ProblemDetails 400 + #Check ProblemDetails 400 Request to register Bandwidth Management Services @@ -36,9 +36,9 @@ Request to register Bandwidth Management Services ... Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application ... Reference ETSI GS MEC 015 V1.1.1, clause 8.4.3.4 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json - Registration for bandwidth services ${APP_INSTANCE_ID} ${REQUEST_FOR_BW_REQUIREMENTS} + Registration for bandwidth services ${APP_INSTANCE_ID} BwInfo Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is bwInfo + Check HTTP Response Body Json Schema Is BwInfo Check AppInstanceId ${APP_INSTANCE_ID} @@ -47,9 +47,8 @@ Request to register Bandwidth Management Services using wrong parameters ... Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application ... Reference ETSI GS MEC 015 V1.1.1, clause 8.4.3.4 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json - Registration for bandwidth services ${APP_INSTANCE_ID} ${REQUEST_FOR_BW_REQUIREMENTS_BR} + Registration for bandwidth services ${APP_INSTANCE_ID} BwInfoError Check HTTP Response Status Code Is 400 - Check ProblemDetails 400 Request for a bandwidth allocation @@ -59,7 +58,7 @@ Request for a bandwidth allocation ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json Get a bandwidth allocation ${ALLOCATION_ID} Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is bwInfo + Check HTTP Response Body Json Schema Is BwInfo Check AppInstanceId ${APP_INSTANCE_ID} @@ -70,7 +69,6 @@ Request for a bandwidth allocation using wrong parameters ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json Get a bandwidth allocation ${NON_EXISTENT_ALLOCATION_ID} Check HTTP Response Status Code Is 404 - Check ProblemDetails 404 Updates the requested bandwidth requirements @@ -79,16 +77,14 @@ Updates the requested bandwidth requirements ... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.2 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json # Preamble - Register Bandwidth Management Service + Register Bandwidth Management Service BwInfo # Test body - Update a bandwidth allocation ${ALLOCATION_ID} ${REQUEST_FOR_BW_REQUIREMENTS} + Update a bandwidth allocation ${ALLOCATION_ID} BwInfoUpdate Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is bwInfo + Check HTTP Response Body Json Schema Is BwInfo Check AppInstanceId ${APP_INSTANCE_ID} - Check Allocation ${ALLOCATION_ID} # Postamble - Unregister Bandwidth Management Service - + Unregister Bandwidth Management Service ${ALLOCATION_ID} Updates the requested bandwidth requirements using wrong allocationDirection [Documentation] TC_MEC_SRV_BWA_004_BR @@ -96,13 +92,12 @@ Updates the requested bandwidth requirements using wrong allocationDirection ... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.2 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json # Preamble - Register Bandwidth Management Service + Register Bandwidth Management Service BwInfo # Test body - Update a bandwidth allocation ${ALLOCATION_ID} ${REQUEST_FOR_BW_REQUIREMENTS_BR} + Update a bandwidth allocation ${ALLOCATION_ID} BwInfoError Check HTTP Response Status Code Is 400 - Check ProblemDetails 400 # Postamble - Unregister Bandwidth Management Service + Unregister Bandwidth Management Service ${ALLOCATION_ID} Updates the requested bandwidth requirements using wrong allocationId @@ -110,7 +105,7 @@ Updates the requested bandwidth requirements using wrong allocationId ... Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application ... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.2 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json - Update a bandwidth allocation ${NOT_EXISTENT_ALLOCATION_ID} ${REQUEST_FOR_BW_REQUIREMENTS} + Update a bandwidth allocation ${NON_EXISTENT_ALLOCATION_ID} BwInfoUpdate Check HTTP Response Status Code Is 404 Check ProblemDetails 404 @@ -122,13 +117,14 @@ Updates the requested bandwidth requirements using wrong parameters ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json # TODO Application doesn't comply with a required condition??? # Preamble - Register Bandwidth Management Service + Register Bandwidth Management Service BwInfo # Test body - Update a bandwidth allocation with invalid ETAG ${ALLOCATION_ID} ${REQUEST_FOR_BW_REQUIREMENTS} + Update a bandwidth allocation with invalid ETAG ${ALLOCATION_ID} BwInfoUpdate Check HTTP Response Status Code Is 412 - Check ProblemDetails 412 # Postamble - Unregister Bandwidth Management Service + Unregister Bandwidth Management Service ${ALLOCATION_ID} + + Request for deltas changes @@ -137,15 +133,14 @@ Request for deltas changes ... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.3 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json # Preamble - Register Bandwidth Management Service + Register Bandwidth Management Service BwInfo # Test body - Request a deltas changes ${ALLOCATION_ID} ${REQUEST_FOR_DELTAS_CHANGES} + Request a deltas changes ${ALLOCATION_ID} BwInfoUpdateDelta Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is bwInfo Check AppInstanceId ${APP_INSTANCE_ID} - Check Allocation ${ALLOCATION_ID} # Postamble - Unregister Bandwidth Management Service + Unregister Bandwidth Management Service ${ALLOCATION_ID} Request for deltas changes using invalid requestType @@ -154,13 +149,12 @@ Request for deltas changes using invalid requestType ... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.3 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json # Preamble - Register Bandwidth Management Service + Register Bandwidth Management Service BwInfo # Test body - Request a deltas changes ${ALLOCATION_ID} ${REQUEST_FOR_DELTAS_CHANGES_BR} + Request a deltas changes ${ALLOCATION_ID} BwInfoUpdateDeltaError Check HTTP Response Status Code Is 400 - Check ProblemDetails 400 # Postamble - Unregister Bandwidth Management Service + Unregister Bandwidth Management Service ${ALLOCATION_ID} Request for deltas changes using an unknown URI @@ -168,9 +162,8 @@ Request for deltas changes using an unknown URI ... Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application ... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.3 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json - Request a deltas changes ${NOT_EXISTENT_ALLOCATION_ID} ${REQUEST_FOR_DELTAS_CHANGES} + Request a deltas changes ${NON_EXISTENT_ALLOCATION_ID} BwInfoUpdateDelta Check HTTP Response Status Code Is 404 - Check ProblemDetails 404 Request for deltas changes using wrong parameters @@ -179,13 +172,12 @@ Request for deltas changes using wrong parameters ... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.3 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json # Preamble - Register Bandwidth Management Service + Register Bandwidth Management Service BwInfo # Test body - Request a deltas changes with invalid ETAG ${ALLOCATION_ID} ${REQUEST_FOR_DELTAS_CHANGES} + Request a deltas changes with invalid ETAG ${ALLOCATION_ID} BwInfoUpdateDelta Check HTTP Response Status Code Is 412 - Check ProblemDetails 412 # Postamble - Unregister Bandwidth Management Service + Unregister Bandwidth Management Service ${ALLOCATION_ID} Request to unregister bandwidth Management Service @@ -196,13 +188,13 @@ Request to unregister bandwidth Management Service # Preamble Should Be True ${PIC_MEC_PLAT} == 1 Should Be True ${PIC_SERVICES} == 1 - Register Bandwidth Management Service + Register Bandwidth Management Service BwInfo # Test body Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - Delete /exampleAPI/bwm/v1/bw_allocations/${ALLOCATION_ID} + Delete ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${ALLOCATION_ID} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 204 @@ -221,7 +213,7 @@ Request to unregister bandwidth Management Service with wrong parameters Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - Delete /exampleAPI/bwm/v1/bw_allocations/${NON_EXISTENT_ALLOCATION_ID} + Delete ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${NON_EXISTENT_ALLOCATION_ID} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 404 @@ -237,7 +229,7 @@ Retrieve the list of configured bandwidth allocations Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - Get /exampleAPI/bwm/v1/bw_allocations/${app_instance_id} + Get ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${app_instance_id} ${output}= Output response Set Suite Variable ${response} ${output} @@ -250,8 +242,9 @@ Registration for bandwidth services Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - log ${content} - Post /exampleAPI/bwm/v1/bw_allocations/${APP_INSTANCE_ID} ${content} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${app_instance_id} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -264,7 +257,7 @@ Get a bandwidth allocation Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - Get /exampleAPI/bwm/v1/bw_allocations/${allocation_id} + Get ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${allocation_id} ${output}= Output response Set Suite Variable ${response} ${output} @@ -276,9 +269,11 @@ Update a bandwidth allocation Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Set Headers {"ETag":"${ETAG_VALUE}"} + Set Headers {"If-Match":"${ETAG_VALUE}"} Set Headers {"Content-Length":"0"} - Put /exampleAPI/bwm/v1/bw_allocations/${allocation_id} ${content} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Put ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${allocation_id} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -290,9 +285,11 @@ Update a bandwidth allocation with invalid ETAG Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Set Headers {"${ETAG_LABEL}":"${INVALID_ETAG}"} + Set Headers {"If-Match":"${INVALID_ETAG}"} Set Headers {"Content-Length":"0"} - Put /exampleAPI/bwm/v1/bw_allocations/${allocation_id} ${content} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Put ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${allocation_id} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -304,9 +301,11 @@ Request a deltas changes Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Set Headers {"${ETAG_LABEL}":"${ETAG}"} + Set Headers {"If-Match":"${ETAG}"} Set Headers {"Content-Length":"0"} - Patch /exampleAPI/bwm/v1/bw_allocations/${allocation_id} ${content} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Patch ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${allocation_id} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -318,8 +317,62 @@ Request a deltas changes with invalid ETAG Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Set Headers {"${ETAG_LABEL}":"${INVALID_ETAG}"} + Set Headers {"If-Match":"${INVALID_ETAG}"} + Set Headers {"Content-Length":"0"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Patch ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${allocation_id} ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + + + +Register Bandwidth Management Service + [Arguments] ${content} + Should Be True ${PIC_MEC_PLAT} == 1 + Should Be True ${PIC_SERVICES} == 1 + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Set Headers {"Content-Length":"0"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/bw_allocations ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is BwInfo + # Extract ETAG_VALUE + Set Suite Variable ${ETAG_VALUE} ${response['status']['ETag']} + Should Not Be Empty ${ETAG_VALUE} + # TODO Extract allocationId not possible, information is missing in the standard doc + Set Suite Variable ${ALLOCATION_ID} ${response['body']['bwInfo']['allocationId']} + Should Not Be Empty ${ALLOCATION_ID} + + +Unregister Bandwidth Management Service + [Arguments] ${value} + Should Be True ${PIC_MEC_PLAT} == 1 + Should Be True ${PIC_SERVICES} == 1 + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Content-Length":"0"} - Patch /exampleAPI/bwm/v1/bw_allocations/${allocation_id} ${content} + Delete ${apiRoot}/${apiName}/${apiVersion}/bw_allocations/${value} ${output}= Output response Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 204 + + +Check AppInstanceId + [Arguments] ${value} + Log Check AppInstanceId for bwInfo element + Should be Equal ${response['body']['bwInfo']['appInsId']} ${value} + Log AppInstanceId OK + + +Check AllocationId + [Arguments] ${value} + Log Check AllocationId for bwInfo element + Should be Equal ${response['body']['bwInfo']['fixedAllocation']} ${value} + Log AllocationId OK diff --git a/SRV/BWA/environment/variables.txt b/SRV/BWA/environment/variables.txt index c3789a8..a7cd80a 100644 --- a/SRV/BWA/environment/variables.txt +++ b/SRV/BWA/environment/variables.txt @@ -1,20 +1,27 @@ *** Variables *** -${MEC-APP_SCHEMA} http -#${MEC-APP_HOST} 172.28.4.87 -#${MEC-APP_HOST} 127.0.0.1 -${MEC-APP_HOST} 192.168.56.1 -${MEC-APP_PORT} 8081 -${INVALID_ETAG} invalid_etag -${APP_INSTANCE_ID} appInst01 -${NON_EXISTENT_APP_INSTANCE_ID} appInst99 -${ALLOCATION_ID} allInst01 -${NON_EXISTENT_ALLOCATION_ID} allInst99 -${FIXED_ALLOCATION} fixed_allocation -${REQUEST_FOR_BW_REQUIREMENTS} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "APPLICATION_SPECIFIC_BW_ALLOCATION", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "${FIXED_ALLOCATION}", "allocationDirection": "00 = Downlink (towards the UE)"} -${REQUEST_FOR_BW_REQUIREMENTS_BR} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "UNKMOWN", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "${FIXED_ALLOCATION}", "allocationDirection": "00 = Downlink (towards the UE)"} -${REQUEST_FOR_DELTAS_CHANGES} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "APPLICATION_SPECIFIC_BW_ALLOCATION", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "string", "allocationDirection": "00 = Downlink (towards the UE)"} -${REQUEST_FOR_DELTAS_CHANGES_BR} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "UNKNOWN", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "string", "allocationDirection": "00 = Downlink (towards the UE)"} +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 ${response} {} ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} bwm +${apiVersion} v1 +# Specific variables + + + + + +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${NON_EXISTENT_APP_INSTANCE_ID} NON_EXISTENT_INSTANCE_ID +${APP_SRVSUB_NOTIF_CALLBACK_URI} http://127.0.0.1/subscribe +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID +${ALLOCATION_ID} 59ab1593-d330-4087-85ec-4e484092f306 +${NON_EXISTENT_ALLOCATION_ID} NON_EXISTENT_ALLOCATION_ID +${INVALID_ETAG} ${ETAG_VALUE} +${ETAG} \ No newline at end of file diff --git a/SRV/BWA/jsons/BwInfo.json b/SRV/BWA/jsons/BwInfo.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/BWA/jsons/BwInfoError.json b/SRV/BWA/jsons/BwInfoError.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/BWA/jsons/BwInfoUpdate.json b/SRV/BWA/jsons/BwInfoUpdate.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/BWA/jsons/BwInfoUpdateDelta.json b/SRV/BWA/jsons/BwInfoUpdateDelta.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/BWA/jsons/BwInfoUpdateDeltaError.json b/SRV/BWA/jsons/BwInfoUpdateDeltaError.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/BWA/resources/BandwidthManagerAPI.robot b/SRV/BWA/resources/BandwidthManagerAPI.robot deleted file mode 100644 index bf9d5b4..0000000 --- a/SRV/BWA/resources/BandwidthManagerAPI.robot +++ /dev/null @@ -1,57 +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 *** -Register Bandwidth Management Service - ... Register a Bandwidth Management Service - Should Be True ${PIC_MEC_PLAT} == 1 - Should Be True ${PIC_SERVICES} == 1 - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - Set Headers {"Content-Length":"0"} - Post /exampleAPI/bwm/v1/bw_allocations ${REQUEST_FOR_BW_REQUIREMENTS} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is bwInfo - # Extract ETAG_VALUE - Set Suite Variable ${ETAG_VALUE} ${response['status']['ETag']} - Should Not Be Empty ${ETAG_VALUE} - # TODO Extract allocationId not possible, information is missing in the standard doc - Set Suite Variable ${ALLOCATION_ID} ${response['body']['bwInfo']['allocationId']} - Should Not Be Empty ${ALLOCATION_ID} - - -Unregister Bandwidth Management Service - ... Unregister a Bandwidth Management Service - [Arguments] ${value} - Should Be True ${PIC_MEC_PLAT} == 1 - Should Be True ${PIC_SERVICES} == 1 - Set Headers {"Accept":"application/json"} - Set Headers {"Content-Type":"application/json"} - Set Headers {"Authorization":"${TOKEN}"} - Set Headers {"Content-Length":"0"} - Delete /exampleAPI/bwm/v1/bw_allocations/${value} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 204 - - -Check AppInstanceId - [Arguments] ${value} - Log Check AppInstanceId for bwInfo element - Should be Equal ${response['body']['bwInfo']['appInsId']} ${value} - Log AppInstanceId OK - - -Check AllocationId - [Arguments] ${value} - Log Check AllocationId for bwInfo element - Should be Equal ${response['body']['bwInfo']['fixedAllocation']} ${value} - Log AllocationId OK diff --git a/SRV/BWA/schemas/BwInfo.schema.json b/SRV/BWA/schemas/BwInfo.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/DNS/PlatDnsRules.robot b/SRV/DNS/PlatDnsRules.robot index 7abc1cc..1296b62 100644 --- a/SRV/DNS/PlatDnsRules.robot +++ b/SRV/DNS/PlatDnsRules.robot @@ -4,8 +4,11 @@ Documentation ... A test suite for validating DNS rules (DNS) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_DNS +Default Tags TC_MEC_SRV_DNS *** Variables *** @@ -13,7 +16,7 @@ Default Tags TP_MEC_SRV_DNS *** Test Cases *** -TP_MEC_SRV_DNS_001_OK +TC_MEC_SRV_DNS_001_OK [Documentation] ... Check that the IUT responds with a list of active DNS rules ... when queried by a MEC Application @@ -22,13 +25,12 @@ TP_MEC_SRV_DNS_001_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules + Get list of active DNS rules ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is DnsRuleList -TP_MEC_SRV_DNS_002_OK +TC_MEC_SRV_DNS_002_OK [Documentation] ... Check that the IUT responds with the information on a specific DNS rule ... when queried by a MEC Application @@ -37,14 +39,13 @@ TP_MEC_SRV_DNS_002_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${DNS_RULE_ID} + Get individual DNS rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is DnsRule Check Result Contains ${response['body']['DnsRule']} dnsRuleId ${DNS_RULE_ID} -TP_MEC_SRV_DNS_002_NF +TC_MEC_SRV_DNS_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -52,12 +53,11 @@ TP_MEC_SRV_DNS_002_NF ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${NON_EXISTENT_DNS_RULE_ID} + Get individual DNS rule ${APP_INSTANCE_ID} ${NON_ESISTENT_DNS_RULE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_DNS_003_OK +TC_MEC_SRV_DNS_003_OK [Documentation] ... Check that the IUT updates a specific DNS rule ... when commanded by a MEC Application @@ -66,15 +66,14 @@ TP_MEC_SRV_DNS_003_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${DNS_RULE_ID} ${MEC_APP_DNSRULE_UPDT_DATA} + Update a DNS Rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdate Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is DnsRule - Check Result Contains ${response['body']['DnsRule']} dnsRuleId ${DNS_RULE_NAME} - Check Result Contains ${response['body']['DnsRule']} ipAddress ${SOME_IP_ADDRESS} + # Check Result Contains ${response['body']['DnsRule']} dnsRuleId ${DNS_RULE_NAME} + # Check Result Contains ${response['body']['DnsRule']} ipAddress ${SOME_IP_ADDRESS} -TP_MEC_SRV_DNS_003_BR +TC_MEC_SRV_DNS_003_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -83,12 +82,11 @@ TP_MEC_SRV_DNS_003_BR ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${DNS_RULE_ID} ${MEC_APP_DNSRULE_UPDT_DATA_BR} + Update a DNS Rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdateError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_DNS_003_NF +TC_MEC_SRV_DNS_003_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -97,12 +95,11 @@ TP_MEC_SRV_DNS_003_NF ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${NON_EXISTENT_DNS_RULE_ID} ${MEC_APP_DNSRULE_UPDT_DATA} + Update a DNS Rule ${APP_INSTANCE_ID} ${NON_ESISTENT_DNS_RULE_ID} DnsRuleUpdate Check HTTP Response Status Code Is 404 -TP_MEC_SRV_DNS_003_PF +TC_MEC_SRV_DNS_003_PF [Documentation] ... Check that the IUT responds with an error when ... a request sent by a MEC Application doesn't comply with a required condition @@ -111,7 +108,40 @@ TP_MEC_SRV_DNS_003_PF ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecAppSupportApi.yaml#/definitions/DnsRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT invalid e-tag /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/dns_rules/${DNS_RULE_ID} ${MEC_APP_DNSRULE_UPDT_DATA} + Update a DNS Rule with invalid etag ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdate Check HTTP Response Status Code Is 412 + + +*** Keywords *** +Get list of active DNS rules + [Arguments] ${appInstanceId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/dns_rules + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Get individual DNS rule + [Arguments] ${appInstanceId} ${dnsRuleId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/dns_rules/${dnsRuleId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Update a DNS Rule + [Arguments] ${appInstanceId} ${dnsRuleId} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/dns_rules/${dnsRuleId} ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Update a DNS Rule with invalid etag + [Arguments] ${appInstanceId} ${dnsRuleId} ${content} + Set Headers {"If-Match": ${INVALID_ETAG}} \ No newline at end of file diff --git a/SRV/DNS/environment/variables.txt b/SRV/DNS/environment/variables.txt new file mode 100644 index 0000000..bb3a064 --- /dev/null +++ b/SRV/DNS/environment/variables.txt @@ -0,0 +1,31 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} mec_app_support +${apiVersion} v1 + +# Specific variables +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${DNS_RULE_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_ESISTENT_DNS_RULE_ID} NON_ESISTENT_DNS_RULE_ID +${INVALID_ETAG} INVALID_ETAG + +# ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription +# ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +# ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID +# ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} NON_EXISTENT_APP_MOBILITY_SERVICE_ID + +# # Notifications variables +# ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +# ${callback_port} 9091 +# ${callback_uri} http://172.22.1.7:${callback_port} +# ${callback_endpoint} /amsi/subscriptions +# ${callback_endpoint_error} /subs_404 +# ${total_polling_time} 2 min +# ${polling_interval} 10 sec \ No newline at end of file diff --git a/SRV/DNS/jsons/DnsRuleUpdate.json b/SRV/DNS/jsons/DnsRuleUpdate.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/DNS/jsons/DnsRuleUpdateError.json b/SRV/DNS/jsons/DnsRuleUpdateError.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/DNS/schemas/DnsRule.schema.json b/SRV/DNS/schemas/DnsRule.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/DNS/schemas/DnsRuleList.schema.json b/SRV/DNS/schemas/DnsRuleList.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/PlatFixedAcessInfo.robot b/SRV/FAIS/PlatFixedAcessInfo.robot index efebd06..f0d3437 100644 --- a/SRV/FAIS/PlatFixedAcessInfo.robot +++ b/SRV/FAIS/PlatFixedAcessInfo.robot @@ -4,16 +4,19 @@ Documentation ... A test suite for validating Fixed Access Information Service (FAIS) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem +Library MockServerLibrary -Default Tags TP_MEC_SRV_FAIS +Default Tags TC_MEC_SRV_FAIS -*** Variables *** *** Test Cases *** -TP_MEC_SRV_FAIS_001_OK +TC_MEC_SRV_FAIS_001_OK [Documentation] ... Check that the IUT responds with the current status of the fixed access information ... when queried by a MEC Application @@ -21,13 +24,12 @@ TP_MEC_SRV_FAIS_001_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.3.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_FA_INFO_URI} + Get fixed access information details Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FaInfo -TP_MEC_SRV_FAIS_001_BR +TC_MEC_SRV_FAIS_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -35,12 +37,11 @@ TP_MEC_SRV_FAIS_001_BR ... Reference ETSI GS MEC 029 V2.1.1, clause 7.3.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_FA_INFO_URI}?interface=1 + Get fixed access information details using query prameters interface ${INTERFACE_ID} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_FAIS_001_NF +TC_MEC_SRV_FAIS_001_NF [Documentation] ... Check that the IUT responds with an error when ... a request for non-existing data is sent by a MEC Application @@ -48,12 +49,11 @@ TP_MEC_SRV_FAIS_001_NF ... Reference ETSI GS MEC 029 V2.1.1, clause 7.3.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_FA_INFO_URI}?interface=999 + Get fixed access information details using query prameters interfaceType ${NON_EXISTENT_INTERFACE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_FAIS_002_OK +TC_MEC_SRV_FAIS_002_OK [Documentation] ... Check that the IUT responds with the current status of the device information ... when queried by a MEC Application @@ -61,13 +61,12 @@ TP_MEC_SRV_FAIS_002_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.4.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_DEVICE_INFO_URI} + Get status of device information Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is DeviceInfo -TP_MEC_SRV_FAIS_002_BR +TC_MEC_SRV_FAIS_002_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -75,12 +74,11 @@ TP_MEC_SRV_FAIS_002_BR ... Reference ETSI GS MEC 029 V2.1.1, clause 7.4.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_FA_INFO_URI}?device=__any_value__ + Get status of device information using query prameters device ${DEVICE_ID} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_FAIS_002_NF +TC_MEC_SRV_FAIS_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request for non-existing data is sent by a MEC Application @@ -88,12 +86,11 @@ TP_MEC_SRV_FAIS_002_NF ... Reference ETSI GS MEC 029 V2.1.1, clause 7.4.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_DEVICE_INFO_URI}?gwId=${NON_EXISTING_FAI_GW_ID} + Get status of device information using query prameters deviceId ${NON_EXISTENT_DEVICE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_FAIS_003_OK +TC_MEC_SRV_FAIS_003_OK [Documentation] ... Check that the IUT responds with the current status of the cable line information ... when queried by a MEC Application @@ -101,13 +98,12 @@ TP_MEC_SRV_FAIS_003_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.5.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_CABLE_LINE_INFO_URI} + Get status of the cable line information Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is CableLineInfo -TP_MEC_SRV_FAIS_003_BR +TC_MEC_SRV_FAIS_003_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -115,12 +111,11 @@ TP_MEC_SRV_FAIS_003_BR ... Reference ETSI GS MEC 029 V2.1.1, clause 7.5.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_CABLE_LINE_INFO_URI}?cm=__any_value__ + Get status of the cable line information using query parameters cm ${CABLE_MODEM_ID} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_FAIS_003_NF +TC_MEC_SRV_FAIS_003_NF [Documentation] ... Check that the IUT responds with an error when ... a request for non-existing data is sent by a MEC Application @@ -128,12 +123,11 @@ TP_MEC_SRV_FAIS_003_NF ... Reference ETSI GS MEC 029 V2.1.1, clause 7.5.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_CABLE_LINE_INFO_URI}?cmId=${NON_EXISTING_FAI_CM_ID} + Get status of the cable line information using query parameters cmId ${NON_EXISTING_FAI_CM_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_FAIS_004_OK +TC_MEC_SRV_FAIS_004_OK [Documentation] ... Check that the IUT responds with the current status of the optical network information ... when queried by a MEC Application @@ -141,13 +135,12 @@ TP_MEC_SRV_FAIS_004_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.6.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_OPTICAL_NW_INFO_URI} + Get status of the opentical network information Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PonInfo -TP_MEC_SRV_FAIS_004_BR +TC_MEC_SRV_FAIS_004_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -155,12 +148,11 @@ TP_MEC_SRV_FAIS_004_BR ... Reference ETSI GS MEC 029 V2.1.1, clause 7.6.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_CABLELINE_INFO_URI}?onu=__any_value__ + Get status of the opentical network information using query parameters onu ${ONU_ID} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_FAIS_004_NF +TC_MEC_SRV_FAIS_004_NF [Documentation] ... Check that the IUT responds with an error when ... a request for non-existing data is sent by a MEC Application @@ -168,12 +160,11 @@ TP_MEC_SRV_FAIS_004_NF ... Reference ETSI GS MEC 029 V2.1.1, clause 7.6.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_CABLELINE_INFO_URI}?cmId=${NON_EXISTING_FAI_ONU_ID} + Get status of the opentical network information using query parameters onuId ${NON_EXISTING_FAI_ONU_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_FAIS_005_OK +TC_MEC_SRV_FAIS_005_OK [Documentation] ... Check that the IUT responds with the subscriptions for fixed access information notifications ... when queried by a MEC Application @@ -181,13 +172,12 @@ TP_MEC_SRV_FAIS_005_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_SUB_URI} + Get list of subscriptions Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SubscriptionLinkList -TP_MEC_SRV_FAIS_005_BR +TC_MEC_SRV_FAIS_005_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -195,12 +185,11 @@ TP_MEC_SRV_FAIS_005_BR ... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_SUB_URI}?subscription=__any_value__ + Get list of subscriptions using query parameters subscription ${SUBSCRIPTION_TYPE} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_FAIS_005_NF +TC_MEC_SRV_FAIS_005_NF [Documentation] ... Check that the IUT responds with an error when ... a request for non-existing data is sent by a MEC Application @@ -208,12 +197,11 @@ TP_MEC_SRV_FAIS_005_NF ... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_SUB_URI}?subscription_type=${NON_EXISTING_FAI_SUB_ID} + Get list of subscriptions using query parameters subscriptionType ${NON_EXISTENT_SUBSCRIPTION_TYPE} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_FAIS_006_OK +TC_MEC_SRV_FAIS_006_OK [Documentation] ... Check that the IUT acknowledges the subscription by a MEC Application ... to notifications on Optical Network Unit alarm events @@ -221,26 +209,14 @@ TP_MEC_SRV_FAIS_006_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_FAI_SUB_URI} ${FAI_ONU_ALARM_SUB_DATA} + Create a new subscription OnuAlarmSubscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is OnuAlarmSubscription Check Result Contains ${response['body']['OnuAlarmSubscription']} subscriptionType "OnuAlarmSubscription" - # TODO how to send this? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? - # // MEC 029, clause 7.7.3.4 - # the IUT entity sends a vPOST containing - # uri indicating value CALLBACK_URL - # body containing - # OnuAlarmNotification containing - # notificationType set to "OnuAlarmSubscription" - # ; - # ; - # ; - # to the MEC_APP entity -TP_MEC_SRV_FAIS_006_BR +TC_MEC_SRV_FAIS_006_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -248,12 +224,11 @@ TP_MEC_SRV_FAIS_006_BR ... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_FAI_SUB_URI} ${FAI_ONU_ALARM_SUB_DATA_BR} + Create a new subscription OnuAlarmSubscriptionError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_FAIS_007_OK +TC_MEC_SRV_FAIS_007_OK [Documentation] ... Check that the IUT responds with the information on a given subscription ... when queried by a MEC Application @@ -261,14 +236,13 @@ TP_MEC_SRV_FAIS_007_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_SUB_URI}/${SUBSCRIPTION_ID} + Get an individual subscription ${ONU_ALARM_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is OnuAlarmSubscription Check Result Contains ${response['body']['OnuAlarmSubscription']} subscriptionType "OnuAlarmSubscription" -TP_MEC_SRV_FAIS_007_NF +TC_MEC_SRV_FAIS_007_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -276,12 +250,11 @@ TP_MEC_SRV_FAIS_007_NF ... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_FAI_SUB_URI}/${NON_EXISTENT_SUBSCRIPTION_ID} + Get an individual subscription ${NON_ESISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_FAIS_008_OK +TC_MEC_SRV_FAIS_008_OK [Documentation] ... Check that the IUT updates an existing subscription ... when commanded by a MEC Application @@ -289,14 +262,13 @@ TP_MEC_SRV_FAIS_008_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_FAI_SUB_URI}/${SUBSCRIPTION_ID} ${FAI_ONU_ALARM_SUB_UPDT_DATA} + Update subscription ${ONU_ALARM_SUBSCRIPTION_ID} OnuAlarmSubscriptionUpdate Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is OnuAlarmSubscription Check Result Contains ${response['body']['OnuAlarmSubscription']} subscriptionType "OnuAlarmSubscription" -TP_MEC_SRV_FAIS_008_BR +TC_MEC_SRV_FAIS_008_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -304,12 +276,11 @@ TP_MEC_SRV_FAIS_008_BR ... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_FAI_SUB_URI} ${FAI_ONU_ALARM_SUB_UPDT_DATA_BR} + Update subscription ${ONU_ALARM_SUBSCRIPTION_ID} OnuAlarmSubscriptionUpdateError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_FAIS_008_NF +TC_MEC_SRV_FAIS_008_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -317,12 +288,11 @@ TP_MEC_SRV_FAIS_008_NF ... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_FAI_SUB_URI}/${NON_EXISTENT_SUBSCRIPTION_ID} + Update subscription ${NON_ESISTENT_SUBSCRIPTION_ID} OnuAlarmSubscriptionUpdate Check HTTP Response Status Code Is 404 -TP_MEC_SRV_FAIS_008_PF +TC_MEC_SRV_FAIS_008_PF [Documentation] ... Check that the IUT responds with an error when ... a request sent by a MEC Application doesn't comply with a required condition @@ -330,12 +300,11 @@ TP_MEC_SRV_FAIS_008_PF ... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT invalid e-tag /${PX_FAI_SUB_URI} ${FAI_ONU_ALARM_SUB_UPDT_DATA} + Update subscription using invalid etag ${ONU_ALARM_SUBSCRIPTION_ID} OnuAlarmSubscriptionUpdate Check HTTP Response Status Code Is 412 -TP_MEC_SRV_FAIS_009_OK +TC_MEC_SRV_FAIS_009_OK [Documentation] ... Check that the IUT cancels an existing subscription ... when commanded by a MEC Application @@ -343,25 +312,11 @@ TP_MEC_SRV_FAIS_009_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_FAI_SUB_URI}/${SUBSCRIPTION_ID} + Remove subscription ${ONU_ALARM_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_SRV_UEDISTSUB_002_NF - [Documentation] - ... Check that the IUT responds with an error when - ... a request for an unknown URI is sent by a MEC Application - ... - ... Reference ETSI GS MEC 029 V2.1.1, clause 7.8.3.5 - - [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_FAI_SUB_URI}/${NON_EXISTING_SUBSCRIPTION_ID} - Check HTTP Response Status Code Is 404 - - -TP_MEC_SRV_FAIS_010_OK +TC_MEC_SRV_FAIS_010_OK [Documentation] ... Check that the IUT sends notification on expiry of Fixed Access Information event subscription ... to a MEC Application @@ -369,29 +324,19 @@ TP_MEC_SRV_FAIS_010_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES - - # TODO how to set this? expiryDeadline indicating value NOW_PLUS_X_SECONDS - vPOST /${PX_FAI_SUB_URI} ${FAI_DEV_INFO_SUB_DATA} - Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is DevInfoSubscription - Check HTTP Response Header Contains Location - Check Result Contains ${response['body']['DevInfoSubscription']} subscriptionType DevInfoSubscription - - # TODO: how to wait for a timeout of (NOW_PLUS_X_SECONDS - guard time)? which guard time value to use? - # and - # // MEC 029, clause 5.2.6.2 - # the IUT entity sends a vPOST containing - # uri indicating value CALLBACK_URL - # body containing - # ExpiryNotification containing - # expiryDeadline indicating value NOW_PLUS_X_SECONDS // TODO: how to set this? - # ; - # ; - # ; - # to the MEC_APP entity - - -TP_MEC_SRV_FAIS_011_OK + ${json}= Get File schemas/DevInfoSubscription.schema.json + Log Creating mock request and response to handle Device Information Notifications + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} + + +TC_MEC_SRV_FAIS_011_OK [Documentation] ... Check that the IUT sends notifications on Fixed Access Information events ... to a subscribed MEC Application @@ -399,32 +344,134 @@ TP_MEC_SRV_FAIS_011_OK ... Reference ETSI GS MEC 029 V2.1.1, clause 5.2.7 [Tags] PIC_MEC_PLAT PIC_SERVICES - - # TODO how to generate an event? - # Initial conditions with { - # the IUT entity being_in idle_state and - # the IUT entity having a subscriptions containing - # subscriptionType indicating value "OnuAlarmSubscription", - # callbackReference indicating value CALLBACK_URL - # ; - # } - - # // MEC 029, clause 5.2.7 - # Expected behaviour - # ensure that { - # when { - # the IUT entity generates a onu_alarm_event - # } - # then { - # // // MEC 029, clause 5.2.7 - # the IUT entity sends a vPOST containing - # Uri set to CALLBACK_URL - # body containing - # OnuAlarmSubscription containing - # notificationType set to "OnuAlarmSubscription" - # ; - # ; - # ; - # to the MEC_APP entity - # } - # } + ${json}= Get File schemas/OnuAlarmSubscription.schema.json + Log Creating mock request and response to handle Onu Alarm Notifications + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} + + + +*** Keywords *** +Get fixed access information details + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/fa_info + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get fixed access information details using query prameters + [Arguments] ${key} ${value} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/fa_info?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get status of device information + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/device_info + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get status of device information using query prameters + [Arguments] ${key} ${value} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/device_info?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get status of the cable line information + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/cable_line_info + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get status of the cable line information using query parameters + [Arguments] ${key} ${value} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/cable_line_info?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get status of the opentical network information + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/optical_network_info + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get status of the opentical network information using query parameters + [Arguments] ${key} ${value} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/optical_network_info?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get list of subscriptions + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get list of subscriptions using query parameters + [Arguments] ${key} ${value} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Create a new subscription + [Arguments] ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get an individual subscription + [Arguments] ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Update subscription + [Arguments] ${subscriptionId} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Update subscription using invalid etag + [Arguments] ${subscriptionId} ${content} + Set Headers {"If-Match": "${INVALID_ETAG}"} + +Remove subscription + [Arguments] ${subscriptionId} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/FAIS/environment/variables.txt b/SRV/FAIS/environment/variables.txt new file mode 100644 index 0000000..698f298 --- /dev/null +++ b/SRV/FAIS/environment/variables.txt @@ -0,0 +1,34 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} fai +${apiVersion} v1 + +# Specific variables +${INTERFACE_ID} 1 +${NON_EXISTENT_INTERFACE_ID} 999 +${DEVICE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${NON_EXISTENT_DEVICE_ID} NON_EXISTENT_DEVICE_ID +${CABLE_MODEM_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTING_FAI_CM_ID} NON_EXISTING_FAI_CM_ID +${ONU_ID} d7873fb9-249c-4e31-a3f1-00bf22740371 +${NON_EXISTING_FAI_ONU_ID} NON_EXISTING_FAI_ONU_ID +${SUBSCRIPTION_TYPE} DEVICE_ABNORMAL_ALERT +${NON_EXISTENT_SUBSCRIPTION_TYPE} NON_EXISTENT_SUBSCRIPTION_TYPE +${ONU_ALARM_SUBSCRIPTION_ID} 6cd12d29-30c7-4c8c-bf51-846daa51bab0 +${NON_ESISTENT_SUBSCRIPTION_ID} NON_ESISTENT_SUBSCRIPTION_ID +${INVALID_ETAG} INVALID_ETAG + + + +${callback_port} 9091 +${callback_uri} http://172.22.1.7:${callback_port} +${callback_endpoint} /fai/subscriptions +${callback_endpoint_error} /subs_404 +${total_polling_time} 2 min +${polling_interval} 10 sec \ No newline at end of file diff --git a/SRV/FAIS/jsons/DevInfoSubscription.json b/SRV/FAIS/jsons/DevInfoSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/jsons/OnuAlarmSubscription.json b/SRV/FAIS/jsons/OnuAlarmSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/jsons/OnuAlarmSubscriptionError.json b/SRV/FAIS/jsons/OnuAlarmSubscriptionError.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/jsons/OnuAlarmSubscriptionUpdate.json b/SRV/FAIS/jsons/OnuAlarmSubscriptionUpdate.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/jsons/OnuAlarmSubscriptionUpdateError.json b/SRV/FAIS/jsons/OnuAlarmSubscriptionUpdateError.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/schemas/CableLineInfo.schema.json b/SRV/FAIS/schemas/CableLineInfo.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/schemas/DevInfoSubscription.schema.json b/SRV/FAIS/schemas/DevInfoSubscription.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/schemas/DeviceInfo.schema.json b/SRV/FAIS/schemas/DeviceInfo.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/schemas/FaInfo.schema.json b/SRV/FAIS/schemas/FaInfo.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/schemas/OnuAlarmSubscription.schema.json b/SRV/FAIS/schemas/OnuAlarmSubscription.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/schemas/PonInfo.schema.json b/SRV/FAIS/schemas/PonInfo.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/FAIS/schemas/SubscriptionLinkList.schema.json b/SRV/FAIS/schemas/SubscriptionLinkList.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/RLOCLOOK/PlatRadioNodeLocation.robot b/SRV/RLOCLOOK/PlatRadioNodeLocation.robot index ae262fd..bc51099 100644 --- a/SRV/RLOCLOOK/PlatRadioNodeLocation.robot +++ b/SRV/RLOCLOOK/PlatRadioNodeLocation.robot @@ -4,16 +4,16 @@ Documentation ... A test suite for validating Radio Node Location Lookup (RLOCLOOK) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_RLOCLOOK - - -*** Variables *** +Default Tags TC_MEC_SRV_RLOCLOOK *** Test Cases *** -TP_MEC_SRV_RLOCLOOK_001_OK +TC_MEC_SRV_RLOCLOOK_001_OK [Documentation] ... Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node ... when queried by a MEC Application @@ -22,14 +22,13 @@ TP_MEC_SRV_RLOCLOOK_001_OK ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_Q_ZONE_ID_URI}/${ZONE_ID}/accessPoints + Get the access points list ${ZONE_ID} Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is accessPointList + Check HTTP Response Body Json Schema Is AccessPointList Check Result Contains ${response['body']['accessPointList']} zoneId ${ZONE_ID} -TP_MEC_SRV_RLOCLOOK_001_NF +TC_MEC_SRV_RLOCLOOK_001_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -37,6 +36,15 @@ TP_MEC_SRV_RLOCLOOK_001_NF ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.7 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_Q_ZONE_ID_URI}/${NON_EXISTENT_ZONE_ID}/accessPoints + Get the access points list ${NON_EXISTENT_ZONE_ID} Check HTTP Response Status Code Is 404 + + +*** Keywords *** +Get the access points list + [Arguments] ${zoneId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/zones/${zoneId}/accessPoints + ${output}= Output response + Set Suite Variable ${response} ${output} diff --git a/SRV/RLOCLOOK/environment/variables.txt b/SRV/RLOCLOOK/environment/variables.txt new file mode 100644 index 0000000..a9bf262 --- /dev/null +++ b/SRV/RLOCLOOK/environment/variables.txt @@ -0,0 +1,14 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} location +${apiVersion} v2 + +# Specific variables +${ZONE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${NON_EXISTENT_ZONE_ID} NON_EXISTENT_ZONE_ID diff --git a/SRV/RLOCLOOK/schemas/AccessPointList.schema.json b/SRV/RLOCLOOK/schemas/AccessPointList.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/RNIS/RnisNotifications.robot b/SRV/RNIS/RnisNotifications.robot index c3bd8d7..d26a864 100644 --- a/SRV/RNIS/RnisNotifications.robot +++ b/SRV/RNIS/RnisNotifications.robot @@ -157,7 +157,7 @@ S1-U bearer notification Clear Requests ${callback_endpoint} -UE Measurement notification +TC_MEC_SRV_RNIS_009_OK [Documentation] TC_MEC_SRV_RNIS_009_OK ... Check that the RNIS service sends an RNIS notification about 5G NR UE measurement report if the RNIS service has an associated subscription and the event is generated ... ETSI GS MEC 012 2.0.4, clause 6.4.11 @@ -175,7 +175,7 @@ UE Measurement notification Clear Requests ${callback_endpoint} -UE Measurement notification +TC_MEC_SRV_RNIS_010_OK [Documentation] TC_MEC_SRV_RNIS_010_OK ... Check that the RNIS service sends an RNIS notification on subscription expiration if the RNIS service has an associated subscription and the event is generated ... ETSI GS MEC 012 2.0.4, clause 6.4.9 diff --git a/SRV/SAQ/PlatServices.robot b/SRV/SAQ/PlatServices.robot index 2ac2aca..2676ca0 100644 --- a/SRV/SAQ/PlatServices.robot +++ b/SRV/SAQ/PlatServices.robot @@ -4,16 +4,17 @@ Documentation ... A test suite for validating Service Availability Query (SAQ) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_SAQ +Default Tags TC_MEC_SRV_SAQ -*** Variables *** - *** Test Cases *** -TP_MEC_SRV_SAQ_001_OK +TC_MEC_SRV_SAQ_001_OK [Documentation] ... Check that the IUT responds with a list of available MEC services ... when queried by a MEC Application @@ -22,13 +23,12 @@ TP_MEC_SRV_SAQ_001_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfoList [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_SVC_URI} + Get list of available MEC services Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfoList -TP_MEC_SRV_SAQ_001_BR +TC_MEC_SRV_SAQ_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -36,12 +36,11 @@ TP_MEC_SRV_SAQ_001_BR ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.3.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_SVC_URI}?instance_id=__any_value__ + Get list of available MEC services with parameters instance_id ${INVALID_VALUE} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_SAQ_002_OK +TC_MEC_SRV_SAQ_002_OK [Documentation] ... Check that the IUT responds with the information on a specific service ... when queried by a MEC Application @@ -50,14 +49,13 @@ TP_MEC_SRV_SAQ_002_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfoList [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_SVC_URI}/${SERVICE_ID} + Get specific MEC service ${SERVICE_ID} Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ServiceInfoList + Check HTTP Response Body Json Schema Is ServiceInfo Check Result Contains ${response['body']['ServiceInfoList']} serInstanceId ${SERVICE_ID} -TP_MEC_SRV_SAQ_002_NF +TC_MEC_SRV_SAQ_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -65,6 +63,30 @@ TP_MEC_SRV_SAQ_002_NF ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.4.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_SVC_URI}/${NON_EXISTENT_SERVICE_ID} + Get specific MEC service ${NON_EXISTENT_SERVICE_ID} Check HTTP Response Status Code Is 404 + + +*** Keywords *** +Get list of available MEC services with parameters + [Arguments] ${key}=None ${value}=None + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/services?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get list of available MEC services + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/services + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get specific MEC service + [Arguments] ${serviceId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/services/${serviceId} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/SAQ/environment/variables.txt b/SRV/SAQ/environment/variables.txt new file mode 100644 index 0000000..fcdf75e --- /dev/null +++ b/SRV/SAQ/environment/variables.txt @@ -0,0 +1,41 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} mec_service_mgmt +${apiVersion} v1 + +# Specific variables +${INVALID_VALUE} INVALID_VALUE +${SERVICE_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SERVICE_ID} NON_EXISTENT_SERVICE_ID + + + + + + +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${INSTANCE_ID} instance_id +${FAKE_INSTANCE_ID_VALUE} 5 +${NON_EXISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID +${INVALID_ETAG} INVALID_ETAG + +# ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription +# ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +# ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID +# ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} NON_EXISTENT_APP_MOBILITY_SERVICE_ID + +# # Notifications variables +# ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +# ${callback_port} 9091 +# ${callback_uri} http://172.22.1.7:${callback_port} +# ${callback_endpoint} /amsi/subscriptions +# ${callback_endpoint_error} /subs_404 +# ${total_polling_time} 2 min +# ${polling_interval} 10 sec \ No newline at end of file diff --git a/SRV/SAQ/schemas/ServiceInfo.schema.json b/SRV/SAQ/schemas/ServiceInfo.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/SAQ/schemas/ServiceInfoList.schema.json b/SRV/SAQ/schemas/ServiceInfoList.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/SRVSUB/PlatSrvSubscriptions.robot b/SRV/SRVSUB/PlatSrvSubscriptions.robot index b2783e9..5ecd4c2 100644 --- a/SRV/SRVSUB/PlatSrvSubscriptions.robot +++ b/SRV/SRVSUB/PlatSrvSubscriptions.robot @@ -4,16 +4,16 @@ Documentation ... A test suite for validating Service Subscriptions (SRVSUB) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_SRVSUB - - -*** Variables *** +Default Tags TC_MEC_SRV_SRVSUB *** Test Cases *** -TP_MEC_SRV_SRVSUB_001_OK +TC_MEC_SRV_SRVSUB_001_OK [Documentation] ... Check that the IUT responds with a list of subscriptions for notifications ... on services availability when queried by a MEC Application @@ -22,13 +22,12 @@ TP_MEC_SRV_SRVSUB_001_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/MecServiceMgmtApiSubscriptionLinkList [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions + Get list of subscriptions ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SubscriptionLinkList -TP_MEC_SRV_SRVSUB_001_NF +TC_MEC_SRV_SRVSUB_001_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -36,12 +35,11 @@ TP_MEC_SRV_SRVSUB_001_NF ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.8.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/subscriptions + Get list of subscriptions ${NON_EXISTENT_INSTANCE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_SRVSUB_002_OK +TC_MEC_SRV_SRVSUB_002_OK [Documentation] ... Check that the IUT acknowledges the subscription by a MEC Application ... to notifications on service availability events @@ -50,8 +48,7 @@ TP_MEC_SRV_SRVSUB_002_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/SerAvailabilityNotificationSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions ${MEC_APP_SRVSUB_DATA} + Create a new subscription ${APP_INSTANCE_ID} SerAvailabilityNotificationSubscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is SerAvailabilityNotificationSubscription Check HTTP Response Header Contains Location @@ -59,7 +56,7 @@ TP_MEC_SRV_SRVSUB_002_OK Check Result Contains ${response['body']['SerAvailabilityNotificationSubscription']} callbackReference ${APP_SRVSUB_NOTIF_CALLBACK_URI} -TP_MEC_SRV_SRVSUB_002_BR +TC_MEC_SRV_SRVSUB_002_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -68,12 +65,11 @@ TP_MEC_SRV_SRVSUB_002_BR ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/SerAvailabilityNotificationSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions ${MEC_APP_SRVSUB_DATA_BR} + Create a new subscription ${APP_INSTANCE_ID} SerAvailabilityNotificationSubscriptionError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_SRVSUB_003_OK +TC_MEC_SRV_SRVSUB_003_OK [Documentation] ... Check that the IUT responds with the information on a specific subscription ... when queried by a MEC Application @@ -82,14 +78,13 @@ TP_MEC_SRV_SRVSUB_003_OK ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/SerAvailabilityNotificationSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID} + Get individual subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SerAvailabilityNotificationSubscription Check Result Contains ${response['body']['SerAvailabilityNotificationSubscription']} subscriptionType "SerAvailabilityNotificationSubscription" -TP_MEC_SRV_SRVSUB_003_NF +TC_MEC_SRV_SRVSUB_003_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -97,12 +92,11 @@ TP_MEC_SRV_SRVSUB_003_NF ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.9.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions/${NON_EXISTENT_SUBSCRIPTION_ID} + Get individual subscription ${APP_INSTANCE_ID} ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_SRVSUB_004_OK +TC_MEC_SRV_SRVSUB_004_OK [Documentation] ... Check that the IUT acknowledges the unsubscribe from service availability event notifications ... when commanded by a MEC Application @@ -110,12 +104,11 @@ TP_MEC_SRV_SRVSUB_004_OK ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.9.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID} + Remove subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_SRV_SRVSUB_004_NF +TC_MEC_SRV_SRVSUB_004_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -123,8 +116,42 @@ TP_MEC_SRV_SRVSUB_004_NF ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.9.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_MEC_SVC_MGMT_APPS_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/subscriptions/${SUBSCRIPTION_ID} + Remove subscription ${NON_EXISTENT_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 +*** Keywords *** +Get list of subscriptions + [Arguments] ${appInstanceId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions + ${output}= Output response + Set Suite Variable ${response} ${output} + +Create a new subscription + [Arguments] ${appInstanceId} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get individual subscription + [Arguments] ${appInstanceId} ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Remove subscription + [Arguments] ${appInstanceId} ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/SRVSUB/environment/variables.txt b/SRV/SRVSUB/environment/variables.txt new file mode 100644 index 0000000..726b694 --- /dev/null +++ b/SRV/SRVSUB/environment/variables.txt @@ -0,0 +1,17 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} mec_service_mgmt +${apiVersion} v1 + +# Specific variables +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${NON_EXISTENT_INSTANCE_ID} NON_EXISTENT_INSTANCE_ID +${APP_SRVSUB_NOTIF_CALLBACK_URI} http://127.0.0.1/subscribe +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID diff --git a/SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscription.json b/SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscriptionError.json b/SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscriptionError.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/SRVSUB/schemas/SerAvailabilityNotificationSubscription.json b/SRV/SRVSUB/schemas/SerAvailabilityNotificationSubscription.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/SRVSUB/schemas/SubscriptionLinkList.schema.json b/SRV/SRVSUB/schemas/SubscriptionLinkList.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/TIME/PlatTiming.robot b/SRV/TIME/PlatTiming.robot index 2c0754f..45a41dd 100644 --- a/SRV/TIME/PlatTiming.robot +++ b/SRV/TIME/PlatTiming.robot @@ -4,40 +4,55 @@ Documentation ... A test suite for validating Timing capabilities (TIME) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_TIME +Default Tags TC_MEC_SRV_TIME -*** Variables *** - *** Test Cases *** -TP_MEC_SRV_TIME_001_OK +TC_MEC_SRV_TIME_001_OK [Documentation] ... Check that the IUT responds with timing capabilities ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.7.3.1 + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.5.3.1 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TimingCaps [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_TIMING_CAPS_URI} + Get time capabilities Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TimingCaps -TP_MEC_SRV_TIME_002_OK +TC_MEC_SRV_TIME_002_OK [Documentation] ... Check that the IUT responds with current time ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.8.3.1 + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.6.3.1 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/CurrentTime [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_TIMING_CURRENT_URI} + Get current time Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is CurrentTime + + +*** Keywords *** +Get time capabilities + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/timing/timing_caps + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get current time + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/timing/current_time + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/TIME/environment/variables.txt b/SRV/TIME/environment/variables.txt new file mode 100644 index 0000000..8837e30 --- /dev/null +++ b/SRV/TIME/environment/variables.txt @@ -0,0 +1,25 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} mec_app_support +${apiVersion} v1 + + + +# ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription +# ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} NON_EXISTENT_APP_MOBILITY_SERVICE_ID + +# # Notifications variables +# ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +# ${callback_port} 9091 +# ${callback_uri} http://172.22.1.7:${callback_port} +# ${callback_endpoint} /amsi/subscriptions +# ${callback_endpoint_error} /subs_404 +# ${total_polling_time} 2 min +# ${polling_interval} 10 sec \ No newline at end of file diff --git a/SRV/TIME/schemas/CurrentTime.schema.json b/SRV/TIME/schemas/CurrentTime.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/TIME/schemas/TimingCaps.schema.json b/SRV/TIME/schemas/TimingCaps.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/TRAF/PlatTrafficRules.robot b/SRV/TRAF/PlatTrafficRules.robot index 5bfa9e5..1bddcf8 100644 --- a/SRV/TRAF/PlatTrafficRules.robot +++ b/SRV/TRAF/PlatTrafficRules.robot @@ -4,114 +4,139 @@ Documentation ... A test suite for validating Traffic rules (TRAF) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_TRAF - - -*** Variables *** +Default Tags TC_MEC_SRV_TRAF *** Test Cases *** -TP_MEC_SRV_TRAF_001_OK +TC_MEC_SRV_TRAF_001_OK [Documentation] ... Check that the IUT responds with a list of available traffic rules ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.10.3.1 + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.7.3.1 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules + Get list of traffic rules ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TrafficRuleList -TP_MEC_SRV_TRAF_001_NF +TC_MEC_SRV_TRAF_001_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.10.3.1 + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/traffic_rules + Get list of traffic rules ${NON_EXISTENT_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_SRV_TRAF_002_OK +TC_MEC_SRV_TRAF_002_OK [Documentation] ... Check that the IUT responds with the information on a specific traffic rule ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.11.3.1 + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.1 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules/${TRAFFIC_RULE_ID} + Get individual traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TrafficRule Check Result Contains ${response['body']['TrafficRule']} trafficRuleId ${TRAFFIC_RULE_ID} -TP_MEC_SRV_TRAF_003_OK +TC_MEC_SRV_TRAF_003_OK [Documentation] ... Check that the IUT updates a specific traffic rule ... when commanded by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.11.3.2 + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.2 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules/${TRAFFIC_RULE_ID} ${MEC_APP_TRAF_DATA} + Update a traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdate Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TrafficRule Check Result Contains ${response['body']['TrafficRule']} trafficRuleId ${TRAFFIC_RULE_ID} Check Result Contains ${response['body']['TrafficRule']} action "DROP" -TP_MEC_SRV_TRAF_003_BR +TC_MEC_SRV_TRAF_003_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.11.3.2 + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.2 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules/${TRAFFIC_RULE_ID} ${MEC_APP_TRAF_DATA_BR} + Update a traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdateError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_TRAF_003_NF +TC_MEC_SRV_TRAF_003_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.11.3.2 + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.2 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules/${TRAFFIC_RULE_ID} ${NON_EXISTENT_TRAFFIC_RULE_ID} + Update a traffic rule ${APP_INSTANCE_ID} ${NON_EXISTENT_TRAFFIC_RULE_ID} TrafficRuleUpdate Check HTTP Response Status Code Is 404 -TP_MEC_SRV_TRAF_003_PF +TC_MEC_SRV_TRAF_003_PF [Documentation] ... Check that the IUT responds with an error when ... a request sent by a MEC Application doesn't comply with a required condition ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.11.3.2 + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.8.3.2 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TrafficRule [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPUT invalid e-tag /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/traffic_rules/${TRAFFIC_RULE_ID} ${MEC_APP_TRAF_DATA} + Update a traffic rule with invalid etag ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdate Check HTTP Response Status Code Is 412 +*** Keywords *** +Get list of traffic rules + [Arguments] ${appInstanceId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/traffic_rules + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get individual traffic rule + [Arguments] ${appInstanceId} ${trafficRuleId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/traffic_rules/${trafficRuleId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Update a traffic rule + [Arguments] ${appInstanceId} ${trafficRuleId} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/traffic_rules/${trafficRuleId} ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Update a traffic rule with invalid etag + [Arguments] ${appInstanceId} ${trafficRuleId} ${content} + Set Headers {"If-Match": "${INVALID_ETAG}"} + Update a traffic rule ${appInstanceId} ${trafficRuleId} ${content} \ No newline at end of file diff --git a/SRV/TRAF/environment/variables.txt b/SRV/TRAF/environment/variables.txt new file mode 100644 index 0000000..616d47d --- /dev/null +++ b/SRV/TRAF/environment/variables.txt @@ -0,0 +1,17 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} mec_app_support +${apiVersion} v1 + +# Specific variables +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${NON_EXISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID +${TRAFFIC_RULE_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_TRAFFIC_RULE_ID} NON_EXISTENT_TRAFFIC_RULE_ID +${INVALID_ETAG} INVALID_ETAG diff --git a/SRV/TRAF/jsons/TrafficRuleUpdate.json b/SRV/TRAF/jsons/TrafficRuleUpdate.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/TRAF/jsons/TrafficRuleUpdateError.json b/SRV/TRAF/jsons/TrafficRuleUpdateError.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/TRAF/schemas/TrafficRule.schema.json b/SRV/TRAF/schemas/TrafficRule.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/TRAF/schemas/TrafficRuleList.schema.json b/SRV/TRAF/schemas/TrafficRuleList.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/TRANS/PlatTransport.robot b/SRV/TRANS/PlatTransport.robot index 2b01caa..f4225e0 100644 --- a/SRV/TRANS/PlatTransport.robot +++ b/SRV/TRANS/PlatTransport.robot @@ -4,25 +4,32 @@ Documentation ... A test suite for validating Transport (TRANS) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_TRANS - - -*** Variables *** +Default Tags TC_MEC_SRV_TRANS *** Test Cases *** -TP_MEC_SRV_TRANS_001_OK +TC_MEC_SRV_TRANS_001_OK [Documentation] ... Check that the IUT responds with a list of available transports ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 7.9.3.1 + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.5.3.1 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.8/Mp1.yaml#/definitions/TransportInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_ME_TRANSPORTS_MNGMT_URI} + Get list of available transports Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TransportInfoList + +*** Keywords *** +Get list of available transports + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/transports + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/TRANS/environment/variables.txt b/SRV/TRANS/environment/variables.txt new file mode 100644 index 0000000..54a9fa3 --- /dev/null +++ b/SRV/TRANS/environment/variables.txt @@ -0,0 +1,17 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} mec_service_mgmt +${apiVersion} v1 + +# Specific variables +${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f +${NON_EXISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID +${TRAFFIC_RULE_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_TRAFFIC_RULE_ID} NON_EXISTENT_TRAFFIC_RULE_ID + diff --git a/SRV/TRANS/schemas/TransportInfoList.schema.json b/SRV/TRANS/schemas/TransportInfoList.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/UEAREASUB/PlatUeAreaSubscription.robot b/SRV/UEAREASUB/PlatUeAreaSubscription.robot index 1e97cc0..0307725 100644 --- a/SRV/UEAREASUB/PlatUeAreaSubscription.robot +++ b/SRV/UEAREASUB/PlatUeAreaSubscription.robot @@ -4,16 +4,17 @@ Documentation ... A test suite for validating UE Area Subscribe (UEAREASUB) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_UEAREASUB +Default Tags TC_MEC_SRV_UEAREASUB -*** Variables *** - *** Test Cases *** -TP_MEC_SRV_UEAREASUB_001_OK +TC_MEC_SRV_UEAREASUB_001_OK [Documentation] ... Check that the IUT acknowledges the UE area change subscription request when ... commanded by a MEC Application and notifies it when the UE enters the specified circle @@ -22,29 +23,16 @@ TP_MEC_SRV_UEAREASUB_001_OK ... OpenAPI # TODO check this [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_AREA_SUB_URI} ${MEC_APP_UEAREASUB_DATA} + Create new subscription CircleNotificationSubscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is circleNotificationSubscription Check Result Contains ${response['body']['circleNotificationSubscription']} clientCorrelator ${UEAREASUB_CLIENT_ID} Check Result Contains ${response['body']['circleNotificationSubscription']} callbackReference ${APP_UEAREASUB_CALLBACK_URI} Check Result Contains ${response['body']['circleNotificationSubscription']} address ${IP_ADDRESS} - # TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? - # // MEC 013, clause 7.3.11.3 - # the IUT entity sends a vPOST containing - # uri indicating value CALLBACK_URL, - # body containing - # subscriptionNotification containing - # terminalLocation containing - # address set to IP_ADDRESS - # ; - # ; - # ; - # ; - - -TP_MEC_SRV_UEAREASUB_001_BR + + +TC_MEC_SRV_UEAREASUB_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -52,12 +40,11 @@ TP_MEC_SRV_UEAREASUB_001_BR ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.11 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_AREA_SUB_URI} ${MEC_APP_UEAREASUB_DATA_BR} + Create new subscription CircleNotificationSubscriptionError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_UEAREASUB_002_OK +TC_MEC_SRV_UEAREASUB_002_OK [Documentation] ... Check that the IUT acknowledges the cancellation of UE area change notifications ... when commanded by a MEC Application @@ -65,12 +52,11 @@ TP_MEC_SRV_UEAREASUB_002_OK ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_AREA_SUB_URI}/${SUBSCRIPTION_ID} + Remove subscription ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_SRV_UEAREASUB_002_NF +TC_MEC_SRV_UEAREASUB_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request sent by a MEC Application doesn't comply with a required condition @@ -78,7 +64,26 @@ TP_MEC_SRV_UEAREASUB_002_NF ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_AREA_SUB_URI}/${NON_EXISTING_SUBSCRIPTION_ID} - Check HTTP Response Status Code Is 412 - + Remove subscription ${NON_EXISTENT_SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 404 + + +*** Keywords *** +Create new subscription + [Arguments] ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/area/circle ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Remove subscription + [Arguments] ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/area/circle/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/UEAREASUB/environment/variables.txt b/SRV/UEAREASUB/environment/variables.txt new file mode 100644 index 0000000..ffb1ccf --- /dev/null +++ b/SRV/UEAREASUB/environment/variables.txt @@ -0,0 +1,18 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} location +${apiVersion} v2 + +# Specific variables +${UEAREASUB_CLIENT_ID} 0123 +${APP_UEAREASUB_CALLBACK_URI} {"callbackData": "1234", "notifyURL": "http://application.example.com/notifications/distance_notifications/123456"} +${IP_ADDRESS} acr:10.0.0.1 +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID + \ No newline at end of file diff --git a/SRV/UEAREASUB/jsons/CircleNotificationSubscription.json b/SRV/UEAREASUB/jsons/CircleNotificationSubscription.json new file mode 100644 index 0000000..918f135 --- /dev/null +++ b/SRV/UEAREASUB/jsons/CircleNotificationSubscription.json @@ -0,0 +1,17 @@ +{ + "circleNotificationSubscription": { + "address": "acr:10.0.0.1", + "callbackReference": { + "callbackData": "1234", + "notifyURL": "http://application.example.com/notifications/distance_notifications/123456" + }, + "checkImmediate": "true", + "clientCorrelator": "0123", + "enteringLeavingCriteria": "Entering", + "frequency": "10", + "latitude": "-80.86302", + "longitude": "41.277306", + "radius": "500", + "trackingAccuracy": "10" + } +} \ No newline at end of file diff --git a/SRV/UEAREASUB/jsons/CircleNotificationSubscriptionError.json b/SRV/UEAREASUB/jsons/CircleNotificationSubscriptionError.json new file mode 100644 index 0000000..25b2930 --- /dev/null +++ b/SRV/UEAREASUB/jsons/CircleNotificationSubscriptionError.json @@ -0,0 +1,17 @@ +{ + "circleNotificationSubscription": { + "address": "acr:10.0.0.1", + "callback": { + "callbackData": "1234", + "notifyURL": "http://application.example.com/notifications/distance_notifications/123456" + }, + "checkImmediate": "true", + "clientCorrelator": "0123", + "enteringLeavingCriteria": "Entering", + "frequency": "10", + "latitude": "-80.86302", + "longitude": "41.277306", + "radius": "500", + "trackingAccuracy": "10" + } +} \ No newline at end of file diff --git a/SRV/UEAREASUB/schemas/CircleNotificationSubscription.schema.json b/SRV/UEAREASUB/schemas/CircleNotificationSubscription.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/UEDISTLOOK/PlatUeDistanceLookup.robot b/SRV/UEDISTLOOK/PlatUeDistanceLookup.robot index d6d3dd2..70662aa 100644 --- a/SRV/UEDISTLOOK/PlatUeDistanceLookup.robot +++ b/SRV/UEDISTLOOK/PlatUeDistanceLookup.robot @@ -4,16 +4,17 @@ Documentation ... A test suite for validating UE Distance Lookup (UEDISTLOOK) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_UEDISTLOOK +Default Tags TC_MEC_SRV_UEDISTLOOK -*** Variables *** - *** Test Cases *** -TP_MEC_SRV_UEDISTLOOK_001_OK +TC_MEC_SRV_UEDISTLOOK_001_OK [Documentation] ... Check that the IUT responds with the distance to a UE ... when queried by a MEC Application @@ -22,13 +23,14 @@ TP_MEC_SRV_UEDISTLOOK_001_OK ... OpenAPI # TODO check this [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_UE_LOC_QRY_URI}?address=${LOC_QRY_UE_ADDRESS}&latitude=${LOC_QRY_UE_LAT}&longitude=${LOC_QRY_UE_LONG} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/distance?address=${LOC_QRY_UE_ADDRESS}&latitude=${LOC_QRY_UE_LAT}&longitude=${LOC_QRY_UE_LONG} Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is terminalDistance + Check HTTP Response Body Json Schema Is TerminalDistance -TP_MEC_SRV_UEDISTLOOK_001_BR +TC_MEC_SRV_UEDISTLOOK_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -36,6 +38,7 @@ TP_MEC_SRV_UEDISTLOOK_001_BR ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.9 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_UE_LOC_QRY_URI}?address=${LOC_QRY_UE_ADDRESS}&lat=${LOC_QRY_UE_LAT}&longitude=${LOC_QRY_UE_LONG} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/queries/distance?address=${LOC_QRY_UE_ADDRESS}&lat=${LOC_QRY_UE_LAT}&longitude=${LOC_QRY_UE_LONG} Check HTTP Response Status Code Is 400 diff --git a/SRV/UEDISTLOOK/environment/variables.txt b/SRV/UEDISTLOOK/environment/variables.txt new file mode 100644 index 0000000..217a0d9 --- /dev/null +++ b/SRV/UEDISTLOOK/environment/variables.txt @@ -0,0 +1,15 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} location +${apiVersion} v2 + +# Specific variables +${LOC_QRY_UE_ADDRESS} acr:10.0.0.1 +${LOC_QRY_UE_LAT} -80.86302 +${LOC_QRY_UE_LONG} 41.277306 diff --git a/SRV/UEDISTLOOK/schemas/TerminalDistance.schema.json b/SRV/UEDISTLOOK/schemas/TerminalDistance.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/UEDISTSUB/PlatUeDistanceSubscription.robot b/SRV/UEDISTSUB/PlatUeDistanceSubscription.robot index ef62c73..2db3839 100644 --- a/SRV/UEDISTSUB/PlatUeDistanceSubscription.robot +++ b/SRV/UEDISTSUB/PlatUeDistanceSubscription.robot @@ -4,16 +4,16 @@ Documentation ... A test suite for validating UE Distance Subscribe (UEDISTSUB) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_UEDISTSUB - - -*** Variables *** +Default Tags TC_MEC_SRV_UEDISTSUB *** Test Cases *** -TP_MEC_SRV_UEDISTSUB_001_OK +TC_MEC_SRV_UEDISTSUB_001_OK [Documentation] ... Check that the IUT acknowledges the UE distance subscription request when commanded by a ... MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance @@ -22,17 +22,16 @@ TP_MEC_SRV_UEDISTSUB_001_OK ... OpenAPI # TODO check this [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_DIST_SUB_URI} ${UE_DIST_NOTIF_SUB_DATA} + Create new subscription DistanceNotificationSubscription Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is distanceNotificationSubscription + Check HTTP Response Body Json Schema Is DistanceNotificationSubscription Check Result Contains ${response['body']['distanceNotificationSubscription']} clientCorrelator ${UEDISTSUB_CLIENT_ID} Check Result Contains ${response['body']['distanceNotificationSubscription']} callbackReference ${APP_SRVSUB_NOTIF_CALLBACK_URI} Check Result Contains ${response['body']['distanceNotificationSubscription']} monitoredAddress ${UEDISTSUB_MONITORED_IP_ADDRESS} Check Result Contains ${response['body']['distanceNotificationSubscription']} referenceAddress ${UEDISTSUB_IP_ADDRESS} -TP_MEC_SRV_UEDISTSUB_001_BR +TC_MEC_SRV_UEDISTSUB_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -40,12 +39,11 @@ TP_MEC_SRV_UEDISTSUB_001_BR ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.10 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_DIST_SUB_URI} ${UE_DIST_NOTIF_SUB_DATA_BR} + Create new subscription DistanceNotificationSubscriptionError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_UEDISTSUB_002_OK +TC_MEC_SRV_UEDISTSUB_002_OK [Documentation] ... Check that the IUT acknowledges the cancellation of UE distance notifications ... when commanded by a MEC Application @@ -53,12 +51,11 @@ TP_MEC_SRV_UEDISTSUB_002_OK ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_DIST_SUB_URI}/${SUBSCRIPTION_ID} + Remove subscription ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_SRV_UEDISTSUB_002_NF +TC_MEC_SRV_UEDISTSUB_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -66,8 +63,25 @@ TP_MEC_SRV_UEDISTSUB_002_NF ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_DIST_SUB_URI}/${NON_EXISTING_SUBSCRIPTION_ID} + Remove subscription ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 - +*** Keywords *** +Create new subscription + [Arguments] ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/distance ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Remove subscription + [Arguments] ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/distance/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/UEDISTSUB/environment/variables.txt b/SRV/UEDISTSUB/environment/variables.txt new file mode 100644 index 0000000..83efa07 --- /dev/null +++ b/SRV/UEDISTSUB/environment/variables.txt @@ -0,0 +1,18 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} location +${apiVersion} v2 + +# Specific variables +${UEDISTSUB_CLIENT_ID} 0123 +${APP_SRVSUB_NOTIF_CALLBACK_URI} "callbackReference": {"callbackData": "1234","notifyURL": "http://application.example.com/notifications/distance_notifications/123456"} +${UEDISTSUB_MONITORED_IP_ADDRESS} ["acr:10.0.0.1", "acr:10.0.0.2"] +${UEDISTSUB_IP_ADDRESS} acr:10.0.0.3 +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID \ No newline at end of file diff --git a/SRV/UEDISTSUB/jsons/DistanceNotificationSubscription.json b/SRV/UEDISTSUB/jsons/DistanceNotificationSubscription.json new file mode 100644 index 0000000..57db8a1 --- /dev/null +++ b/SRV/UEDISTSUB/jsons/DistanceNotificationSubscription.json @@ -0,0 +1,16 @@ +{ + "distanceNotificationSubscription": { + "callbackReference": { + "callbackData": "1234", + "notifyURL": "http://application.example.com/notifications/distance_notifications/123456" + }, + "checkImmediate": "true", + "clientCorrelator": "0123", + "criteria": "AllWithinDistance", + "distance": "100", + "frequency": "10", + "monitoredAddress": ["acr:10.0.0.1", "acr:10.0.0.2"], + "referenceAddress": "acr:10.0.0.3", + "trackingAccuracy": "10" + } +} \ No newline at end of file diff --git a/SRV/UEDISTSUB/jsons/DistanceNotificationSubscriptionError.json b/SRV/UEDISTSUB/jsons/DistanceNotificationSubscriptionError.json new file mode 100644 index 0000000..7c13bd9 --- /dev/null +++ b/SRV/UEDISTSUB/jsons/DistanceNotificationSubscriptionError.json @@ -0,0 +1,16 @@ +{ + "distanceNotificationSubscription": { + "callbackReference": { + "callbackData": "1234", + "notifyURL": "http://application.example.com/notifications/distance_notifications/123456" + }, + "checkImmediate": "true", + "clientCorrelator": "0123", + "criteria": "AllWithinDistance", + "distance": "100", + "frequency": "10", + "monitoredAddress": ["acr:10.0.0.1", "acr:10.0.0.2"], + "reference": "acr:10.0.0.3", + "trackingAccuracy": "10" + } +} \ No newline at end of file diff --git a/SRV/UEDISTSUB/schemas/DistanceNotificationSubscription.schema.json b/SRV/UEDISTSUB/schemas/DistanceNotificationSubscription.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/UEINFOLOOK/PlatUeInformationLookup.robot b/SRV/UEINFOLOOK/PlatUeInformationLookup.robot index 255ef26..b001867 100644 --- a/SRV/UEINFOLOOK/PlatUeInformationLookup.robot +++ b/SRV/UEINFOLOOK/PlatUeInformationLookup.robot @@ -4,16 +4,16 @@ Documentation ... A test suite for validating UE Information Lookup (UEINFOLOOK) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_UEINFOLOOK - - -*** Variables *** +Default Tags TC_MEC_SRV_UEINFOLOOK *** Test Cases *** -TP_MEC_SRV_UEINFOLOOK_001_OK +TC_MEC_SRV_UEINFOLOOK_001_OK [Documentation] ... Check that the IUT responds with the information pertaining to one or more UEs in a particular location ... when queried by a MEC Application @@ -22,13 +22,12 @@ TP_MEC_SRV_UEINFOLOOK_001_OK ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserList [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_UE_LOC_USERS_URI}?address=${ACR_SOME_IP} + Get list of users with filter address ${ACR_ADDRESS} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is userList -TP_MEC_SRV_UEINFOLOOK_001_BR +TC_MEC_SRV_UEINFOLOOK_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -36,12 +35,11 @@ TP_MEC_SRV_UEINFOLOOK_001_BR ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.3 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_UE_LOC_USERS_URI}?addr=${ACR_SOME_IP} + Get list of users with filter addr ${ACR_ADDRESS} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_UEINFOLOOK_001_NF +TC_MEC_SRV_UEINFOLOOK_001_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -50,6 +48,14 @@ TP_MEC_SRV_UEINFOLOOK_001_NF ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserList [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_UE_LOC_USERS_URI}?address=${ACR_UNKNOWN_IP} - Check HTTP Response Status Code Is 400 + Get list of users with filter address ${ACR_UNKNOWN_IP} + Check HTTP Response Status Code Is 404 + +*** Keywords *** +Get list of users with filter + [Arguments] ${key} ${value} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/users?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} diff --git a/SRV/UEINFOLOOK/environment/variables.txt b/SRV/UEINFOLOOK/environment/variables.txt new file mode 100644 index 0000000..f85df68 --- /dev/null +++ b/SRV/UEINFOLOOK/environment/variables.txt @@ -0,0 +1,14 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} location +${apiVersion} v2 + +# Specific variables +${ACR_ADDRESS} acr:10.0.0.3 +${ACR_UNKNOWN_IP} acr:192.168.5.1.1 diff --git a/SRV/UEINFOSUB/PlatUeInformationSubscription.robot b/SRV/UEINFOSUB/PlatUeInformationSubscription.robot index 98861ac..340d327 100644 --- a/SRV/UEINFOSUB/PlatUeInformationSubscription.robot +++ b/SRV/UEINFOSUB/PlatUeInformationSubscription.robot @@ -4,16 +4,16 @@ Documentation ... A test suite for validating UE Information Subscription (UEINFOSUB) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_UEINFOSUB - - -*** Variables *** +Default Tags TC_MEC_SRV_UEINFOSUB *** Test Cases *** -TP_MEC_SRV_UEINFOSUB_001_OK +TC_MEC_SRV_UEINFOSUB_001_OK [Documentation] ... Check that the IUT acknowledges the UE information change subscription request ... when commanded by a MEC Application and notifies it when the location changes @@ -22,29 +22,15 @@ TP_MEC_SRV_UEINFOSUB_001_OK ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/zonalTrafficSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_INFO_SUB_URI} ${UE_ZONAL_TRAF_SUB_DATA} + Create new subscription ZonalTrafficSubscription Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is zonalTrafficSubscription + Check HTTP Response Body Json Schema Is ZonalTrafficSubscription Check Result Contains ${response['body']['zonalTrafficSubscription']} clientCorrelator ${ZONAL_TRAF_SUB_CLIENT_ID} Check Result Contains ${response['body']['zonalTrafficSubscription']} callbackReference ${ZONAL_TRAF_NOTIF_CALLBACK_URI} Check Result Contains ${response['body']['zonalTrafficSubscription']} zoneId ${ZONAL_TRAF_ZONE_ID} - # TODO how to send this? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? - # // MEC 013, clause 7.3.5.3 - # the IUT entity sends a vPOST containing - # Uri set to CALLBACK_URL - # body containing - # zonalPresenceNotification containing - # clientCorrelator set to CLIENT_ID, - # zoneId indicating value ZONE_ID - # ; - # ; - # ; - # to the MEC_APP entity - - -TP_MEC_SRV_UEINFOSUB_001_BR + +TC_MEC_SRV_UEINFOSUB_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -53,12 +39,11 @@ TP_MEC_SRV_UEINFOSUB_001_BR ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/zonalTrafficSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_ZONAL_TRAF_SUB_URI} ${UE_ZONAL_TRAF_SUB_DATA_BR} + Create new subscription ZonalTrafficSubscriptionError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_UEINFOSUB_002_OK +TC_MEC_SRV_UEINFOSUB_002_OK [Documentation] ... Check that the IUT acknowledges the cancellation of UE information change notifications ... when commanded by a MEC Application @@ -66,12 +51,11 @@ TP_MEC_SRV_UEINFOSUB_002_OK ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_ZONAL_TRAF_SUB_URI}/${SUBSCRIPTION_ID} + Remove subscription ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_SRV_UEDISTSUB_002_NF +TC_MEC_SRV_UEDISTSUB_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -79,6 +63,27 @@ TP_MEC_SRV_UEDISTSUB_002_NF ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_ZONAL_TRAF_SUB_URI}/${NON_EXISTING_SUBSCRIPTION_ID} + Remove subscription ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 + + +*** Keywords *** +Create new subscription + [Arguments] ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/zonalTraffic ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Remove subscription + [Arguments] ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/zonalTraffic/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + diff --git a/SRV/UEINFOSUB/environment/variables.txt b/SRV/UEINFOSUB/environment/variables.txt new file mode 100644 index 0000000..3da4c6f --- /dev/null +++ b/SRV/UEINFOSUB/environment/variables.txt @@ -0,0 +1,18 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} location +${apiVersion} v2 + +# Specific variables +${ZONAL_TRAF_SUB_CLIENT_ID} 0123 +${ZONAL_TRAF_NOTIF_CALLBACK_URI} {"notifyURL": "http://clientApp.example.com/location_notifications/123456"} +${ZONAL_TRAF_ZONE_ID} zone01 + +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID \ No newline at end of file diff --git a/SRV/UEINFOSUB/jsons/ZonalTrafficSubscription.json b/SRV/UEINFOSUB/jsons/ZonalTrafficSubscription.json new file mode 100644 index 0000000..6e3e224 --- /dev/null +++ b/SRV/UEINFOSUB/jsons/ZonalTrafficSubscription.json @@ -0,0 +1,11 @@ +{ + "zonalTrafficSubscription": { + "clientCorrelator": "0123", + "callbackReference": { + "notifyURL": "http://clientApp.example.com/location_notifications/123456" + }, + "zoneId": "zone01", + "interestRealm": "LA", + "userEventCriteria": "Transferring" + } +} \ No newline at end of file diff --git a/SRV/UEINFOSUB/jsons/ZonalTrafficSubscriptionError.json b/SRV/UEINFOSUB/jsons/ZonalTrafficSubscriptionError.json new file mode 100644 index 0000000..f3cd620 --- /dev/null +++ b/SRV/UEINFOSUB/jsons/ZonalTrafficSubscriptionError.json @@ -0,0 +1,11 @@ +{ + "zonalTrafficSubscription": { + "clientCorrelator": "0123", + "callbackReference": { + "notifyURL": "http://clientApp.example.com/location_notifications/123456" + }, + "zone": "zone01", + "interestRealm": "LA", + "userEventCriteria": "Transferring" + } +} \ No newline at end of file diff --git a/SRV/UEINFOSUB/schemas/ZonalTrafficSubscription.schema.json b/SRV/UEINFOSUB/schemas/ZonalTrafficSubscription.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/UELOCLOOK/PlatUeLocationLookup.robot b/SRV/UELOCLOOK/PlatUeLocationLookup.robot index 85274de..852351e 100644 --- a/SRV/UELOCLOOK/PlatUeLocationLookup.robot +++ b/SRV/UELOCLOOK/PlatUeLocationLookup.robot @@ -3,17 +3,19 @@ Documentation ... A test suite for validating UE Location Lookup (UELOCLOOK) operations. -Resource ../../GenericKeywords.robot -Default Tags TP_MEC_SRV_UELOCLOOK +Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem +Default Tags TC_MEC_SRV_UELOCLOOK -*** Variables *** *** Test Cases *** -TP_MEC_SRV_UELOCLOOK_001_OK +TC_MEC_SRV_UELOCLOOK_001_OK [Documentation] ... Check that the IUT responds with a list for the location of User Equipments ... when queried by a MEC Application @@ -22,14 +24,13 @@ TP_MEC_SRV_UELOCLOOK_001_OK ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_UE_LOC_USERS_URI}?zoneId=${UE_LOC_ZONE_ID} + Get list of user equipments zoneId ${ZONE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is userInfo - Check Result Contains ${response['body']['userInfo']} zoneId ${UE_LOC_ZONE_ID} + Check Result Contains ${response['body']['userInfo']} zoneId ${ZONE_ID} -TP_MEC_SRV_UELOCLOOK_001_BR +TC_MEC_SRV_UELOCLOOK_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -37,12 +38,11 @@ TP_MEC_SRV_UELOCLOOK_001_BR ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_UE_LOC_USERS_URI}?zone=${UE_LOC_ZONE_ID} + Get list of user equipments zone ${ZONE_ID} Check HTTP Response Status Code Is 400 -TP_MEC_SRV_UELOCLOOK_001_NF +TC_MEC_SRV_UELOCLOOK_001_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -50,6 +50,14 @@ TP_MEC_SRV_UELOCLOOK_001_NF ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vGET /${PX_UE_LOC_USERS_URI}?zoneId=${NON_EXISTENT_ZONE_ID} + Get list of user equipments zoneId ${NON_EXISTENT_ZONE_ID} Check HTTP Response Status Code Is 404 + +*** Keywords *** +Get list of user equipments + [Arguments] ${key} ${value} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/users?${key}=${value} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/UELOCLOOK/environment/variables.txt b/SRV/UELOCLOOK/environment/variables.txt new file mode 100644 index 0000000..e1df76f --- /dev/null +++ b/SRV/UELOCLOOK/environment/variables.txt @@ -0,0 +1,14 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} location +${apiVersion} v2 + +# Specific variables +${ZONE_ID} zone01 +${NON_EXISTENT_ZONE_ID} NON_EXISTENT_ZONE_ID \ No newline at end of file diff --git a/SRV/UELOCSUB/PlatUeLocationSubscription.robot b/SRV/UELOCSUB/PlatUeLocationSubscription.robot index 9df9ca9..4ec9bcb 100644 --- a/SRV/UELOCSUB/PlatUeLocationSubscription.robot +++ b/SRV/UELOCSUB/PlatUeLocationSubscription.robot @@ -3,9 +3,13 @@ Documentation ... A test suite for validating UE Location Subscription (UELOCSUB) operations. + Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_UELOCSUB +Default Tags TC_MEC_SRV_UELOCSUB *** Variables *** @@ -13,7 +17,7 @@ Default Tags TP_MEC_SRV_UELOCSUB *** Test Cases *** -TP_MEC_SRV_UELOCSUB_001_OK +TC_MEC_SRV_UELOCSUB_001_OK [Documentation] ... Check that the IUT acknowledges the UE location change subscription request ... when commanded by a MEC Application and notifies it when the location changes @@ -22,10 +26,9 @@ TP_MEC_SRV_UELOCSUB_001_OK ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserTrackingSubscription [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_LOC_USERTRACK_SUB_URI} ${UE_LOC_USERTRACK_SUB_DATA} + Create new subscription UserTrackingSubscription Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is userTrackingSubscription + Check HTTP Response Body Json Schema Is UserTrackingSubscription Check Result Contains ${response['body']['userTrackingSubscription']} clientCorrelator ${USERTRACKSUB_CLIENT_ID} Check Result Contains ${response['body']['userTrackingSubscription']} callbackReference ${USERTRACK_NOTIF_CALLBACK_URI} Check Result Contains ${response['body']['userTrackingSubscription']} address ${USERTRACK_IP_ADDRESS} @@ -43,7 +46,7 @@ TP_MEC_SRV_UELOCSUB_001_OK # ; # to the MEC_APP entity -TP_MEC_SRV_UELOCSUB_001_BR +TC_MEC_SRV_UELOCSUB_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -51,12 +54,11 @@ TP_MEC_SRV_UELOCSUB_001_BR ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_LOC_USERTRACK_SUB_URI} ${UE_LOC_USERTRACK_SUB_DATA_BR} + Create new subscription UserTrackingSubscriptionError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_UELOCSUB_002_OK +TC_MEC_SRV_UELOCSUB_002_OK [Documentation] ... Check that the IUT acknowledges the cancellation of UE location change notifications ... when commanded by a MEC Application @@ -64,12 +66,11 @@ TP_MEC_SRV_UELOCSUB_002_OK ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_LOC_USERTRACK_SUB_URI}/${SUBSCRIPTION_ID} + Remove subscription ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_SRV_UELOCSUB_002_NF +TC_MEC_SRV_UELOCSUB_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -77,8 +78,27 @@ TP_MEC_SRV_UELOCSUB_002_NF ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_LOC_USERTRACK_SUB_URI}/${NON_EXISTING_SUBSCRIPTION_ID} + Remove subscription ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 +*** Keywords *** +Create new subscription + [Arguments] ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/userTracking ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Remove subscription + [Arguments] ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/userTracking/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + diff --git a/SRV/UELOCSUB/environment/variables.txt b/SRV/UELOCSUB/environment/variables.txt new file mode 100644 index 0000000..3881d38 --- /dev/null +++ b/SRV/UELOCSUB/environment/variables.txt @@ -0,0 +1,18 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} location +${apiVersion} v2 + +# Specific variables +${USERTRACKSUB_CLIENT_ID} 0123 +${USERTRACK_NOTIF_CALLBACK_URI} {"notifyURL": "http://clientApp.example.com/location_notifications/123456"} +${USERTRACK_IP_ADDRESS} acr:10.0.0.1 + +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID \ No newline at end of file diff --git a/SRV/UELOCSUB/jsons/UserTrackingSubscription.json b/SRV/UELOCSUB/jsons/UserTrackingSubscription.json new file mode 100644 index 0000000..a5eb08d --- /dev/null +++ b/SRV/UELOCSUB/jsons/UserTrackingSubscription.json @@ -0,0 +1,10 @@ +{ + "userTrackingSubscription": { + "clientCorrelator": "0123", + "callbackReference": { + "notifyURL": "http://clientApp.example.com/location_notifications/123456" + }, + "address": "acr:10.0.0.1", + "userEventCriteria": "Transferring" + } +} \ No newline at end of file diff --git a/SRV/UELOCSUB/jsons/UserTrackingSubscriptionError.json b/SRV/UELOCSUB/jsons/UserTrackingSubscriptionError.json new file mode 100644 index 0000000..d2f9470 --- /dev/null +++ b/SRV/UELOCSUB/jsons/UserTrackingSubscriptionError.json @@ -0,0 +1,10 @@ +{ + "userTrackingSubscription": { + "client": "0123", + "callbackReference": { + "notifyURL": "http://clientApp.example.com/location_notifications/123456" + }, + "address": "acr:10.0.0.1", + "userEventCriteria": "Transferring" + } +} \ No newline at end of file diff --git a/SRV/UELOCSUB/schemas/UserTrackingSubscription.schema.json b/SRV/UELOCSUB/schemas/UserTrackingSubscription.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/SRV/UETRACKSUB/PlatUeTrackingSubscription.robot b/SRV/UETRACKSUB/PlatUeTrackingSubscription.robot index deb126a..76ff34a 100644 --- a/SRV/UETRACKSUB/PlatUeTrackingSubscription.robot +++ b/SRV/UETRACKSUB/PlatUeTrackingSubscription.robot @@ -4,26 +4,25 @@ Documentation ... A test suite for validating UE Tracking Subscribe (UETRACKSUB) operations. Resource ../../GenericKeywords.robot +Resource environment/variables.txt +Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false +Library OperatingSystem -Default Tags TP_MEC_SRV_UETRACKSUB - - -*** Variables *** +Default Tags TC_MEC_SRV_UETRACKSUB *** Test Cases *** -TP_MEC_SRV_UETRACKSUB_001_OK +TC_MEC_SRV_UETRACKSUB_001_OK [Documentation] ... Check that the IUT acknowledges the UE location change subscription request ... when commanded by a MEC Application and notifies it when the UE changes location ... - ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.5 + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.8 ... OpenAPI # TODO check this [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_PERIODIC_SUB_URI} ${UE_PERIODIC_SUB_DATA} + Create new subscription PeriodicNotificationSubscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is periodicNotificationSubscription Check Result Contains ${response['body']['periodicNotificationSubscription']} clientCorrelator ${UE_PERIODIC_SUB_CLIENT_ID} @@ -44,7 +43,7 @@ TP_MEC_SRV_UETRACKSUB_001_OK # ; -TP_MEC_SRV_UETRACKSUB_001_BR +TC_MEC_SRV_UETRACKSUB_001_BR [Documentation] ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application @@ -53,12 +52,11 @@ TP_MEC_SRV_UETRACKSUB_001_BR ... OpenAPI # TODO check this [Tags] PIC_MEC_PLAT PIC_SERVICES - - vPOST /${PX_UE_PERIODIC_SUB_URI} ${UE_PERIODIC_SUB_DATA_BR} + Create new subscription PeriodicNotificationSubscriptionError Check HTTP Response Status Code Is 400 -TP_MEC_SRV_UETRACKSUB_002_OK +TC_MEC_SRV_UETRACKSUB_002_OK [Documentation] ... Check that the IUT acknowledges the cancellation of UE tracking notifications ... when commanded by a MEC Application @@ -66,12 +64,11 @@ TP_MEC_SRV_UETRACKSUB_002_OK ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_PERIODIC_SUB_URI}/${SUBSCRIPTION_ID} + Remove subscription ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_SRV_UETRACKSUB_002_NF +TC_MEC_SRV_UETRACKSUB_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -79,8 +76,26 @@ TP_MEC_SRV_UETRACKSUB_002_NF ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.6 [Tags] PIC_MEC_PLAT PIC_SERVICES - - vDELETE without e-tag /${PX_UE_PERIODIC_SUB_URI}/${NON_EXISTING_SUBSCRIPTION_ID} + Remove subscription ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 +*** Keywords *** +Create new subscription + [Arguments] ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/periodic ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Remove subscription + [Arguments] ${subscriptionId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/periodic/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SRV/UETRACKSUB/environment/variables.txt b/SRV/UETRACKSUB/environment/variables.txt new file mode 100644 index 0000000..22d520a --- /dev/null +++ b/SRV/UETRACKSUB/environment/variables.txt @@ -0,0 +1,18 @@ +*** Variables *** +# Generic variables +${SCHEMA} http +${HOST} 10.192.2.172 +${PORT} 8081 +${response} {} +${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l +${apiRoot} +${apiName} location +${apiVersion} v2 + +# Specific variables +${UE_PERIODIC_SUB_CLIENT_ID} 0123 +${UE_PERIODIC_NOTIF_CALLBACK_URI} {"callbackData": "0123","notifyURL": "http://clientApp.example.com/location_notifications/123456"} +${UE_PERIODIC_IP_ADDRESS} acr:10.0.0.1 + +${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID \ No newline at end of file diff --git a/SRV/UETRACKSUB/jsons/PeriodicNotificationSubscription.json b/SRV/UETRACKSUB/jsons/PeriodicNotificationSubscription.json new file mode 100644 index 0000000..de016d4 --- /dev/null +++ b/SRV/UETRACKSUB/jsons/PeriodicNotificationSubscription.json @@ -0,0 +1,12 @@ +{ + "periodicNotificationSubscription": { + "address": "acr:10.0.0.1", + "callbackReference": { + "callbackData": "0123", + "notifyURL": "http://clientApp.example.com/location_notifications/123456" + }, + "clientCorrelator": "0123", + "frequency": "10", + "requestedAccuracy": "10" + } +} \ No newline at end of file diff --git a/SRV/UETRACKSUB/jsons/PeriodicNotificationSubscriptionError.json b/SRV/UETRACKSUB/jsons/PeriodicNotificationSubscriptionError.json new file mode 100644 index 0000000..e4340ae --- /dev/null +++ b/SRV/UETRACKSUB/jsons/PeriodicNotificationSubscriptionError.json @@ -0,0 +1,12 @@ +{ + "periodicNotificationSubscription": { + "address": "acr:10.0.0.1", + "callbackReference": { + "callbackData": "0123", + "notifyURL": "http://clientApp.example.com/location_notifications/123456" + }, + "client": "0123", + "frequency": "10", + "requestedAccuracy": "10" + } +} \ No newline at end of file diff --git a/SRV/UETRACKSUB/schemas/PeriodicNotificationSubscription.schema.json b/SRV/UETRACKSUB/schemas/PeriodicNotificationSubscription.schema.json new file mode 100644 index 0000000..e69de29 diff --git a/variables.py b/variables.txt similarity index 90% rename from variables.py rename to variables.txt index bde8223..79de30b 100644 --- a/variables.py +++ b/variables.txt @@ -1,3 +1,4 @@ +*** Variables *** MEC_SERVER_SCHEMA = "http" MEC_SERVER_HOST = "localhost" -- GitLab