Commit 6b969b6b authored by piscione's avatar piscione
Browse files

Updated TCs of MEC011 from v2.1.1 to v2.2.1

parent 56281d27
Loading
Loading
Loading
Loading
Loading
+35 −49
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
Documentation
...    A test suite for validating Application Service Availability Query (APPSAQ) operations.

Resource    ../../GenericKeywords.robot
Resource    ../../../GenericKeywords.robot
Resource    environment/variables.txt
Library     REST    ${SCHEMA}://${HOST}:${PORT}    ssl_verify=false

@@ -13,12 +13,12 @@ Default Tags TC_MEC_SRV_APPSAQ

*** Test Cases ***

TC_MEC_SRV_APPSAQ_001_OK
TP_MEC_MEC011_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
    ...
    ...    Reference    ETSI GS MEC 011 V2.1.1, clause 8.2.6.3.1
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.1
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo 

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -28,12 +28,12 @@ TC_MEC_SRV_APPSAQ_001_OK
    Check HTTP Response Body Json Schema Is    ServiceInfoList


TC_MEC_SRV_APPSAQ_001_BR
TP_MEC_MEC011_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
    ...
    ...    Reference    ETSI GS MEC 011 V2.1.1, clause 8.2.6.3.1
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.1

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES

@@ -42,12 +42,12 @@ TC_MEC_SRV_APPSAQ_001_BR
    Check HTTP Response Status Code Is    400


TC_MEC_SRV_APPSAQ_002_OK
TP_MEC_MEC011_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
    ...
    ...    Reference    ETSI GS MEC 011 V2.1.1, clause 8.2.6.3.4
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.4
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -58,12 +58,12 @@ TC_MEC_SRV_APPSAQ_002_OK
    Check Response Contains    ${response['body']}    serName    ${NEW_SERVICE_NAME}


TC_MEC_SRV_APPSAQ_002_BR
TP_MEC_MEC011_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.1.1, clause 8.2.6.3.4
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.4
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -71,12 +71,12 @@ TC_MEC_SRV_APPSAQ_002_BR
    Check HTTP Response Status Code Is    400


TC_MEC_SRV_APPSAQ_002_NF
TP_MEC_MEC011_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.1.1, clause 8.2.6.3.4
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.6.3.4
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -84,12 +84,12 @@ TC_MEC_SRV_APPSAQ_002_NF
    Check HTTP Response Status Code Is    404


TC_MEC_SRV_APPSAQ_003_OK
TP_MEC_MEC011_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.1.1, clause 8.2.7.3.1
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.1
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -99,24 +99,24 @@ TC_MEC_SRV_APPSAQ_003_OK
    Check Response Contains    ${response['body']}    serInstanceId    ${SERVICE_ID}


TC_MEC_SRV_APPSAQ_003_NF
TP_MEC_MEC011_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.1.1, clause 8.2.7.3.1
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.1

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
    Get individual service    ${APP_INSTANCE_ID}    ${NON_EXISTENT_SERVICE_ID}
    Check HTTP Response Status Code Is    404


TC_MEC_SRV_APPSAQ_004_OK
TP_MEC_MEC011_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.1.1, clause 8.2.7.3.2
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.2
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -126,12 +126,12 @@ TC_MEC_SRV_APPSAQ_004_OK
    Check Response Contains    ${response['body']}    version    ${SVC_NEW_VERSION}


TC_MEC_SRV_APPSAQ_004_BR
TP_MEC_MEC011_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.1.1, clause 8.2.7.3.2
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.2
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -139,12 +139,12 @@ TC_MEC_SRV_APPSAQ_004_BR
    Check HTTP Response Status Code Is    400


TC_MEC_SRV_APPSAQ_004_NF
TP_MEC_MEC011_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.1.1, clause 8.2.7.3.2
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.2
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -152,25 +152,12 @@ TC_MEC_SRV_APPSAQ_004_NF
    Check HTTP Response Status Code Is    404


TC_MEC_SRV_APPSAQ_004_PF
    [Documentation]
    ...    Check that the IUT responds with an error when
    ...    a request sent by a MEC Application doesn't comply with a required condition
    ...
    ...    Reference    ETSI GS MEC 011 V2.1.1, clause 8.2.7.3.2
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
    Update service with invalid etag     ${APP_INSTANCE_ID}    ${SERVICE_ID}    ServiceInfoUpdated
    Check HTTP Response Status Code Is    412


TC_MEC_SRV_APPSAQ_005_OK
TP_MEC_MEC011_SRV_APPSAQ_005_OK
    [Documentation]
    ...    Check that the IUT executes the deletion of a service 
    ...    for a given application instance when requested by a MEC Application
    ...
    ...    Reference    ETSI GS MEC 011 V2.1.1, clause 8.2.7.3.1
    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.5
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

   [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -178,13 +165,12 @@ TC_MEC_SRV_APPSAQ_005_OK
    Check HTTP Response Status Code Is    204


TC_MEC_SRV_APPSAQ_005_NF
TP_MEC_MEC011_SRV_APPSAQ_005_NF
    [Documentation]
    ...    Check that the IUT responds with an error when
    ...    a request for deletion of a unknown service is sent by a MEC Application
    ...
    ...    Reference    ETSI GS MEC 011 V2.1.1, clause 8.2.7.3.1

    ...    Reference    ETSI GS MEC 011 V2.2.1, clause 8.2.7.3.5
    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
    Remove individual service    ${APP_INSTANCE_ID}    ${NON_EXISTENT_SERVICE_ID}
    Check HTTP Response Status Code Is    404
@@ -196,6 +182,7 @@ Get a list of mecService of an application instance with parameters
    [Arguments]    ${appInstanceId}    ${key}=None    ${value}=None
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Authorization":"${TOKEN}"}
    Set Headers    {"Content-Type":"*/*"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services?${key}=${value}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
@@ -203,6 +190,7 @@ Get a list of mecService of an application instance with parameters
Get a list of mecService of an application instance
    [Arguments]    ${appInstanceId}
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"*/*"}
    Set Headers    {"Authorization":"${TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services
    ${output}=    Output    response
@@ -213,9 +201,11 @@ 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}
    Log   ${appInstanceId}
    Post    ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
@@ -225,6 +215,7 @@ Get individual service
    [Arguments]    ${appInstanceId}    ${serviceName} 
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Authorization":"${TOKEN}"}
    Set Headers    {"Content-Type":"*/*"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceName}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}  
@@ -234,6 +225,7 @@ Update service
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"application/json"}
    Set Headers    {"Authorization":"${TOKEN}"}
    #Set Headers    {"Content-Type":"*/*"}
    ${file}=    Catenate    SEPARATOR=    jsons/    ${content}    .json
    ${body}=    Get File    ${file}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceId}    ${body}
@@ -241,17 +233,11 @@ Update service
    Set Suite Variable    ${response}    ${output}
    


Update service with invalid etag
    [Arguments]    ${appInstanceId}    ${serviceId}    ${content}
    Set Headers    {"If-Match": ${INVALID_ETAG}}
    Update service    ${appInstanceId}    ${serviceId}    ${content}
    

Remove individual service
    [Arguments]    ${appInstanceId}    ${serviceName} 
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Authorization":"${TOKEN}"}
    Set Headers    {"Content-Type":"*/*"}
    Delete    ${apiRoot}/${apiName}/${apiVersion}/applications/${appInstanceId}/services/${serviceName}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 
+0 −0

File moved.

+2 −2
Original line number Diff line number Diff line
*** Variables ***
# Generic variables
${SCHEMA}                   http
${HOST}                     10.192.2.172
${HOST}                     127.0.0.1
${PORT}                     8081
${response}                         {}
${TOKEN}                            Basic YWxhZGRpbjpvcGVuc2VzYW1l
+1 −0
Original line number Diff line number Diff line
{
  "Name": "WRONG_PARAMETER_NAME",
  "serName": "WRONG_PARAMETER_NAME",
  "version": "reprehenderit Ut non commodo",
  "state": "INACTIVE",
  "transportInfo": {
Loading