diff --git a/MEC011/SRV/APPSUB/environment/variables.txt b/MEC011/SRV/APPSUB/environment/variables.txt index c66b1e95290f06a0c6074ab0d3d76bd71ad9ae6b..aa73f74a718606a20482d652acc663cc5f63ee71 100644 --- a/MEC011/SRV/APPSUB/environment/variables.txt +++ b/MEC011/SRV/APPSUB/environment/variables.txt @@ -18,7 +18,7 @@ ${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 - +${SUB_ID} # ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription @@ -34,4 +34,4 @@ ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID # ${callback_endpoint} /amsi/subscriptions # ${callback_endpoint_error} /subs_404 # ${total_polling_time} 2 min -# ${polling_interval} 10 sec \ No newline at end of file +# ${polling_interval} 10 sec diff --git a/MEC011/SRV/LIV/Liveness.robot b/MEC011/SRV/MLS/Liveness.robot similarity index 70% rename from MEC011/SRV/LIV/Liveness.robot rename to MEC011/SRV/MLS/Liveness.robot index 72fd4bac08c2d69ed98f07559532b13e20988399..7dbf1ad70fc2a74423925ef9bb0879de0f4de82c 100644 --- a/MEC011/SRV/LIV/Liveness.robot +++ b/MEC011/SRV/MLS/Liveness.robot @@ -10,8 +10,7 @@ Library OperatingSystem *** Test Cases *** - -TP_MEC_MEC011_SRV_MSL_001_OK +TC_MEC_MEC011_SRV_MSL_001_OK [Documentation] ... Check that the IUT responds with the liveness of a MEC service instance ... when queried by a MEC Application @@ -19,13 +18,14 @@ TP_MEC_MEC011_SRV_MSL_001_OK ... "ETSI GS MEC 011 3.2.1, clause 8.1.2.4", ... "ETSI GS MEC 011 3.2.1, clause 8.2.10.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES - Individual MEC service liveness ${URL_SERVICE_MEC_LIVENESS} + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} + Individual MEC service liveness ${LIVENESS_URI} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceLivenessInfo Check Response Contains ${response['body']} state ACTIVE - - -TP_MEC_MEC011_SRV_MSL_001_NF + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SERVICE_NAME} + +TC_MEC_MEC011_SRV_MSL_001_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an URI that cannot be mapped to a valid resource URI @@ -38,7 +38,7 @@ TP_MEC_MEC011_SRV_MSL_001_NF Check HTTP Response Status Code Is 404 -TP_MEC_MEC011_SRV_MSL_002_OK_01 +TC_MEC_MEC011_SRV_MSL_002_OK_01 [Documentation] ... Check that the IUT updates the liveness of a MEC service instance ... when requested by a MEC Application @@ -49,13 +49,15 @@ TP_MEC_MEC011_SRV_MSL_002_OK_01 Set Headers {"Authorization":"${TOKEN}"} ${file}= Catenate SEPARATOR= jsons/ ServiceLivenessUpdate .json ${body}= Get File ${file} + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} Update MEC service liveness ${URL_SERVICE_MEC_LIVENESS} ${body} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceLivenessInfo Check Response Contains ${response['body']} state ACTIVE + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SERVICE_NAME} -TP_MEC_MEC011_SRV_MSL_002_OK_02 +TC_MEC_MEC011_SRV_MSL_002_OK_02 [Documentation] ... Check that the IUT updates the liveness of a MEC service instance ... when requested by a MEC Application @@ -71,7 +73,7 @@ TP_MEC_MEC011_SRV_MSL_002_OK_02 Check HTTP Response Status Code Is 204 -TP_MEC_MEC011_SRV_MSL_002_BR +TC_MEC_MEC011_SRV_MSL_002_BR [Documentation] ... Check that the IUT responds with an error when ... incorrect parameters were sent by a MEC Application @@ -88,6 +90,32 @@ TP_MEC_MEC011_SRV_MSL_002_BR *** Keywords *** +Create new service + [Arguments] ${content} ${appInstanceId} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + #Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + POST http://${HOST_APP_SAQ}:${PORT_APP_SAQ}/${apiRoot_APP_SAQ}${apiName_APP_SAQ}/${apiVersion_APP_SAQ}/applications/${appInstanceId}/services ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + Set Suite Variable ${LIVENESS_URI} ${response['body']['_links']['liveness']['href']} + Set Suite Variable ${SERVICE_NAME} ${response['body']['serName']} + + + +Remove individual service + [Arguments] ${appInstanceId} ${serviceName} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Set Headers {"Content-Type":"*/*"} + DELETE http://${HOST_APP_SAQ}:${PORT_APP_SAQ}/${apiRoot_APP_SAQ}${apiName_APP_SAQ}/${apiVersion_APP_SAQ}/applications/${appInstanceId}/services/${serviceName} + ${output}= Output response + Set Suite Variable ${response} ${output} + + Individual MEC service liveness [Arguments] ${URL_MEC_SERVICE_LIVENESS} Set Headers {"Accept":"application/json"} diff --git a/MEC011/SRV/LIV/README.md b/MEC011/SRV/MLS/README.md similarity index 100% rename from MEC011/SRV/LIV/README.md rename to MEC011/SRV/MLS/README.md diff --git a/MEC011/SRV/LIV/environment/variables.txt b/MEC011/SRV/MLS/environment/variables.txt similarity index 59% rename from MEC011/SRV/LIV/environment/variables.txt rename to MEC011/SRV/MLS/environment/variables.txt index eb2e7bfe021e0f7c21f03c4e1b5b06b723310e36..c421169fe919e840c9c3f0300efe89e5b3caccfe 100644 --- a/MEC011/SRV/LIV/environment/variables.txt +++ b/MEC011/SRV/MLS/environment/variables.txt @@ -9,4 +9,14 @@ ${apiRoot} # Specific variables ${URL_SERVICE_MEC_LIVENESS} /link/to/individual/mecServiceLiveness -${NOT_EXISING_URL_SERVICE_MEC_LIVENESS} /not_existing_link/to/individual/mecServiceLiveness \ No newline at end of file +${NOT_EXISING_URL_SERVICE_MEC_LIVENESS} /not_existing_link/to/individual/mecServiceLiveness + + +#Variables for test setups and teardowns +${HOST_APP_SAQ} 127.0.0.1 +${PORT_APP_SAQ} 8082 +${apiRoot_APP_SAQ} +${apiName_APP_SAQ} mec_service_mgmt +${apiVersion_APP_SAQ} v1 +${APP_INSTANCE_ID} appInstanceId +${SERVICE_NAME} diff --git a/MEC011/SRV/MLS/jsons/ServiceInfo.json b/MEC011/SRV/MLS/jsons/ServiceInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..1cc5adf0fdf9a457da473ac49f1422925478a5c0 --- /dev/null +++ b/MEC011/SRV/MLS/jsons/ServiceInfo.json @@ -0,0 +1,8 @@ +{ + "serName": "serviceName", + "version": "0.1", + "state": "INACTIVE", + "serializer": "XML", + "serInstanceId": "3F897E85-ABCD-FFFF-A957-FCF0CCE649FD", + "transportId": "transportId" +} \ No newline at end of file diff --git a/MEC011/SRV/LIV/jsons/ServiceLivenessUpdate.json b/MEC011/SRV/MLS/jsons/ServiceLivenessUpdate.json similarity index 100% rename from MEC011/SRV/LIV/jsons/ServiceLivenessUpdate.json rename to MEC011/SRV/MLS/jsons/ServiceLivenessUpdate.json diff --git a/MEC011/SRV/LIV/jsons/ServiceLivenessUpdateError.json b/MEC011/SRV/MLS/jsons/ServiceLivenessUpdateError.json similarity index 100% rename from MEC011/SRV/LIV/jsons/ServiceLivenessUpdateError.json rename to MEC011/SRV/MLS/jsons/ServiceLivenessUpdateError.json diff --git a/MEC011/SRV/LIV/schemas/ServiceLivenessInfo.schema.json b/MEC011/SRV/MLS/schemas/ServiceLivenessInfo.schema.json similarity index 100% rename from MEC011/SRV/LIV/schemas/ServiceLivenessInfo.schema.json rename to MEC011/SRV/MLS/schemas/ServiceLivenessInfo.schema.json diff --git a/MEC011/SRV/REGAPPS/RegApps.robot b/MEC011/SRV/REGAPPS/RegApps.robot index 6efdd8821b4ca2ad2d647945fca352772d3bab78..a7e64dd6f5b006d202d76583eebcb79d27580d8e 100644 --- a/MEC011/SRV/REGAPPS/RegApps.robot +++ b/MEC011/SRV/REGAPPS/RegApps.robot @@ -12,13 +12,12 @@ Default Tags TC_MEC_SRV_REGAPPS *** Test Cases *** - -TP_MEC_MEC011_SRV_REGAPPS_001_OK_01 +TC_MEC_MEC011_SRV_REGAPPS_001_OK_01 [Documentation] ... Check that the IUT acknowledges the registration ... by a MEC Application to the MEC platform ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.13.3.4 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.13.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create a new MEC application instance profile AppInfo @@ -26,108 +25,116 @@ TP_MEC_MEC011_SRV_REGAPPS_001_OK_01 Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is AppInfo Check Response Contains ${response['body']} appName ${APP_NAME} - + [TearDown] Delete MEC application instance profile ${response['body']['appInstanceId']} -TP_MEC_MEC011_SRV_REGAPPS_001_OK_02 +TC_MEC_MEC011_SRV_REGAPPS_001_OK_02 [Documentation] ... Check that the IUT acknowledges the registration ... by a MEC Application to the MEC platform ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.13.3.4 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.13.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create a new MEC application instance profile AppInfo2 + ${APP_INSTANCE_ID_REQ} Get value entry from JSON file AppInfo2 appInstanceId Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is AppInfo Check Response Contains ${response['body']} appName ${APP_NAME} - Check Response Contains ${response['body']} appInstanceId ${APP_INSTANCE_ID} + Check Response Contains ${response['body']} appInstanceId ${APP_INSTANCE_ID_REQ} + [TearDown] Delete MEC application instance profile ${APP_INSTANCE_ID_REQ} + -TP_MEC_MEC011_SRV_REGAPPS_001_OK_03 +TC_MEC_MEC011_SRV_REGAPPS_001_OK_03 [Documentation] ... Check that the IUT acknowledges the registration ... by a MEC Application to the MEC platform ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.13.3.4 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.13.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create a new MEC application instance profile AppInfo3 + ${APP_INSTANCE_ID_REQ} Get value entry from JSON file AppInfo3 appInstanceId + ${APPD_NAME_REQ} Get value entry from JSON file AppInfo3 appName + ${APPD_ID_REQ} Get value entry from JSON file AppInfo3 appDId + Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is AppInfo Check Response Contains ${response['body']} appName ${APP_NAME} - Check Response Contains ${response['body']} appInstanceId ${APP_INSTANCE_ID} - Check Response Contains ${response['body']} appDId ${APPD_ID} - + Check Response Contains ${response['body']} appInstanceId ${APP_INSTANCE_ID_REQ} + Check Response Contains ${response['body']} appDId ${APPD_ID_REQ} + [TearDown] Delete MEC application instance profile ${APP_INSTANCE_ID_REQ} + -TP_MEC_MEC011_SRV_REGAPPS_001_BR_01 +TC_MEC_MEC011_SRV_REGAPPS_001_BR_01 [Documentation] ... Check that the IUT responds with an error message when the IUT received a registration with ... missing fields from a MEC Application instantiated by the MEC platform ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.13.3.4 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.13.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create a new MEC application instance profile AppInfoBR1 Check HTTP Response Status Code Is 400 -TP_MEC_MEC011_SRV_REGAPPS_001_BR_02 +TC_MEC_MEC011_SRV_REGAPPS_001_BR_02 [Documentation] ... Check that the IUT responds with an error message ... when the IUT received by a MEC Application registration with missing endpoint ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.13.3.4 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.13.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create a new MEC application instance profile AppInfoBR2 Check HTTP Response Status Code Is 400 -TP_MEC_MEC011_SRV_REGAPPS_001_BR_03 +TC_MEC_MEC011_SRV_REGAPPS_001_BR_03 [Documentation] ... Check that the IUT responds with an error message when the IUT received by a ... MEC Application registration with unexpected appServiceRequired ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.13.3.4 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.13.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create a new MEC application instance profile AppInfoBR3 Check HTTP Response Status Code Is 400 -TP_MEC_MEC011_SRV_REGAPPS_001_BR_04 +TC_MEC_MEC011_SRV_REGAPPS_001_BR_04 [Documentation] ... Check that the IUT responds with an error message when the IUT received by a ... MEC Application registration with unexpected appServiceRequired ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.13.3.4 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.13.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create a new MEC application instance profile AppInfoBR4 Check HTTP Response Status Code Is 400 -TP_MEC_MEC011_SRV_REGAPPS_001_BR_05 +TC_MEC_MEC011_SRV_REGAPPS_001_BR_05 [Documentation] ... Check that the IUT responds with an error message when the IUT received by a ... MEC Application registration with unexpected appFeatureRequired ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.13.3.4 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.13.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create a new MEC application instance profile AppInfoBR5 Check HTTP Response Status Code Is 400 -TP_MEC_MEC011_SRV_REGAPPS_001_BR_06 +TC_MEC_MEC011_SRV_REGAPPS_001_BR_06 [Documentation] ... Check that the IUT responds with an error message when the IUT received by a ... MEC Application registration with unexpected appFeatureOptional ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.13.3.4 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.13.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create a new MEC application instance profile AppInfoBR6 @@ -135,80 +142,90 @@ TP_MEC_MEC011_SRV_REGAPPS_001_BR_06 -TP_MEC_MEC011_SRV_REGAPPS_002_OK +TC_MEC_MEC011_SRV_REGAPPS_002_OK [Documentation] ... Check that the IUT responds with the AppInfo description ... when queried by a MEC Application ... - ... ETSI GS MEC 011 3.1.1, clause 7.2.14.3.1 + ... ETSI GS MEC 011 3.2.1, clause 7.2.14.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES - Get MEC application instance profile ${APP_INSTANCE_ID} + [Setup] Create a new MEC application instance profile AppInfo + Set Suite Variable ${APP_INSTANCE_ID} ${response['body']['appInstanceId']} + Get MEC application instance profile ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppInfo Check Response Contains ${response['body']} appInstanceId ${APP_INSTANCE_ID} - + [TearDown] Delete MEC application instance profile ${APP_INSTANCE_ID} -TP_MEC_MEC011_SRV_REGAPPS_002_NF +TC_MEC_MEC011_SRV_REGAPPS_002_NF [Documentation] ... Check that the IUT responds with an error ... when it receives a request for returning an AppInfo with a wrong ID ... - ... ETSI GS MEC 011 3.1.1, clause 7.2.14.3.1 + ... ETSI GS MEC 011 3.2.1, clause 7.2.14.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Delete MEC application instance profile ${NOT_EXISTING_APP_INSTANCE_ID} Get MEC application instance profile ${NOT_EXISTING_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_MEC011_SRV_REGAPPS_003_OK +TC_MEC_MEC011_SRV_REGAPPS_003_OK [Documentation] ... Check that the IUT responds with 204 No Content ... when queried to update MEC Application registration ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.14.3.2 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.14.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application instance profile AppInfo + Set Suite Variable ${APP_INSTANCE_ID} ${response['body']['appInstanceId']} Update MEC application registration ${APP_INSTANCE_ID} AppInfoUpdate Check HTTP Response Status Code Is 204 + [TearDown] Delete MEC application instance profile ${APP_INSTANCE_ID} + - -TP_MEC_MEC011_SRV_REGAPPS_003_NF +TC_MEC_MEC011_SRV_REGAPPS_003_NF [Documentation] ... Check that the IUT responds with 204 No Content ... when queried to update MEC Application registration ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.14.3.2 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.14.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Delete MEC application instance profile ${NOT_EXISTING_APP_INSTANCE_ID} Update MEC application registration ${NOT_EXISTING_APP_INSTANCE_ID} AppInfoUpdate Check HTTP Response Status Code Is 404 -TP_MEC_MEC011_SRV_REGAPPS_004_OK +TC_MEC_MEC011_SRV_REGAPPS_004_OK [Documentation] ... Check that the IUT responds with 204 No Content ... when queried to delete an existing MEC Application registration ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.14.3.5 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.14.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application instance profile AppInfo + Set Suite Variable ${APP_INSTANCE_ID} ${response['body']['appInstanceId']} Delete MEC application instance profile ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 204 -TP_MEC_MEC011_SRV_REGAPPS_004_NF +TC_MEC_MEC011_SRV_REGAPPS_004_NF [Documentation] ... Check that the IUT responds with an error when queried to ... delete an unknown MEC Application registration ... - ... Reference ETSI GS MEC 011 3.1.1, clause 7.2.14.3.5 + ... Reference ETSI GS MEC 011 3.2.1, clause 7.2.14.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Delete MEC application instance profile ${NOT_EXISTING_APP_INSTANCE_ID} Delete MEC application instance profile ${NOT_EXISTING_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 @@ -255,8 +272,6 @@ Update MEC application registration Set Suite Variable ${response} ${output} - - Delete MEC application instance profile [Arguments] ${app_instance_id} Set Headers {"Accept":"application/json"} diff --git a/MEC011/SRV/REGAPPS/jsons/ServiceInfo.json b/MEC011/SRV/REGAPPS/jsons/ServiceInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..1cc5adf0fdf9a457da473ac49f1422925478a5c0 --- /dev/null +++ b/MEC011/SRV/REGAPPS/jsons/ServiceInfo.json @@ -0,0 +1,8 @@ +{ + "serName": "serviceName", + "version": "0.1", + "state": "INACTIVE", + "serializer": "XML", + "serInstanceId": "3F897E85-ABCD-FFFF-A957-FCF0CCE649FD", + "transportId": "transportId" +} \ No newline at end of file diff --git a/MEC011/SRV/SAQ/PlatServices.robot b/MEC011/SRV/SAQ/PlatServices.robot index c69934095b9ed642345ea42e7d79d6ce5538513a..72142b6ef51c43a8eb69368e51343985f1154ebf 100644 --- a/MEC011/SRV/SAQ/PlatServices.robot +++ b/MEC011/SRV/SAQ/PlatServices.robot @@ -13,8 +13,7 @@ Default Tags TC_MEC_SRV_SAQ *** Test Cases *** - -TP_MEC_MEC011_SRV_SAQ_001_OK +TC_MEC_MEC011_SRV_SAQ_001_OK [Documentation] ... Check that the IUT responds with a list of available MEC services ... when queried by a MEC Application @@ -24,12 +23,15 @@ TP_MEC_MEC011_SRV_SAQ_001_OK ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.3.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} + ${SER_NAME} Get value entry from JSON file ServiceInfo serName Get list of available MEC services Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfoList + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SER_NAME} + - -TP_MEC_MEC011_SRV_SAQ_001_BR +TC_MEC_MEC011_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 @@ -39,11 +41,14 @@ TP_MEC_MEC011_SRV_SAQ_001_BR ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.3.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} + ${SER_NAME} Get value entry from JSON file ServiceInfo serName Get list of available MEC services with parameters instance_id ${INVALID_VALUE} Check HTTP Response Status Code Is 400 + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SER_NAME} -TP_MEC_MEC011_SRV_SAQ_002_OK +TC_MEC_MEC011_SRV_SAQ_002_OK [Documentation] ... Check that the IUT responds with the information on a specific service ... when queried by a MEC Application @@ -52,13 +57,15 @@ TP_MEC_MEC011_SRV_SAQ_002_OK ... "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", ... "ETSI GS MEC 011 3.2.1, clause 8.2.4.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES - Get specific MEC service ${SERVICE_ID} + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} + ${SER_NAME} Get value entry from JSON file ServiceInfo serName + Get specific MEC service ${response['body']['serInstanceId']} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfo - Check Response Contains ${response['body']} serInstanceId ${SERVICE_ID} - + Check Response Contains ${response['body']} serInstanceId ${response['body']['serInstanceId']} + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SER_NAME} -TP_MEC_MEC011_SRV_SAQ_002_NF +TC_MEC_MEC011_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 @@ -67,11 +74,35 @@ TP_MEC_MEC011_SRV_SAQ_002_NF ... "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", ... "ETSI GS MEC 011 3.2.1, clause 8.2.4.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID} Get specific MEC service ${NON_EXISTENT_SERVICE_ID} Check HTTP Response Status Code Is 404 *** Keywords *** +Create new service + [Arguments] ${content} ${appInstanceId} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + #Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + POST http://${HOST_APP_SAQ}:${PORT_APP_SAQ}/${apiRoot_APP_SAQ}${apiName_APP_SAQ}/${apiVersion_APP_SAQ}/applications/${appInstanceId}/services ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + Set Suite Variable ${SERVICE_NAME} ${response['body']['serName']} + +Remove individual service + [Arguments] ${appInstanceId} ${serviceName} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Set Headers {"Content-Type":"*/*"} + DELETE http://${HOST_APP_SAQ}:${PORT_APP_SAQ}/${apiRoot_APP_SAQ}${apiName_APP_SAQ}/${apiVersion_APP_SAQ}/applications/${appInstanceId}/services/${serviceName} + ${output}= Output response + Set Suite Variable ${response} ${output} + + Get list of available MEC services with parameters [Arguments] ${key}=None ${value}=None Set Headers {"Accept":"application/json"} diff --git a/MEC011/SRV/SAQ/environment/variables.txt b/MEC011/SRV/SAQ/environment/variables.txt index f7395c22e165f98e5eb859ebe079705ce05f2d30..633b86cd79cd03f371298654077e96a7960896eb 100644 --- a/MEC011/SRV/SAQ/environment/variables.txt +++ b/MEC011/SRV/SAQ/environment/variables.txt @@ -2,7 +2,7 @@ # Generic variables ${SCHEMA} http ${HOST} 127.0.0.1 -${PORT} 8081 +${PORT} 8082 ${response} {} ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l ${apiRoot} @@ -38,4 +38,13 @@ ${INVALID_ETAG} INVALID_ETAG # ${callback_endpoint} /amsi/subscriptions # ${callback_endpoint_error} /subs_404 # ${total_polling_time} 2 min -# ${polling_interval} 10 sec \ No newline at end of file +# ${polling_interval} 10 sec + +#Variables for test setups and teardowns +${HOST_APP_SAQ} 127.0.0.1 +${PORT_APP_SAQ} 8082 +${apiRoot_APP_SAQ} +${apiName_APP_SAQ} mec_service_mgmt +${apiVersion_APP_SAQ} v1 +${APP_INSTANCE_ID} appInstanceId +${SERVICE_NAME} \ No newline at end of file diff --git a/MEC011/SRV/SAQ/jsons/ServiceInfo.json b/MEC011/SRV/SAQ/jsons/ServiceInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..1cc5adf0fdf9a457da473ac49f1422925478a5c0 --- /dev/null +++ b/MEC011/SRV/SAQ/jsons/ServiceInfo.json @@ -0,0 +1,8 @@ +{ + "serName": "serviceName", + "version": "0.1", + "state": "INACTIVE", + "serializer": "XML", + "serInstanceId": "3F897E85-ABCD-FFFF-A957-FCF0CCE649FD", + "transportId": "transportId" +} \ No newline at end of file diff --git a/MEC011/SRV/SRVSUB/PlatSrvSubscriptions.robot b/MEC011/SRV/SRVSUB/PlatSrvSubscriptions.robot index 1c9edc801fe7d4bee478275124d3bd74003c366e..b1cd77d70855e2762fd1c7e34039c41a6ca8c461 100644 --- a/MEC011/SRV/SRVSUB/PlatSrvSubscriptions.robot +++ b/MEC011/SRV/SRVSUB/PlatSrvSubscriptions.robot @@ -7,120 +7,180 @@ Resource ../../../GenericKeywords.robot Resource environment/variables.txt Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false Library OperatingSystem - +Library String Default Tags TC_MEC_SRV_SRVSUB *** Test Cases *** -TP_MEC_MEC011_SRV_SRVSUB_001_OK +TC_MEC_MEC011_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.2.1, clause 8.2.8.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/MecServiceMgmtApiSubscriptionLinkList - - [Tags] PIC_MEC_PLAT PIC_SERVICES + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.3", + ... "ETSI GS MEC 011 3.2.1, clause 8.2.8.3.1" + [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application instance profile and create subscription AppInfo SerAvailabilityNotificationSubscription Get list of subscriptions ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SubscriptionLinkList + [TearDown] Remove subscription and Delete MEC application instance profile ${SUB_ID} ${APP_INSTANCE_ID} -TP_MEC_MEC011_SRV_SRVSUB_001_NF +TC_MEC_MEC011_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.2.1, clause 8.2.8.3.1 + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.3", + ... "ETSI GS MEC 011 3.2.1, clause 8.2.8.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Remove MEC application ${NON_EXISTENT_INSTANCE_ID} Get list of subscriptions ${NON_EXISTENT_INSTANCE_ID} Check HTTP Response Status Code Is 404 - -TP_MEC_MEC011_SRV_SRVSUB_002_OK +TC_MEC_MEC011_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.2.1, clause 8.2.8.3.4 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/SerAvailabilityNotificationSubscription - + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.3", + ... "ETSI GS MEC 011 3.2.1, clause 8.2.8.3.4" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application AppInfo Create a new subscription ${APP_INSTANCE_ID} SerAvailabilityNotificationSubscription + ${APP_SRVSUB_NOTIF_CALLBACK_URI} Get value entry from JSON file SerAvailabilityNotificationSubscription callbackReference + ${SUB_TYPE} Get value entry from JSON file SerAvailabilityNotificationSubscription subscriptionType + Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is SerAvailabilityNotificationSubscription Check HTTP Response Header Contains Location - Check Response Contains ${response['body']} subscriptionType SerAvailabilityNotificationSubscription - Check Response Contains ${response['body']} callbackReference ${APP_SRVSUB_NOTIF_CALLBACK_URI} - + Check Response Contains ${response['body']} subscriptionType ${SUB_TYPE} + Check Response Contains ${response['body']} callbackReference ${APP_SRVSUB_NOTIF_CALLBACK_URI} + [TearDown] Remove MEC application ${APP_INSTANCE_ID} + -TP_MEC_MEC011_SRV_SRVSUB_002_BR +TC_MEC_MEC011_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.2.1, clause 8.2.8.3.4 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/SerAvailabilityNotificationSubscription - + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.3", + ... "ETSI GS MEC 011 3.2.1, clause 8.2.8.3.4" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application AppInfo Create a new subscription ${APP_INSTANCE_ID} SerAvailabilityNotificationSubscriptionError Check HTTP Response Status Code Is 400 + [TearDown] Remove MEC application ${APP_INSTANCE_ID} -TP_MEC_MEC011_SRV_SRVSUB_003_OK +TC_MEC_MEC011_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.2.1, clause 8.2.9.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/SerAvailabilityNotificationSubscription - + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.3", + ... "ETSI GS MEC 011 3.2.1, clause 8.2.9.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES - Get individual subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} + [Setup] Create a new MEC application instance profile and create subscription AppInfo SerAvailabilityNotificationSubscription + + Get individual subscription ${APP_INSTANCE_ID} ${SUB_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SerAvailabilityNotificationSubscription Check Response Contains ${response['body']} subscriptionType SerAvailabilityNotificationSubscription + [TearDown] Remove subscription and Delete MEC application instance profile ${SUB_ID} ${APP_INSTANCE_ID} -TP_MEC_MEC011_SRV_SRVSUB_003_NF + + +TC_MEC_MEC011_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.2.1, clause 8.2.9.3.1 - + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.3", + ... "ETSI GS MEC 011 3.2.1, clause 8.2.9.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application AppInfo Get individual subscription ${APP_INSTANCE_ID} ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 + [TearDown] Remove MEC application ${APP_INSTANCE_ID} - -TP_MEC_MEC011_SRV_SRVSUB_004_OK +TC_MEC_MEC011_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.2.1, clause 8.2.9.3.5 - + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.3", + ... "ETSI GS MEC 011 3.2.1, clause 8.2.9.3.5" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application instance profile and create subscription AppInfo SerAvailabilityNotificationSubscription Remove subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_MEC011_SRV_SRVSUB_004_NF +TC_MEC_MEC011_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.2.1, clause 8.2.9.3.5 - + ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", + ... "ETSI GS MEC 011 3.2.1, clause 8.1.3", + ... "ETSI GS MEC 011 3.2.1, clause 8.2.9.3.5" [Tags] PIC_MEC_PLAT PIC_SERVICES + [TearDown] Remove MEC application ${NON_EXISTENT_INSTANCE_ID} Remove subscription ${NON_EXISTENT_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 *** Keywords *** + +Create a new MEC application + [Arguments] ${reg_app_content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + #Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${reg_app_content} .json + ${body}= Get File ${file} + POST http://${HOST_REGAPP}:${PORT_REGAPP}${apiRoot_REGAPP}/${apiName_REGAPP}/${apiVersion_REGAPP}/registrations ${body} + ${output}= Output response + Set Suite Variable ${APP_INSTANCE_ID} ${output['body']['appInstanceId']} + +Remove MEC application + [Arguments] ${app_instance_id} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + #Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + DELETE http://${HOST_REGAPP}:${PORT_REGAPP}${apiRoot_REGAPP}/${apiName_REGAPP}/${apiVersion_REGAPP}/registrations/${app_instance_id} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Create a new MEC application instance profile and create subscription + [Arguments] ${reg_app_content} ${sub_content} + Create a new MEC application ${reg_app_content} + Create a new subscription ${APP_INSTANCE_ID} ${sub_content} + ${elements} = Split String ${response['body']['_links']['self']['href']} / + Set Suite Variable ${SUB_ID} ${elements[3]} + + +Remove subscription and Delete MEC application instance profile + [Arguments] ${subscription_id} ${app_instance_id} + Remove subscription ${appInstanceId} ${subscription_id} + Remove MEC application ${app_instance_id} + + Get list of subscriptions [Arguments] ${appInstanceId} Set Headers {"Accept":"application/json"} diff --git a/MEC011/SRV/SRVSUB/environment/variables.txt b/MEC011/SRV/SRVSUB/environment/variables.txt index 0e357a5e786a2c028d819cc5b9e6db72f2100899..270fc5facdea009550206de22b705474b84348b4 100644 --- a/MEC011/SRV/SRVSUB/environment/variables.txt +++ b/MEC011/SRV/SRVSUB/environment/variables.txt @@ -2,7 +2,7 @@ # Generic variables ${SCHEMA} http ${HOST} 127.0.0.1 -${PORT} 8081 +${PORT} 8082 ${response} {} ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l ${apiRoot} @@ -15,3 +15,12 @@ ${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 + + +##Registration app setup test case variables +${HOST_REGAPP} 127.0.0.1 +${PORT_REGAPP} 8081 +${apiRoot_REGAPP} +${apiName_REGAPP} mec_app_support +${apiVersion_REGAPP} v2 + diff --git a/MEC011/SRV/SRVSUB/jsons/AppInfo.json b/MEC011/SRV/SRVSUB/jsons/AppInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..31c905302a44648da418bf3bcf78f81f8f38eda4 --- /dev/null +++ b/MEC011/SRV/SRVSUB/jsons/AppInfo.json @@ -0,0 +1,3 @@ +{ + "appName": "sampleAppName" +} \ No newline at end of file diff --git a/MEC011/SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscriptionError.json b/MEC011/SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscriptionError.json index 7e7e1567d672490a0306b47ad7758b52081667f4..8b315cbb510bbe2947dd51273947e1ae115effc0 100644 --- a/MEC011/SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscriptionError.json +++ b/MEC011/SRV/SRVSUB/jsons/SerAvailabilityNotificationSubscriptionError.json @@ -1,5 +1,5 @@ { - "subscription": "SerAvailabilityNotificationSubscription", + "subscriptionType": "INVALID_SUBSCRIPTION", "callbackReference": "http://127.0.0.1/subscribe", "_links": { "self": { diff --git a/MEC011/SRV/TIME/PlatTiming.robot b/MEC011/SRV/TIME/PlatTiming.robot index e93be9e9bbc261bfde74b56a6858a7aac291ea95..f34e261c9ec29acabffade134bbdaf784ad2af87 100644 --- a/MEC011/SRV/TIME/PlatTiming.robot +++ b/MEC011/SRV/TIME/PlatTiming.robot @@ -14,27 +14,26 @@ Default Tags TC_MEC_SRV_TIME *** Test Cases *** -TP_MEC_MEC011_SRV_TIME_001_OK +TC_MEC_MEC011_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.2.1, clause 7.2.5.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TimingCaps - + ... ETSI GS MEC 011 3.2.1, clause 5.2.10.3, + ... ETSI GS MEC 011 3.2.1, clause 7.1.2.4, + ... ETSI GS MEC 011 3.2.1, clause 7.2.5.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES Get time capabilities Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TimingCaps -TP_MEC_MEC011_SRV_TIME_002_OK +TC_MEC_MEC011_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.2.1, clause 7.2.6.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/CurrentTime + ... ETSI GS MEC 011 3.2.1, clause 5.2.10.2, + ... ETSI GS MEC 011 3.2.1, clause 7.1.2.5, + ... ETSI GS MEC 011 3.2.1, clause 7.2.5.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES Get current time diff --git a/MEC011/SRV/TIME/environment/variables.txt b/MEC011/SRV/TIME/environment/variables.txt index 3ae69ae51ee7dc3489e726b5608c5bec284534d5..c4f8c75738e6207c7c8e5b497f4256b6199a9114 100644 --- a/MEC011/SRV/TIME/environment/variables.txt +++ b/MEC011/SRV/TIME/environment/variables.txt @@ -7,7 +7,7 @@ ${response} {} ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l ${apiRoot} ${apiName} mec_app_support -${apiVersion} v1 +${apiVersion} v2 diff --git a/MEC011/SRV/TRAF/PlatTrafficRules.robot b/MEC011/SRV/TRAF/PlatTrafficRules.robot index 1bf634bc7aab8ed9197f95e5e8118b085fe34ed7..cd94ee46edb5c49b33bcf0f704f5881b15c5e07b 100644 --- a/MEC011/SRV/TRAF/PlatTrafficRules.robot +++ b/MEC011/SRV/TRAF/PlatTrafficRules.robot @@ -10,105 +10,144 @@ Library OperatingSystem Default Tags TC_MEC_SRV_TRAF - + *** Test Cases *** -TP_MEC_MEC011_SRV_TRAF_001_OK +TC_MEC_MEC011_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.2.1, clause 7.2.7.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.7, + ... ETSI GS MEC 011 3.2.1, clause 7.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 7.2.7.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application AppInfo Get list of traffic rules ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TrafficRuleList + [TearDown] Remove MEC application ${APP_INSTANCE_ID} -TP_MEC_MEC011_SRV_TRAF_001_NF +TC_MEC_MEC011_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.2.1, clause 7.2.8.3.1 + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.7, + ... ETSI GS MEC 011 3.2.1, clause 7.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 7.2.7.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES + [TearDown] Remove MEC application ${NON_EXISTENT_APP_INSTANCE_ID} Get list of traffic rules ${NON_EXISTENT_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_MEC011_SRV_TRAF_002_OK +TC_MEC_MEC011_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.2.1, clause 7.2.8.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule - + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.7, + ... ETSI GS MEC 011 3.2.1, clause 7.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 7.2.8.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application AppInfo + 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 Response Contains ${response['body']} trafficRuleId ${TRAFFIC_RULE_ID} + [TearDown] Remove MEC application ${APP_INSTANCE_ID} - -TP_MEC_MEC011_SRV_TRAF_003_OK +TC_MEC_MEC011_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.2.1, clause 7.2.8.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule - + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.7, + ... ETSI GS MEC 011 3.2.1, clause 7.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 7.2.8.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application AppInfo + ${TRAFFIC_RULE_ID} Get value entry from JSON file TrafficRuleUpdate trafficRuleId 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 Response Contains ${response['body']} trafficRuleId ${TRAFFIC_RULE_ID} Check Response Contains ${response['body']} action DROP + [TearDown] Remove MEC application ${APP_INSTANCE_ID} - -TP_MEC_MEC011_SRV_TRAF_003_BR +TC_MEC_MEC011_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.2.1, clause 7.2.8.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule - + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.7, + ... ETSI GS MEC 011 3.2.1, clause 7.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 7.2.8.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application AppInfo Update a traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdateError Check HTTP Response Status Code Is 400 + [TearDown] Remove MEC application ${APP_INSTANCE_ID} -TP_MEC_MEC011_SRV_TRAF_003_NF +TC_MEC_MEC011_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.2.1, clause 7.2.8.3.2 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule - + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.7", + ... ETSI GS MEC 011 3.2.1, clause 7.1.2.2", + ... ETSI GS MEC 011 3.2.1, clause 7.2.8.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application AppInfo Update a traffic rule ${APP_INSTANCE_ID} ${NON_EXISTENT_TRAFFIC_RULE_ID} TrafficRuleUpdate Check HTTP Response Status Code Is 404 + [TearDown] Remove MEC application ${APP_INSTANCE_ID} + -## Commented as ETag is not mandatory -#TP_MEC_MEC011_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.2.1, clause 7.2.8.3.2 -# ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecAppSupportApi.yaml#/definitions/TrafficRule -# -# [Tags] PIC_MEC_PLAT PIC_SERVICES -# Update a traffic rule with invalid etag ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdate -# Check HTTP Response Status Code Is 412 +TC_MEC_MEC011_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 3.2.1, clause 5.2.7, + ... ETSI GS MEC 011 3.2.1, clause 7.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 7.2.8.3.2 + [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create a new MEC application AppInfo + + Update a traffic rule with invalid etag ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdate + Check HTTP Response Status Code Is 412 + [TearDown] Remove MEC application ${APP_INSTANCE_ID} *** Keywords *** +Create a new MEC application + [Arguments] ${reg_app_content} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + #Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${reg_app_content} .json + ${body}= Get File ${file} + POST http://${HOST_REGAPP}:${PORT_REGAPP}${apiRoot_REGAPP}/${apiName_REGAPP}/${apiVersion_REGAPP}/registrations ${body} + ${output}= Output response + Set Suite Variable ${APP_INSTANCE_ID} ${output['body']['appInstanceId']} + +Remove MEC application + [Arguments] ${app_instance_id} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + #Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + DELETE http://${HOST_REGAPP}:${PORT_REGAPP}${apiRoot_REGAPP}/${apiName_REGAPP}/${apiVersion_REGAPP}/registrations/${app_instance_id} + ${output}= Output response + Set Suite Variable ${response} ${output} + Get list of traffic rules [Arguments] ${appInstanceId} Set Headers {"Accept":"application/json"} diff --git a/MEC011/SRV/TRAF/environment/variables.txt b/MEC011/SRV/TRAF/environment/variables.txt index 74db1cc81e0af0957b8ee80fecbea7f24636b718..45190148855412a6314def0c5d43d78ecf7019aa 100644 --- a/MEC011/SRV/TRAF/environment/variables.txt +++ b/MEC011/SRV/TRAF/environment/variables.txt @@ -7,11 +7,18 @@ ${response} {} ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l ${apiRoot} ${apiName} mec_app_support -${apiVersion} v1 +${apiVersion} v2 # Specific variables ${APP_INSTANCE_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f -${NON_EXISTENT_APP_INSTANCE_ID} NON_ESISTENT_APP_INSTANCE_ID +${NON_EXISTENT_APP_INSTANCE_ID} NON_EXISTENT_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 + +##Registration App variables +${HOST_REGAPP} 127.0.0.1 +${PORT_REGAPP} 8082 +${apiRoot_REGAPP} +${apiName_REGAPP} mec_app_support +${apiVersion_REGAPP} v2 \ No newline at end of file diff --git a/MEC011/SRV/TRAF/jsons/AppInfo.json b/MEC011/SRV/TRAF/jsons/AppInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..31c905302a44648da418bf3bcf78f81f8f38eda4 --- /dev/null +++ b/MEC011/SRV/TRAF/jsons/AppInfo.json @@ -0,0 +1,3 @@ +{ + "appName": "sampleAppName" +} \ No newline at end of file diff --git a/MEC011/SRV/TRAF/jsons/TrafficRuleUpdate.json b/MEC011/SRV/TRAF/jsons/TrafficRuleUpdate.json index ed2c8b6f4ce82ee4e4fab7d55ce7e9e58b6070f9..1068a4702d6b4388ce9a2e7312942fbb1ebd8555 100644 --- a/MEC011/SRV/TRAF/jsons/TrafficRuleUpdate.json +++ b/MEC011/SRV/TRAF/jsons/TrafficRuleUpdate.json @@ -87,11 +87,7 @@ "UDP" ], "token": [ - "occaecat", - "reprehenderit esse", - "enim ipsum Lorem", - "nulla ad sed deserunt", - "irure" + "token" ], "srcTunnelAddress": [ "159.20.1.1", diff --git a/MEC011/SRV/TRAF/jsons/TrafficRuleUpdateError.json b/MEC011/SRV/TRAF/jsons/TrafficRuleUpdateError.json index a4af6381a61f2b877caf94db5c425bb1183220ff..cd5b6337c1d85b2d247232961dc19988c453284d 100644 --- a/MEC011/SRV/TRAF/jsons/TrafficRuleUpdateError.json +++ b/MEC011/SRV/TRAF/jsons/TrafficRuleUpdateError.json @@ -1,35 +1,33 @@ { - "trafficRuleId": "elit sint id occaecat mollit", + "trafficRuleId": "traffic_rule_01", "filterType": "FLOW", "priority": 1, "trafficFilter": [ { "srcAddress": [ - "magna tempor do", - "nisi reprehenderit veniam adipisicing", - "sed ut tempor voluptate esse", - "consectetur magna culpa" + "192.168.1.1", + "192.168.2.1", + "192.168.3.1" ], "dstAddress": [ - "dolor dolore", - "Excepteur ut aliquip" + "192.168.1.2", + "192.168.2.2", + "192.168.3.2" ], "srcPort": [ - "et anim", - "nulla in minim ea cillum", - "ipsum sunt quis qui Ut" + "30078", + "1029", + "30089" ], "dstPort": [ - "dolore tempor ut voluptate dolor", - "consequat incididunt ad sed mollit", - "in amet aute non" + "30099", + "30098", + "30097" ], "protocol": [ - "mollit Duis", - "irure ullamco Lorem ex tempor", - "ullamco in dolor incididunt", - "elit ea ad", - "magna officia et ad" + "TCP", + "HTTP", + "UDP" ], "token": [ "occaecat", @@ -39,84 +37,81 @@ "irure" ], "srcTunnelAddress": [ - "ut exercitation", - "ea", - "magna et" + "159.10.1.1", + "159.10.2.1", + "159.10.3.1" ], "tgtTunnelAddress": [ - "et anim aliqua", - "dolor in sint consectetur culpa", - "eu", - "deserunt qui mollit sint commodo" + "159.10.1.2", + "159.10.2.2", + "159.10.3.2" ], "srcTunnelPort": [ - "dolore laborum", - "consequat", - "nostrud nulla", - "est id dolore commodo aliquip", - "qui dolor id dolore" + "5566", + "5567", + "5568" ], "dstTunnelPort": [ - "Ut nostrud Excepteur", - "dolor culpa", - "in", - "incididunt" - ], - "qCI": 22902321, - "dSCP": -86264428, - "tC": -40655175 + "5576", + "5578", + "5579" + ], + "qCI": 1, + "dSCP": 0, + "tC": 1 }, { "srcAddress": [ - "incididunt sit qui", - "laborum dolore voluptate exercitation", - "ut" + "192.157.1.1", + "192.157.2.1", + "192.157.3.1" ], "dstAddress": [ - "pariatur sunt", - "id elit aute ut", - "voluptate", - "irure laboris consectetur ullamco id", - "reprehenderit laborum" + "192.157.1.2", + "192.157.2.2", + "192.157.3.2" ], "srcPort": [ - "nisi tempor ut in", - "culpa sed" + "30078", + "1029", + "30089" ], "dstPort": [ - "amet laboris exercitation voluptate veniam" + "30099", + "30098", + "30097" ], "protocol": [ - "incididunt sint Lorem qui" + "TCP", + "HTTP", + "UDP" ], "token": [ - "sunt", - "veniam labore quis dolor", - "Ut ex esse deserunt" + "token" ], "srcTunnelAddress": [ - "cillum irure incididunt adipisicing", - "Duis officia laboris ea dolor" + "159.20.1.1", + "159.20.2.1", + "159.20.3.1" ], "tgtTunnelAddress": [ - "eu deserunt et", - "cupidatat proident Excepteur nisi", - "consequat fugiat Lorem adipisicing" + "159.20.1.2", + "159.20.2.2", + "159.20.3.2" ], "srcTunnelPort": [ - "velit Lorem cillum ex", - "consectetur in ad", - "officia est adipisicing irure aute" + "5566", + "5567", + "5568" ], "dstTunnelPort": [ - "proident velit Lorem labore do", - "magna sit sed ea", - "cillum", - "nostrud" - ], - "qCI": -69609374, - "dSCP": 46042141, - "tC": 67400065 + "5576", + "5578", + "5579" + ], + "qCI": 2, + "dSCP": 0, + "tC": 4 } ], "action": "UNKNOWN_VALUE", @@ -125,10 +120,10 @@ "interfaceType": "TUNNEL", "tunnelInfo": { "tunnelType": "GTP_U", - "tunnelDstAddress": "est", - "tunnelSrcAddress": "culpa nostrud amet labore" + "tunnelDstAddress": "169.54.61.15", + "tunnelSrcAddress": "169.54.61.31" }, - "srcMacAddress": "esse", - "dstMacAddress": "ut nostrud voluptate ipsum cupidatat" + "srcMacAddress": "fc:3f:2b:42:dc:ba", + "dstMacAddress": "02:42:2c:58:6a:7d" } } \ No newline at end of file diff --git a/MEC011/SRV/TRANS/PlatTransport.robot b/MEC011/SRV/TRANS/PlatTransport.robot index 6dd57cc963be378cac8309ef2c8b7d24824ec7c9..54c4a169f351fab5df965c2412e16420c623abd5 100644 --- a/MEC011/SRV/TRANS/PlatTransport.robot +++ b/MEC011/SRV/TRANS/PlatTransport.robot @@ -13,13 +13,14 @@ Default Tags TC_MEC_SRV_TRANS *** Test Cases *** -TP_MEC_MEC011_SRV_TRANS_001_OK +TC_MEC_MEC011_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.2.1, clause 8.2.5.3.1 - ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/TransportInfo + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.9, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.3, + ... ETSI GS MEC 011 3.2.1, clause 8.2.5.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES Get list of available transports