diff --git a/GenericKeywords.robot b/GenericKeywords.robot index 1acb88d60a6f60bfcaf00c8e1e82bd75c7943f64..59f7eb785c809111dca6a5157fac4b350d794071 100644 --- a/GenericKeywords.robot +++ b/GenericKeywords.robot @@ -1,6 +1,8 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Library BuiltIn +Library REST ${AMS_SCHEMA}://${AMS_HOST}:${AMS_PORT} ssl_verify=false +Library OperatingSystem *** Variables *** ${response} @@ -51,4 +53,114 @@ Check HTTP Response Contain Header with value [Arguments] ${HEADER_TOCHECK} ${VALUE} Check HTTP Response Header Contains ${HEADER_TOCHECK} Should Be Equal As Strings ${value} ${response['headers']['Content-Type']} - \ No newline at end of file + +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/SRV/APPSAQ/PlatAppServices.robot b/SRV/APPSAQ/PlatAppServices.robot index 33611b34d92412d4d96febd10e140130ed795bb1..e54b60a30e156f683c73d524397e2d8847bcb77d 100644 --- a/SRV/APPSAQ/PlatAppServices.robot +++ b/SRV/APPSAQ/PlatAppServices.robot @@ -1,9 +1,9 @@ *** Settings *** Documentation -... A test suite for validating Application Service Availability Query (APPSAQ) operations. +... A test suite for validating Application Service Availability Query (APPSAQ) operations. -Resource ../../resources/GenericKeywords.robot +Resource ../../GenericKeywords.robot Default Tags TP_MEC_SRV_APPSAQ @@ -13,61 +13,189 @@ Default Tags TP_MEC_SRV_APPSAQ *** Test Cases *** -Get the available MEC services for a given application instance +TP_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 + ... Check that the IUT responds with a list of available MEC services + ... for a given application instance when queried by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.8, clause 7.15.3.1 - ... OpenAPI https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/ServiceInfo + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.6.3.1 + ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/v2.0.9/MecServiceMgmtApi.yaml#/definitions/ServiceInfo - [Tags] TP_MEC_SRV_APPSAQ_001_OK TP_MEC_SRV_APPSAQ_BV + [Tags] PIC_MEC_PLAT PIC_SERVICES - Given the Plaform IUT has a MEC Application instantiated - Log MEC 011, clause 5.2.5 -# When the Plaform IUT entity receives a vGET for /mec_service_mgmt/v1/applications/${APP_INSTANCE_ID}/services - When the Plaform IUT entity receives a vGET for /${APP_INSTANCE_ID}/services - Log MEC 011, clause 7.15.3.1 - Then the Plaform IUT sends a response 200 ServiceInfoList + vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ServiceInfoList -MEC Applications sends incorrect parameters in request +TP_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 + ... a request with incorrect parameters is sent by a MEC Application ... - ... Reference ETSI GS MEC 011 V2.0.8, clause 7.15.3.1 + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.6.3.1 - [Tags] TP_MEC_SRV_APPSAQ_001_BR TP_MEC_SRV_APPSAQ_BI + [Tags] PIC_MEC_PLAT PIC_SERVICES - Given the Plaform IUT has a MEC Application instantiated - Log MEC 011, clause 5.2.5 - Log Wrong parameter name should trigger an error response. -# When the Plaform IUT entity receives a vGET for /mec_service_mgmt/v1/applications/${APP_INSTANCE_ID}/services?instance_id=some_instance_id - When the Plaform IUT entity receives a vGET for /${APP_INSTANCE_ID}/services?instance_id=some_instance_id - Log MEC 011, clause 7.15.3.1 - Then the Plaform IUT sends a response 400 ProblemDetails + # Wrong query parameter name should trigger an error response. + vGET /${PX_MEC_SVC_MGMT_APPS_URI}/${APP_INSTANCE_ID}/services?id=some_instance_id + Check HTTP Response Status Code Is 400 -New MEC Applications service registration +TP_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 + ... Check that the IUT notifies the authorised relevant (subscribed) application + ... instances when a new service for a given application instance is registered ... - ... Reference ETSI GS MEC 011 V2.0.8, clause 7.15.3.4 - - [Tags] TP_MEC_SRV_APPSAQ_002_OK TP_MEC_SRV_APPSAQ_BV - - Given the Plaform IUT has a MEC Application instantiated - # TODO where does the __some_service__ data comes from? - Given a MEC Application subscribed to service notifications for __some_service__ - Log MEC 011, clause 5.2.4 - Log Wrong parameter name should trigger an error response. - # TODO where does the __some_data__ comes from? -# When the Plaform IUT entity receives a vPOST for /mec_service_mgmt/v1/applications/${APP_INSTANCE_ID}/services - When the Plaform IUT entity receives a vPOST for /${APP_INSTANCE_ID}/services __some_data__ ServiceInfo - Log MEC 011, clause 7.15.3.4 - Then the Plaform IUT sends a response 201 ServiceInfo - And the Plaform IUT response header parameter Location __location__ - Log MEC 011, clause 6.4.2 - And the Plaform IUT sends a notification message to the subscribed MEC Applications with ServiceAvailabilityNotification + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.6.3.4 + ... 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} + 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 + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.6.3.4 + ... 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} + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.6.3.4 + ... 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.7.3.1 + ... 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} + 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 + [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 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.7.3.2 + ... 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} + 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} + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.7.3.2 + ... 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} + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.7.3.2 + ... 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.7.3.2 + ... 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} + Check HTTP Response Status Code Is 412 + + + +*** Keywords *** + +Check Plaform IUT notifies the MEC Application instances + [Documentation] + ... + + [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? + + # // MEC 011, clause 6.4.2 + # the IUT entity sends a notification_message containing + # body containing + # notificationType set to "SerAvailabilityNotification", + # services containing + # serName set to SERVICE_NAME + # _links containing + # subscription set to MP1_SUBSCRIPTION_A + # ; + # ; + # ; + # ; + # to the MEC_APP_Subscriber entity diff --git a/SRV/APPSUB/PlatAppSubscriptions.robot b/SRV/APPSUB/PlatAppSubscriptions.robot new file mode 100644 index 0000000000000000000000000000000000000000..bc09cea563b452b19d566ba337ebf1ced0ee9f11 --- /dev/null +++ b/SRV/APPSUB/PlatAppSubscriptions.robot @@ -0,0 +1,114 @@ +*** Settings *** + +Documentation +... A test suite for validating Application Subscriptions (APPSUB) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_APPSUB + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.3.3.1 + ... 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 + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is SubscriptionLinkList + + +TP_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 + ... + ... 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 + Check HTTP Response Status Code Is 404 + + +TP_MEC_SRV_APPSUB_002_OK + [Documentation] + ... Check that the IUT acknowledges the subscription by a MEC Application + ... to notifications on service availability events + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.3.3.4 + ... 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} + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription + Check HTTP Response Header Contains Location + Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} subscriptionType "AppTerminationNotificationSubscription" + Check Result Contains ${response['body']['AppTerminationNotificationSubscription']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI} + + +TP_MEC_SRV_APPSUB_003_OK + [Documentation] + ... Check that the IUT responds with the information on a specific subscription + ... when queried by a MEC Application + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.4.3.1 + ... 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} + 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 + [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.2.4.3.1 + + [Tags] PIC_MEC_PLAT PIC_SERVICES + + vGET /${PX_ME_APP_SUPPORT_URI}/${APP_INSTANCE_ID}/subscriptions/${NON_EXISTENT_SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 404 + + +TP_MEC_SRV_APPSUB_004_OK + [Documentation] + ... Check that the IUT acknowledges the unsubscribe from service availability event notifications + ... when commanded by a MEC Application + ... + ... 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} + Check HTTP Response Status Code Is 204 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 diff --git a/SRV/DNS/PlatDnsRules.robot b/SRV/DNS/PlatDnsRules.robot new file mode 100644 index 0000000000000000000000000000000000000000..7abc1cc59f14a7ece82d44deda4590a65c5b79f8 --- /dev/null +++ b/SRV/DNS/PlatDnsRules.robot @@ -0,0 +1,117 @@ +*** Settings *** + +Documentation +... A test suite for validating DNS rules (DNS) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_DNS + + +*** Variables *** + + +*** Test Cases *** + +TP_MEC_SRV_DNS_001_OK + [Documentation] + ... Check that the IUT responds with a list of active DNS rules + ... when queried by a MEC Application + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.9.3.1 + ... 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 + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is DnsRuleList + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.1 + ... 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} + 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 + [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.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} + Check HTTP Response Status Code Is 404 + + +TP_MEC_SRV_DNS_003_OK + [Documentation] + ... Check that the IUT updates a specific DNS rule + ... when commanded by a MEC Application + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.2 + ... 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} + 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} + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.2 + ... 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} + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.2 + ... 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 7.2.10.3.2 + ... 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} + Check HTTP Response Status Code Is 412 + diff --git a/SRV/FAIS/PlatFixedAcessInfo.robot b/SRV/FAIS/PlatFixedAcessInfo.robot new file mode 100644 index 0000000000000000000000000000000000000000..efebd0693eb8f61881d8542baf130f5ad056a569 --- /dev/null +++ b/SRV/FAIS/PlatFixedAcessInfo.robot @@ -0,0 +1,430 @@ +*** Settings *** + +Documentation +... A test suite for validating Fixed Access Information Service (FAIS) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_FAIS + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is FaInfo + + +TP_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 + ... + ... 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 + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... 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 + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is DeviceInfo + + +TP_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 + ... + ... 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__ + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is CableLineInfo + + +TP_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 + ... + ... 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__ + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PonInfo + + +TP_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 + ... + ... 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__ + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... Reference ETSI GS MEC 029 V2.1.1, clause 7.7.3.1 + + [Tags] PIC_MEC_PLAT PIC_SERVICES + + vGET /${PX_FAI_SUB_URI} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is SubscriptionLinkList + + +TP_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 + ... + ... 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__ + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... 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} + 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 + [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 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} + Check HTTP Response Status Code Is 400 + + +TP_MEC_SRV_FAIS_007_OK + [Documentation] + ... Check that the IUT responds with the information on a given subscription + ... when queried by a MEC Application + ... + ... 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} + 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 + [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.1 + + [Tags] PIC_MEC_PLAT PIC_SERVICES + + vGET /${PX_FAI_SUB_URI}/${NON_EXISTENT_SUBSCRIPTION_ID} + Check HTTP Response Status Code Is 404 + + +TP_MEC_SRV_FAIS_008_OK + [Documentation] + ... Check that the IUT updates an existing subscription + ... when commanded by a MEC Application + ... + ... 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} + 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 + [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 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} + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 412 + + +TP_MEC_SRV_FAIS_009_OK + [Documentation] + ... Check that the IUT cancels an existing subscription + ... when commanded 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}/${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 + [Documentation] + ... Check that the IUT sends notification on expiry of Fixed Access Information event subscription + ... to a MEC Application + ... + ... 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 + [Documentation] + ... Check that the IUT sends notifications on Fixed Access Information events + ... to a subscribed MEC Application + ... + ... 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 + # } + # } diff --git a/SRV/RLOCLOOK/PlatRadioNodeLocation.robot b/SRV/RLOCLOOK/PlatRadioNodeLocation.robot new file mode 100644 index 0000000000000000000000000000000000000000..ae262fd3ba5865f5b1f5b2f9d4cfc220974c07a1 --- /dev/null +++ b/SRV/RLOCLOOK/PlatRadioNodeLocation.robot @@ -0,0 +1,42 @@ +*** Settings *** + +Documentation +... A test suite for validating Radio Node Location Lookup (RLOCLOOK) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_RLOCLOOK + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.7 + ... 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 + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is accessPointList + Check Result Contains ${response['body']['accessPointList']} zoneId ${ZONE_ID} + + +TP_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 + ... + ... 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 + Check HTTP Response Status Code Is 404 diff --git a/SRV/RLOC/README.md b/SRV/RLOCLOOK/README.md similarity index 100% rename from SRV/RLOC/README.md rename to SRV/RLOCLOOK/README.md diff --git a/SRV/SAQ/PlatServices.robot b/SRV/SAQ/PlatServices.robot new file mode 100644 index 0000000000000000000000000000000000000000..2ac2acacf2707221dbc622e9fdd058fee9365055 --- /dev/null +++ b/SRV/SAQ/PlatServices.robot @@ -0,0 +1,70 @@ +*** Settings *** + +Documentation +... A test suite for validating Service Availability Query (SAQ) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_SAQ + + +*** Variables *** + + +*** Test Cases *** + +TP_MEC_SRV_SAQ_001_OK + [Documentation] + ... Check that the IUT responds with a list of available MEC services + ... when queried by a MEC Application + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.3.3.1 + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ServiceInfoList + + +TP_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 + ... + ... 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__ + Check HTTP Response Status Code Is 400 + + +TP_MEC_SRV_SAQ_002_OK + [Documentation] + ... Check that the IUT responds with the information on a specific service + ... when queried by a MEC Application + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.4.3.1 + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ServiceInfoList + Check Result Contains ${response['body']['ServiceInfoList']} serInstanceId ${SERVICE_ID} + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 diff --git a/SRV/SRVSUB/PlatSrvSubscriptions.robot b/SRV/SRVSUB/PlatSrvSubscriptions.robot new file mode 100644 index 0000000000000000000000000000000000000000..b2783e90192107a1c1aa84a814a00c19faa92e6c --- /dev/null +++ b/SRV/SRVSUB/PlatSrvSubscriptions.robot @@ -0,0 +1,130 @@ +*** Settings *** + +Documentation +... A test suite for validating Service Subscriptions (SRVSUB) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_SRVSUB + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.8.3.1 + ... 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 + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is SubscriptionLinkList + + +TP_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 + ... + ... 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 + Check HTTP Response Status Code Is 404 + + +TP_MEC_SRV_SRVSUB_002_OK + [Documentation] + ... Check that the IUT acknowledges the subscription by a MEC Application + ... to notifications on service availability events + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.8.3.4 + ... 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} + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is SerAvailabilityNotificationSubscription + Check HTTP Response Header Contains Location + Check Result Contains ${response['body']['SerAvailabilityNotificationSubscription']} subscriptionType "SerAvailabilityNotificationSubscription" + Check Result Contains ${response['body']['SerAvailabilityNotificationSubscription']} callbackReference ${APP_SRVSUB_NOTIF_CALLBACK_URI} + + +TP_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 + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.8.3.4 + ... 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} + Check HTTP Response Status Code Is 400 + + +TP_MEC_SRV_SRVSUB_003_OK + [Documentation] + ... Check that the IUT responds with the information on a specific subscription + ... when queried by a MEC Application + ... + ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.9.3.1 + ... 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} + 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 + [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 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} + Check HTTP Response Status Code Is 404 + + +TP_MEC_SRV_SRVSUB_004_OK + [Documentation] + ... Check that the IUT acknowledges the unsubscribe from service availability event notifications + ... when commanded by a MEC Application + ... + ... 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} + Check HTTP Response Status Code Is 204 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 + + diff --git a/SRV/TIME/PlatTiming.robot b/SRV/TIME/PlatTiming.robot new file mode 100644 index 0000000000000000000000000000000000000000..2c0754fe0d18181f3301c82095ee69435f5c0f1e --- /dev/null +++ b/SRV/TIME/PlatTiming.robot @@ -0,0 +1,43 @@ +*** Settings *** + +Documentation +... A test suite for validating Timing capabilities (TIME) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_TIME + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is TimingCaps + + +TP_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 + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is CurrentTime diff --git a/SRV/TRAF/PlatTrafficRules.robot b/SRV/TRAF/PlatTrafficRules.robot new file mode 100644 index 0000000000000000000000000000000000000000..5bfa9e5f7df959584052ba1cea27ba264409f576 --- /dev/null +++ b/SRV/TRAF/PlatTrafficRules.robot @@ -0,0 +1,117 @@ +*** Settings *** + +Documentation +... A test suite for validating Traffic rules (TRAF) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_TRAF + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... 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 + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is TrafficRuleList + + +TP_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 + + [Tags] PIC_MEC_PLAT PIC_SERVICES + + vGET /${PX_ME_APP_SUPPORT_URI}/${NON_EXISTENT_APP_INSTANCE_ID}/traffic_rules + Check HTTP Response Status Code Is 404 + + +TP_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 + ... 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} + 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 + [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 + ... 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} + 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 + [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 + ... 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} + Check HTTP Response Status Code Is 400 + + +TP_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 + ... 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} + Check HTTP Response Status Code Is 404 + + +TP_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 + ... 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} + Check HTTP Response Status Code Is 412 + diff --git a/SRV/TRANS/PlatTransport.robot b/SRV/TRANS/PlatTransport.robot new file mode 100644 index 0000000000000000000000000000000000000000..2b01caa4ca3b25556c24369342072c24fe12b138 --- /dev/null +++ b/SRV/TRANS/PlatTransport.robot @@ -0,0 +1,28 @@ +*** Settings *** + +Documentation +... A test suite for validating Transport (TRANS) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_TRANS + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is TransportInfoList diff --git a/SRV/UEAREASUB/PlatUeAreaSubscription.robot b/SRV/UEAREASUB/PlatUeAreaSubscription.robot new file mode 100644 index 0000000000000000000000000000000000000000..1e97cc0c4b758dcef14cc57e76ff9b92f4f2bedf --- /dev/null +++ b/SRV/UEAREASUB/PlatUeAreaSubscription.robot @@ -0,0 +1,84 @@ +*** Settings *** + +Documentation +... A test suite for validating UE Area Subscribe (UEAREASUB) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_UEAREASUB + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.11 + ... OpenAPI # TODO check this + + [Tags] PIC_MEC_PLAT PIC_SERVICES + + vPOST /${PX_UE_AREA_SUB_URI} ${MEC_APP_UEAREASUB_DATA} + 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 + [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 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} + Check HTTP Response Status Code Is 400 + + +TP_MEC_SRV_UEAREASUB_002_OK + [Documentation] + ... Check that the IUT acknowledges the cancellation of UE area change notifications + ... when commanded by a MEC Application + ... + ... 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} + Check HTTP Response Status Code Is 204 + + +TP_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 + ... + ... 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 + diff --git a/SRV/UEDISTLOOK/PlatUeDistanceLookup.robot b/SRV/UEDISTLOOK/PlatUeDistanceLookup.robot new file mode 100644 index 0000000000000000000000000000000000000000..d6d3dd28b3119d762e241ce94dc22a8579b58e07 --- /dev/null +++ b/SRV/UEDISTLOOK/PlatUeDistanceLookup.robot @@ -0,0 +1,41 @@ +*** Settings *** + +Documentation +... A test suite for validating UE Distance Lookup (UEDISTLOOK) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_UEDISTLOOK + + +*** Variables *** + + +*** Test Cases *** + +TP_MEC_SRV_UEDISTLOOK_001_OK + [Documentation] + ... Check that the IUT responds with the distance to a UE + ... when queried by a MEC Application + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.9 + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is terminalDistance + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 400 diff --git a/SRV/UEDISTSUB/PlatUeDistanceSubscription.robot b/SRV/UEDISTSUB/PlatUeDistanceSubscription.robot new file mode 100644 index 0000000000000000000000000000000000000000..ef62c73b94c68b895d4588fe5425befdd7e470cf --- /dev/null +++ b/SRV/UEDISTSUB/PlatUeDistanceSubscription.robot @@ -0,0 +1,73 @@ +*** Settings *** + +Documentation +... A test suite for validating UE Distance Subscribe (UEDISTSUB) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_UEDISTSUB + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.10 + ... OpenAPI # TODO check this + + [Tags] PIC_MEC_PLAT PIC_SERVICES + + vPOST /${PX_UE_DIST_SUB_URI} ${UE_DIST_NOTIF_SUB_DATA} + Check HTTP Response Status Code Is 201 + 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 + [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 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} + Check HTTP Response Status Code Is 400 + + +TP_MEC_SRV_UEDISTSUB_002_OK + [Documentation] + ... Check that the IUT acknowledges the cancellation of UE distance notifications + ... when commanded by a MEC Application + ... + ... 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} + 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 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} + Check HTTP Response Status Code Is 404 + + diff --git a/SRV/UEINFOLOOK/PlatUeInformationLookup.robot b/SRV/UEINFOLOOK/PlatUeInformationLookup.robot new file mode 100644 index 0000000000000000000000000000000000000000..255ef269257ba31389b4ea29d7fd4fa3e8ae3e9b --- /dev/null +++ b/SRV/UEINFOLOOK/PlatUeInformationLookup.robot @@ -0,0 +1,55 @@ +*** Settings *** + +Documentation +... A test suite for validating UE Information Lookup (UEINFOLOOK) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_UEINFOLOOK + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.3 + ... 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} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is userList + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.3 + ... 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 diff --git a/SRV/UEINFLOOK/README.md b/SRV/UEINFOLOOK/README.md similarity index 100% rename from SRV/UEINFLOOK/README.md rename to SRV/UEINFOLOOK/README.md diff --git a/SRV/UEINFOSUB/PlatUeInformationSubscription.robot b/SRV/UEINFOSUB/PlatUeInformationSubscription.robot new file mode 100644 index 0000000000000000000000000000000000000000..98861ac8d730bb417752f0058e421a3b7bb6d243 --- /dev/null +++ b/SRV/UEINFOSUB/PlatUeInformationSubscription.robot @@ -0,0 +1,84 @@ +*** Settings *** + +Documentation +... A test suite for validating UE Information Subscription (UEINFOSUB) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_UEINFOSUB + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.5 + ... 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} + Check HTTP Response Status Code Is 201 + 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 + [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 013 V2.1.1, clause 7.3.5 + ... 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} + Check HTTP Response Status Code Is 400 + + +TP_MEC_SRV_UEINFOSUB_002_OK + [Documentation] + ... Check that the IUT acknowledges the cancellation of UE information change notifications + ... when commanded by a MEC Application + ... + ... 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} + 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 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} + Check HTTP Response Status Code Is 404 diff --git a/SRV/UEINFSUB/README.md b/SRV/UEINFOSUB/README.md similarity index 100% rename from SRV/UEINFSUB/README.md rename to SRV/UEINFOSUB/README.md diff --git a/SRV/UELOCLOOK/PlatUeLocationLookup.robot b/SRV/UELOCLOOK/PlatUeLocationLookup.robot new file mode 100644 index 0000000000000000000000000000000000000000..85274de5dbcb73e0a05d0c7b1615fe8edf1b622d --- /dev/null +++ b/SRV/UELOCLOOK/PlatUeLocationLookup.robot @@ -0,0 +1,55 @@ +*** Settings *** + +Documentation +... A test suite for validating UE Location Lookup (UELOCLOOK) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_UELOCLOOK + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.2 + ... 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} + 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} + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 400 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 diff --git a/SRV/UELOC/README.md b/SRV/UELOCLOOK/README.md similarity index 100% rename from SRV/UELOC/README.md rename to SRV/UELOCLOOK/README.md diff --git a/SRV/UELOCSUB/PlatUeLocationSubscription.robot b/SRV/UELOCSUB/PlatUeLocationSubscription.robot new file mode 100644 index 0000000000000000000000000000000000000000..9df9ca9575210665673f825783505def689165cf --- /dev/null +++ b/SRV/UELOCSUB/PlatUeLocationSubscription.robot @@ -0,0 +1,84 @@ +*** Settings *** + +Documentation +... A test suite for validating UE Location Subscription (UELOCSUB) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_UELOCSUB + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.4 + ... 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} + Check HTTP Response Status Code Is 201 + 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} + + # 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.4.3 + # the IUT entity sends a vPOST containing + # Uri set to CALLBACK_URL + # body containing + # zonalPresenceNotification containing + # clientCorrelator set to CLIENT_ID, + # address set to IP_ADDRESS + # ; + # ; + # ; + # to the MEC_APP entity + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 400 + + +TP_MEC_SRV_UELOCSUB_002_OK + [Documentation] + ... Check that the IUT acknowledges the cancellation of UE location change notifications + ... when commanded by a MEC Application + ... + ... 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} + Check HTTP Response Status Code Is 204 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 + + diff --git a/SRV/UETRACKSUB/PlatUeTrackingSubscription.robot b/SRV/UETRACKSUB/PlatUeTrackingSubscription.robot new file mode 100644 index 0000000000000000000000000000000000000000..deb126ab53059a89ec6ecb7144c6c0649f7d825a --- /dev/null +++ b/SRV/UETRACKSUB/PlatUeTrackingSubscription.robot @@ -0,0 +1,86 @@ +*** Settings *** + +Documentation +... A test suite for validating UE Tracking Subscribe (UETRACKSUB) operations. + +Resource ../../GenericKeywords.robot + +Default Tags TP_MEC_SRV_UETRACKSUB + + +*** Variables *** + + +*** Test Cases *** + +TP_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 + ... OpenAPI # TODO check this + + [Tags] PIC_MEC_PLAT PIC_SERVICES + + vPOST /${PX_UE_PERIODIC_SUB_URI} ${UE_PERIODIC_SUB_DATA} + 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} + Check Result Contains ${response['body']['periodicNotificationSubscription']} callbackReference ${UE_PERIODIC_NOTIF_CALLBACK_URI} + Check Result Contains ${response['body']['periodicNotificationSubscription']} address ${UE_PERIODIC_IP_ADDRESS} + + # 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.8.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_UETRACKSUB_001_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 013 V2.1.1, clause 7.3.4 + ... OpenAPI # TODO check this + + [Tags] PIC_MEC_PLAT PIC_SERVICES + + vPOST /${PX_UE_PERIODIC_SUB_URI} ${UE_PERIODIC_SUB_DATA_BR} + Check HTTP Response Status Code Is 400 + + +TP_MEC_SRV_UETRACKSUB_002_OK + [Documentation] + ... Check that the IUT acknowledges the cancellation of UE tracking notifications + ... when commanded by a MEC Application + ... + ... 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} + Check HTTP Response Status Code Is 204 + + +TP_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 + ... + ... 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} + Check HTTP Response Status Code Is 404 + + diff --git a/log.html b/log.html new file mode 100644 index 0000000000000000000000000000000000000000..868f05ce91dcf802c89b7d39b605e20f39a79f3c --- /dev/null +++ b/log.html @@ -0,0 +1,2125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework log failed

+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources.robot b/resources.robot new file mode 100644 index 0000000000000000000000000000000000000000..4164d2691342da2e98bc9b0ae450ccc4dc12f150 --- /dev/null +++ b/resources.robot @@ -0,0 +1,116 @@ +*** Settings *** + +Documentation + ... A resource file with reusable keywords and variables. + ... + ... The system specific keywords created here form our own domain specific language. + + +Library REST ${MEC_SERVER_IUT} ssl_verify=${MEC_SERVER_SSL_VERITY} accept=application/json content_type=application/json +Library JSONSchemaLibrary ${JSONS_SCHEMAS} + + +*** Keywords *** + +GET URI + [Arguments] ${service} + + [Documentation] + ... Issue a GET request to an URI. + ... NOTE: the response is stored in the REST library used and is available throughtout the test scope. + ... + ... service: the service endpoint to call (without the server name or port). + + Log URI: ${service} + GET ${service} + + +the Plaform IUT entity receives a vGET for + [Arguments] ${endpoint} + + [Documentation] + ... Send a GET request to an API endpoint. + ... + ... endpoint: the absolut path to the API endpoint to reach, without the server address and port. + + ${resp} = GET URI ${endpoint} + + +the Plaform IUT entity receives a vPOST for + [Arguments] ${endpoint} ${data} ${schema} + + [Documentation] + ... A MEC Application subscribes notifications on the availability of a specific service. + ... + ... endpoint: the absolut path to the API endpoint to reach, without the server address and port. + ... data_schema: the schema for the expected data in the POST request. + + Validate Json ${schema}.schema.json ${data} + # TODO will this be mocked or will we use the proper MEC API calls for this? + # If so, won't theses tests require a functional MEC Server? + + +the Plaform IUT sends a response + [Arguments] ${status_code} ${json_schema} + + [Documentation] + ... Check the correctness of the response sent by the IUT. + ... + ... status_code: The expected HTTP status code received in the response. + ... json_schema: the schema to validate the response conformance. + + Integer response status ${status_code} + Output response + ${response} = Output response body + Validate Json ${json_schema}.schema.json ${response} + + +the Plaform IUT has a MEC Application instantiated + [Documentation] + ... Instantiates a MEC Application. + + # TODO will this be mocked or will we use the proper MEC API calls for this? + # If so, won't theses tests require a functional MEC Server? + Set Suite Variable ${APP_INSTANCE_ID} 123 + + +a MEC Application subscribed to service notifications for + [Arguments] ${mec_service} + + [Documentation] + ... A MEC Application subscribes notifications on the availability of a specific service. + ... + ... mec_service: the MEC platform service a MEC Application wants to be notified of. + + Log Available MEC Service: ${mec_service} + # TODO will this be mocked or will we use the proper MEC API calls for this? + # If so, won't theses tests require a functional MEC Server? + + +the Plaform IUT response header parameter + [Arguments] ${header} ${value} + + [Documentation] + ... + + # TODO the platform must reply with a specific header which should be checked for conformance. + # How to do this as the test needs to send a response but also ensure it sends the proper header? + + # String request headers Authorization Bearer ${oauth_token} + No Operation + + +the Plaform IUT sends a notification message to the subscribed MEC Applications with + [Arguments] ${data} + + [Documentation] + ... + + # TODO + # GS MEC 011 V2.0.8, ยง5.2.4: the MEC platform identifies the relevant MEC platforms for this update, and informs + # them about the changes in service availability by means that may be outside the scope of the present document. + # + # The TP has this notification, so what to do here? Simply do not care about this? Update the TP to exclude this notification? + + No Operation + diff --git a/variables.py b/variables.py new file mode 100644 index 0000000000000000000000000000000000000000..bde8223cccee2fbd52751585d86547e4b1c7821f --- /dev/null +++ b/variables.py @@ -0,0 +1,9 @@ + +MEC_SERVER_SCHEMA = "http" +MEC_SERVER_HOST = "localhost" +MEC_SERVER_PORT = 8000 +MEC_SERVER_SSL_VERITY = "false" + +MEC_SERVER_IUT = "{}://{}:{}".format(MEC_SERVER_SCHEMA, MEC_SERVER_HOST, MEC_SERVER_PORT) + +JSONS_SCHEMAS = "schemas"