From 79d958d0c4618c6448e4bc3d4a925f6d79a14fdf Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 16 Sep 2019 09:46:22 +0200 Subject: [PATCH] MEO/UEAPPS implementation --- MEO/UEAPPCTX/SysUeAppsContext.robot | 4 +- MEO/UEAPPCTX/environment/variables.txt | 1 + MEO/UEAPPS/SysUeApplications.robot | 88 ++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 MEO/UEAPPS/SysUeApplications.robot diff --git a/MEO/UEAPPCTX/SysUeAppsContext.robot b/MEO/UEAPPCTX/SysUeAppsContext.robot index a92d9a2..024723f 100644 --- a/MEO/UEAPPCTX/SysUeAppsContext.robot +++ b/MEO/UEAPPCTX/SysUeAppsContext.robot @@ -1,4 +1,4 @@ -''[Documentation] robot --outputdir ../../outputs ./PlatBandwidthManager.robot +''[Documentation] robot --outputdir ../../outputs ./SysUeAppContext.robot ... Test Suite to validate Bandwidth Management API (BWA) operations. *** Settings *** @@ -17,7 +17,7 @@ Creation of the application context ... Reference ETSI GS MEC 016 V1.1.1, clause 7.4.3.4 ... Reference https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext Create application context ${CREATE_APP_CTX} - Check HTTP Response Status Code Is 20 + Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppContext Should Be True ${response['body']['appContext']['appInfo']['appName']} == ${APP_NAME} # Postamble diff --git a/MEO/UEAPPCTX/environment/variables.txt b/MEO/UEAPPCTX/environment/variables.txt index c06ad55..922a3e3 100644 --- a/MEO/UEAPPCTX/environment/variables.txt +++ b/MEO/UEAPPCTX/environment/variables.txt @@ -13,3 +13,4 @@ ${CALLBACK_REFERENCE} http://www.acme.com/MyWonderfulApp/v1 ${CALLBACK_REFERENCE_1} http://www.acme.com/MyWonderfulApp/v2 ${CREATE_APP_CTX} { "contextId": "${CREATE_APP_CTX}", "associateUeAppId": "${UE_APP_ID}", "callbackReference": "${CALLBACK_REFERENCE}", "appInfo": { "appName": "${APP_NAME}", "appProvider": "ACME & Co", "appSoftVersion": "1.0.0.1", "appDescription": "This is a wonderful test application", "referenceURL": "http://www.acme.com/MyWonderfulPackage", "appPackageSource": "MyWonderfulPackage" } } ${CREATE_APP_CTX_BR} { "context": "${CREATE_APP_CTX}", "associateUeAppId": "${UE_APP_ID}", "callbackReference": "${CALLBACK_REFERENCE}", "appInfo": { "appName": "${APP_NAME}", "appProvider": "ACME & Co", "appSoftVersion": "1.0.0.1", "appDescription": "This is a wonderful test application", "referenceURL": "http://www.acme.com/MyWonderfulPackage", "appPackageSource": "MyWonderfulPackage" } } +${SERVICE_CONT_BR} UnknownServiceCont diff --git a/MEO/UEAPPS/SysUeApplications.robot b/MEO/UEAPPS/SysUeApplications.robot new file mode 100644 index 0000000..855b4e8 --- /dev/null +++ b/MEO/UEAPPS/SysUeApplications.robot @@ -0,0 +1,88 @@ +''[Documentation] robot --outputdir ../../outputs ./SysUeApplications.robot +... Test Suite to validate Bandwidth Management API (BWA) operations. + +*** Settings *** +Resource ../UEAPPCTX/environment/variables.txt +Resource ../../pics.txt +Resource ../../GenericKeywords.robot +Resource ../UEAPPCTX/resources/UeAppContextAPI.robot +Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false + + + +*** Test Cases *** +Get the list of the application contexts + [Documentation] TC_MEC_MEO_UEAPPS_001_OK + ... Check that the IUT responds with the list of user applications available when requested by an UE Application + ... Reference ETSI GS MEC 016 V1.1.1, clause 7.3.3.1 + ... Reference https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/ApplicationList + # Preamble + Should Be True ${PIC_MEC_SYSTEM} == 1 + Should Be True ${PIC_SERVICES} == 1 + Create an application context + # Test Body + Retrieve the application contexts list ${APP_NAME} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppInfo + Should Be True ${response['body']['appInfo']['appInfo'][0]['appName']} == ${APP_NAME} + # Postamble + Delete an application context ${APP_CTX_ID} + + +Get the list of the application contexts with wrong parameter + [Documentation] TC_MEC_MEO_UEAPPS_001_BR + ... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + ... Reference ETSI GS MEC 016 V1.1.1, clause 7.3.3.1 + ... Reference https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/ApplicationList + # Preamble + Should Be True ${PIC_MEC_SYSTEM} == 1 + Should Be True ${PIC_SERVICES} == 1 + Create an application context + # Test Body + Retrieve the application contexts list with serviceCont ${SERVICE_CONT_BR} + Check HTTP Response Status Code Is 400 + Check ProblemDetails 400 + # Postamble + Delete an application context ${APP_CTX_ID} + + +Get the list of the application contexts with wrong 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 + ... Reference https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/ApplicationList + # Preamble + Should Be True ${PIC_MEC_SYSTEM} == 1 + Should Be True ${PIC_SERVICES} == 1 + # AppInfo not created + # Test Body + Retrieve the application contexts list ${APP_NAME} + Check HTTP Response Status Code Is 404 + Check ProblemDetails 404 + + +*** Keywords *** +Retrieve the application contexts list + [Arguments] ${app_name} + Should Be True ${PIC_MEC_SYSTEM} == 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/mx2/v2/app_list?appName=${app_name} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Retrieve the application contexts list with serviceCont + [Arguments] ${service_cont} + Should Be True ${PIC_MEC_SYSTEM} == 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/mx2/v2/app_list?serviceCont=${service_cont} + ${output}= Output response + Set Suite Variable ${response} ${output} -- GitLab