diff --git a/MEO/UEAPPCTX/SysUeAppsContext.robot b/MEO/UEAPPCTX/SysUeAppsContext.robot index 3793692f0e3f85c861f6d5e328cebf533eab8eb5..a940f3814756230cc67ff08adefefeab964ea98a 100644 --- a/MEO/UEAPPCTX/SysUeAppsContext.robot +++ b/MEO/UEAPPCTX/SysUeAppsContext.robot @@ -11,6 +11,80 @@ Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_v *** Test Cases *** +Creation of the application context + [Documentation] TC_MEC_MEO_UEAPPCTX_001_OK + ... Check that the IUT acknowledges the creation of the application context when requested by an UE Application + ... Reference ETSI GS MEC 014 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 Body Json Schema Is AppContext + Should Be True ${response['body']['appContext']['appInfo']['appName']} == ${APP_NAME} + + +Creation of the application context with wrong parameters + [Documentation] TC_MEC_MEO_UEAPPCTX_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 014 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 400 + Check ProblemDetails 400 + + +Update of the application context + [Documentation] TC_MEC_MEO_UEAPPCTX_002_OK + ... Check that the IUT updates the application callback reference when commanded by an UE Application + ... Reference ETSI GS MEC 014 V1.1.1, clause 7.5.3.2 + ... Reference https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext + # Preamble + Should Be True ${PIC_MEC_SYSTEM} == 1 + Should Be True ${PIC_SERVICES} == 1 + Create an application context + # Test Body + ${CREATE_APP_CTX['callbackReference']}= ${CALLBACK_REFERENCE_1} + Update application context ${CREATE_APP_CTX} + Check HTTP Response Status Code Is 204 + Check HTTP Response Body Json Schema Is AppContext + Should Be True ${response['body']['appContext']['callbackReference']} == ${CALLBACK_REFERENCE_1} + + +Update of the application context with wrong parameters + [Documentation] TC_MEC_MEO_UEAPPCTX_002_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 014 V1.1.1, clause 7.5.3.2 + ... Reference https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext + # Preamble + Should Be True ${PIC_MEC_SYSTEM} == 1 + Should Be True ${PIC_SERVICES} == 1 + Create an application context + # Test Body + ${CREATE_APP_CTX['callbackReference']}= '' # Empty string + Update application context ${CREATE_APP_CTX} + Check HTTP Response Status Code Is 400 + Check ProblemDetails 400 *** Keywords *** +Create application context + [Arguments] ${content} + 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_contexts ${content} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Update application context + [Arguments] ${context_id} ${content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Set Headers {"Content-Length":"0"} + Put /exampleAPI/mx2/v2/app_contexts/${context_id} ${content} + ${output}= Output response + Set Suite Variable ${response} ${output} diff --git a/MEO/UEAPPCTX/environment/variables.txt b/MEO/UEAPPCTX/environment/variables.txt index 885de58c36946da94d8f9f9a290cdcc5251b378a..b1261d25479c525b4934909d2cd24c1fd20104cf 100644 --- a/MEO/UEAPPCTX/environment/variables.txt +++ b/MEO/UEAPPCTX/environment/variables.txt @@ -4,3 +4,10 @@ ${MEC-APP_SCHEMA} http #${MEC-APP_HOST} 127.0.0.1 ${MEC-APP_HOST} 192.168.56.1 ${MEC-APP_PORT} 8081 +${APP_CTX_ID} appCtx01 +${UE_APP_ID} ueIdAppCtx01 +${APP_NAME} MyWornderfulApp +${WRONG_CREATE_APP_CTX} UnknownApp +${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" } } diff --git a/MEO/UEAPPCTX/resources/UEAppInterfaceAPI.robot b/MEO/UEAPPCTX/resources/UEAppInterfaceAPI.robot deleted file mode 100644 index 0397c0489896f25f749b0eb839f4723e698aaab6..0000000000000000000000000000000000000000 --- a/MEO/UEAPPCTX/resources/UEAppInterfaceAPI.robot +++ /dev/null @@ -1,9 +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 *** diff --git a/MEO/UEAPPCTX/resources/UeAppsContextAPI.robot b/MEO/UEAPPCTX/resources/UeAppsContextAPI.robot new file mode 100644 index 0000000000000000000000000000000000000000..b99735028da27926b5bbd2c1aa854113e337ca38 --- /dev/null +++ b/MEO/UEAPPCTX/resources/UeAppsContextAPI.robot @@ -0,0 +1,23 @@ +*** 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 *** +Create an application context + 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_contexts ${CREATE_APP_CTX} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is AppContext + Set Suite Variable ${APP_CTX_ID} ${response['body']['contextId'] + Should Not Be Empty ${APP_CTX_ID} diff --git a/SRV/BWA/PlatBandwidthManager.robot b/SRV/BWA/PlatBandwidthManager.robot index 752130bd21679d1f92adf04f15a80e658b367c7f..315c5840a43d5bc39836c536d26d77b7fa5de632 100644 --- a/SRV/BWA/PlatBandwidthManager.robot +++ b/SRV/BWA/PlatBandwidthManager.robot @@ -209,8 +209,8 @@ Request to unregister bandwidth Management Service Request to unregister bandwidth Management Service with wrong parameters - [Documentation] TC_MEC_SRV_BWA_006_OK - ... Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application + [Documentation] TC_MEC_SRV_BWA_006_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 015 V1.1.1, clause 8.3.3.5 ... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json # Preamble