Commit efebddd7 authored by Ikram Haq's avatar Ikram Haq
Browse files

Validate test suite with MEC sandbox and fix multiple issues

parent 880cacc4
Loading
Loading
Loading
Loading
Loading
+22 −14
Original line number Original line Diff line number Diff line
@@ -8,6 +8,7 @@ Resource ../../../GenericKeywords.robot
Library     REST    ${SCHEMA}://${HOST}:${PORT}    ssl_verify=false
Library     REST    ${SCHEMA}://${HOST}:${PORT}    ssl_verify=false
Library     OperatingSystem    
Library     OperatingSystem    
Library     String
Library     String
Library    Collections


*** Test Cases ***
*** Test Cases ***
TC_MEC_MEC015_SRV_MTS_001_OK
TC_MEC_MEC015_SRV_MTS_001_OK
@@ -33,7 +34,7 @@ TC_MEC_MEC015_SRV_MTS_002_OK_01
    ...  ETSI GS MEC 015 v3.1.1, clause 9.3.3.1
    ...  ETSI GS MEC 015 v3.1.1, clause 9.3.3.1
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Retrieve MTS session list information   
    Retrieve MTS session list information   
    Check HTTP Response Status Code Is    200
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
@@ -50,8 +51,8 @@ TC_MEC_MEC015_SRV_MTS_002_OK_02
    ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1
    ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Retrieve MTS session list information using filter  ${APP_NAME_FILTER}   ${APP_INSTANCE_ID}   
    Retrieve MTS session list information using filter  ${CORRECT_FILTER}   ${APP_INSTANCE_ID}   
    Check HTTP Response Status Code Is    200
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    FOR    ${mstSessionInfo}    IN    @{response['body']}
    FOR    ${mstSessionInfo}    IN    @{response['body']}
@@ -70,7 +71,8 @@ TC_MEC_MEC015_SRV_MTS_002_OK_03
     ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5,
     ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5,
     ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1
     ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1
     [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
     [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific

     ${elements} =  Split String    ${response['headers']['Location']}       /
     Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
     Retrieve MTS session list information using filter  ${APP_NAME_FILTER}   ${APP_NAME}   
     Retrieve MTS session list information using filter  ${APP_NAME_FILTER}   ${APP_NAME}   
     Check HTTP Response Status Code Is    200
     Check HTTP Response Status Code Is    200
     Check HTTP Response Body Json Schema Is   MtsSessionInfo
     Check HTTP Response Body Json Schema Is   MtsSessionInfo
@@ -85,6 +87,8 @@ TC_MEC_MEC015_SRV_MTS_002_OK_03
     ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5,
     ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5,
     ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1
     ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1
     [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
     [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
     ${elements} =  Split String    ${response['headers']['Location']}       /
     Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
     Retrieve MTS session list information using filter  ${SESSION_ID_FILTER}   ${SESSION_ID}
     Retrieve MTS session list information using filter  ${SESSION_ID_FILTER}   ${SESSION_ID}
     Check HTTP Response Status Code Is    200
     Check HTTP Response Status Code Is    200
     Check HTTP Response Body Json Schema Is   MtsSessionInfo
     Check HTTP Response Body Json Schema Is   MtsSessionInfo
@@ -102,7 +106,7 @@ TC_MEC_MEC015_SRV_MTS_002_BR
    ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1 
    ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.1 
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    
    
    Retrieve MTS session list information using filter  ${BAD_FILTER}   ${APP_INSTANCE_ID}   
    Retrieve MTS session list information using filter  ${BAD_FILTER}   ${APP_INSTANCE_ID}   
    Check HTTP Response Status Code Is    400
    Check HTTP Response Status Code Is    400
@@ -153,8 +157,10 @@ TC_MEC_MEC015_SRV_MTS_003_OK_02
    ...  ETSI GS MEC 015 v3.1.1, clause 6.2.7
    ...  ETSI GS MEC 015 v3.1.1, clause 6.2.7
    ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5
    ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5
    ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.2
    ...  ETSI GS MEC 015 v3.1.1, clause 9.5.3.2
    #[Setup]  Create new App Instance   CreateAppInstanceRequest
    [Setup]  Create new App Instance   CreateAppInstanceRequest
    Register MTS session     MtsSessionInfoSessionSpecific
    Register MTS session     MtsSessionInfoSessionSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Check HTTP Response Status Code Is    201
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    ${appInsId}    Get value entry from JSON file    MtsSessionInfoSessionSpecific   appInsId
    ${appInsId}    Get value entry from JSON file    MtsSessionInfoSessionSpecific   appInsId
@@ -166,11 +172,13 @@ TC_MEC_MEC015_SRV_MTS_003_OK_02


    Should Be Equal As Strings  ${response['body']['appInsId']}    ${appInsId}
    Should Be Equal As Strings  ${response['body']['appInsId']}    ${appInsId}
    Should Be Equal As Strings  ${response['body']['requestType']}    ${requestType}
    Should Be Equal As Strings  ${response['body']['requestType']}    ${requestType}
    Should Be Equal As Strings  ${response['body']['flowFilter']}    ${flowFilter}
    Dictionaries Should Be Equal  ${response['body']['flowFilter'][0]}    ${flowFilter}[0]
    Should Be Equal As Strings  ${response['body']['qosD']}    ${qosD}
    Should Be Equal As Strings  ${response['body']['qosD']}    ${qosD}
    Should Be Equal As Strings  ${response['body']['mtsMode']}    ${mtsMode}
    Should Be Equal As Strings  ${response['body']['mtsMode']}    ${mtsMode}
    Should Be Equal As Strings  ${response['body']['trafficDirection']}    ${trafficDirection}
    Should Be Equal As Strings  ${response['body']['trafficDirection']}    ${trafficDirection}
    [TearDown]   Delete APP Instance   ${APP_INSTANCE_ID} 
    [TearDown]   Unregister from the MTS Service    ${SESSION_ID} 
    Delete APP Instance   ${APP_INSTANCE_ID}
    


TC_MEC_MEC015_SRV_MTS_003_BR
TC_MEC_MEC015_SRV_MTS_003_BR
    [Documentation]
    [Documentation]
@@ -195,7 +203,7 @@ TC_MEC_MEC015_SRV_MTS_004_OK
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.1
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.1
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Retrieve single MTS session   ${SESSION_ID}
    Retrieve single MTS session   ${SESSION_ID}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo    
    Check HTTP Response Body Json Schema Is   MtsSessionInfo    
@@ -242,7 +250,7 @@ TC_MEC_MEC015_SRV_MTS_005_OK
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.2
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.2
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Update requested requirements on the MTS Service    ${SESSION_ID}     MtsSessionInfoApplicationSpecificUpdate
    Update requested requirements on the MTS Service    ${SESSION_ID}     MtsSessionInfoApplicationSpecificUpdate
    Check HTTP Response Status Code Is    200
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
    Check HTTP Response Body Json Schema Is   MtsSessionInfo
@@ -266,7 +274,7 @@ TC_MEC_MEC015_SRV_MTS_005_BR
    ...  https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
    ...  https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Update requested requirements on the MTS Service    ${SESSION_ID}       MtsSessionInfoApplicationSpecificUpdate_BR
    Update requested requirements on the MTS Service    ${SESSION_ID}       MtsSessionInfoApplicationSpecificUpdate_BR
    Check HTTP Response Status Code Is    400
    Check HTTP Response Status Code Is    400
    [TearDown]   Unregister from the MTS Service And Delete APP Instance   ${SESSION_ID}    ${APP_INSTANCE_ID}  
    [TearDown]   Unregister from the MTS Service And Delete APP Instance   ${SESSION_ID}    ${APP_INSTANCE_ID}  
@@ -279,7 +287,7 @@ TC_MEC_MEC015_SRV_MTS_005_NF
    ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5
    ...  ETSI GS MEC 015 v3.1.1, clause 7.2.5
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.2
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.2
    ...  https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
    ...  https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.yaml
    #[Setup]  Unregister from the MTS Service  ${NOT_EXISTING_SESSION_ID}
    [Setup]  Unregister from the MTS Service  ${NOT_EXISTING_SESSION_ID}
    Update requested requirements on the MTS Service    ${NOT_EXISTING_SESSION_ID}     MtsSessionInfoApplicationSpecificUpdate
    Update requested requirements on the MTS Service    ${NOT_EXISTING_SESSION_ID}     MtsSessionInfoApplicationSpecificUpdate
    Check HTTP Response Status Code Is    404
    Check HTTP Response Status Code Is    404
             
             
@@ -294,7 +302,7 @@ TC_MEC_MEC015_SRV_MTS_006_OK
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.3
    ...  ETSI GS MEC 015 v3.1.1, clause 9.4.3.3
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    [Setup]  Create new App Instance and Register MTS session  CreateAppInstanceRequest   MtsSessionInfoApplicationSpecific
    ${elements} =  Split String    ${response['headers']['Location']}       /
    ${elements} =  Split String    ${response['headers']['Location']}       /
    Set Suite Variable    ${SESSION_ID}    ${elements}[3]
    Set Suite Variable    ${SESSION_ID}    ${elements}[-1]
    Unregister from the MTS Service   ${SESSION_ID}
    Unregister from the MTS Service   ${SESSION_ID}
    Check HTTP Response Status Code Is    204
    Check HTTP Response Status Code Is    204


+7 −7
Original line number Original line Diff line number Diff line
*** Variables ***
*** Variables ***
# Generic variables
# Generic variables
${SCHEMA}                   https
${SCHEMA}                   https
${HOST}                     try-mec.etsi.org
${HOST}                     192.168.40.50
${PORT}                     443
${PORT}                     443
${response}                         {}
${response}                         {}
${TOKEN}                            Basic YWxhZGRpbjpvcGVuc2VzYW1l
${TOKEN}                            Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}        /<your_token_here>/mep1 
${apiRoot}        sbxme1qzq4/mep1 
${apiName}        mts
${apiName}        mts
${apiVersion}     v1
${apiVersion}     v1




# Specific variables
# Specific variables
${APP_INSTANCE_ID}					81c51643-8c6f-4781-ad45-f8a457ca549b
${APP_INSTANCE_ID}					f1e4d448-e277-496b-bf63-98391cfd20fb
${NOT_EXISTING_APP_INSTANCE_ID}		NOT_EXISTING_APP_INS_ID
${NOT_EXISTING_APP_INSTANCE_ID}		NOT_EXISTING_APP_INS_ID
${CORRECT_FILTER}					app_instance_id
${CORRECT_FILTER}					app_instance_id
${APP_NAME_FILTER}					app_name
${APP_NAME_FILTER}					app_name
${SESSION_ID_FILTER}                session_id
${SESSION_ID_FILTER}                session_id
${BAD_FILTER}						appInsId
${BAD_FILTER}						appInsId
${APP_NAME}							app_name
${APP_NAME}							appName
          
          
${SESSION_ID}						5
${SESSION_ID}						5
${WRONG_SESSION_ID}					WRONG_SESSION_ID
${WRONG_SESSION_ID}					WRONG_SESSION_ID
@@ -29,9 +29,9 @@ ${TRAFFIC_DIRECTION_DL} 00




##Variables for App Instances management
##Variables for App Instances management
${APP_INST_SCHEMA}                    https
${APP_INST_SCHEMA}                   http
${APP_INST_HOST}                     try-mec.etsi.org
${APP_INST_HOST}                     192.168.40.50
${APP_INST_PORT}                     443
${APP_INST_PORT}                     80
${apiRoot_APP_INST}
${apiRoot_APP_INST}
${apiName_APP_INST}                  app_lcm
${apiName_APP_INST}                  app_lcm
${apiVersion_APP_INST}               v1
${apiVersion_APP_INST}               v1