Commit b0232eb9 authored by piscione's avatar piscione
Browse files

Updated TCs for MEC028 v2.2.1

parent 4ff77af1
Loading
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@ Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_v
TP_MEC_MEC028_SRV_WAI_001_OK
    [Documentation] 
    ...  Check that the IUT responds with the list of WLAN Access Point
    ...  Reference "ETSI GS MEC 028 2.1.1, clause 7.3.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.3.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo ##Outdated
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Retrieve the access point information
@@ -31,8 +31,8 @@ TP_MEC_MEC028_SRV_WAI_001_OK
TP_MEC_MEC028_SRV_WAI_002_OK
    [Documentation] 
    ...  Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter 
    ...  Reference "ETSI GS MEC 028 2.1.1, clause 7.3.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.3.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo ##Outdated
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Retrieve the access point information using filters    ${filter} 
@@ -49,8 +49,8 @@ TP_MEC_MEC028_SRV_WAI_002_OK
TP_MEC_MEC028_SRV_WAI_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 028 2.1.1, clause 7.3.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.3.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo ##Outdated
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Retrieve the access point information using filters    ${bad_filter} 
+1 −1
Original line number Diff line number Diff line
*** Variables ***
${apiRoot}        
${apiName}        wai
${apiVersion}     v1
${apiVersion}     v2

${MEC-APP_SCHEMA}                   http
${MEC-APP_HOST}                     127.0.0.1
+11 −13
Original line number Diff line number Diff line
@@ -9,13 +9,12 @@ Library String
Library     OperatingSystem
Library     REST    ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT}    ssl_verify=false

#GET
*** Test Cases ***
TP_MEC_MEC028_SRV_WAI_008_OK
    [Documentation] 
    ...  Check that the IUT responds with the list of Subscription"
    ...	 Reference "ETSI GS MEC 028 2.1.1, clause 7.6.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
    ...	 Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription ##Outdated
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Retrieve existing subscription information  ${SUB_ID}
@@ -28,21 +27,20 @@ TP_MEC_MEC028_SRV_WAI_008_OK
TP_MEC_MEC028_SRV_WAI_008_NF
    [Documentation] 
    ...  Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent"
    ...	 Reference "ETSI GS MEC 028 2.1.1, clause 7.6.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
    ...	 Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription ##Outdated
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Retrieve existing subscription information  ${NOT_EXISTING_SUB_ID}
    Check HTTP Response Status Code Is    404
 

#PUT
*** Test Cases ***
TP_MEC_MEC028_SRV_WAI_009_OK
    [Documentation] 
    ...  Check that the IUT responds with a Notification Subscription when it is modified"
    ...	 Reference "ETSI GS MEC 028 2.1.1, clause 7.6.3.2
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
    ...	 Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.2
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription ##Outdated
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Modify existing subscription information  ${SUB_ID}   UpdateAssocStaSubscription.json
@@ -55,18 +53,18 @@ TP_MEC_MEC028_SRV_WAI_009_OK
TP_MEC_MEC028_SRV_WAI_009_BR
    [Documentation] 
    ...  Check that the IUT responds with an error when an invalid field is set in the subscription modification request"
    ...	 Reference "ETSI GS MEC 028 2.1.1, clause 7.6.3.2
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
    ...	 Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.2
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription ##Outdated
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Modify existing subscription information  ${SUB_ID}   UpdateAssocStaSubscription_BR.json
    Check HTTP Response Status Code Is    400

#DELETE

TP_MEC_MEC028_SRV_WAI_010_OK
    [Documentation] 
    ...  Check that the IUT responds with 204 when an existing subscription is correctly deleted"
    ...	 Reference "ETSI GS MEC 028 2.1.1, clause 7.6.3.5
    ...	 Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.5
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Remove existing subscription information  ${SUB_ID}
@@ -75,7 +73,7 @@ TP_MEC_MEC028_SRV_WAI_010_OK
TP_MEC_MEC028_SRV_WAI_010_NF
    [Documentation] 
    ...  Check that the IUT responds with an error when an not existing subscription cannot be deleted"
    ...	 Reference "ETSI GS MEC 028 2.1.1, clause 7.6.3.5
    ...	 Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.5
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Remove existing subscription information  ${NOT_EXISTING_SUB_ID}
+1 −1
Original line number Diff line number Diff line
*** Variables ***
${apiRoot}        
${apiName}        wai
${apiVersion}     v1
${apiVersion}     v2

${MEC-APP_SCHEMA}                   http
${MEC-APP_HOST}                     127.0.0.1
+189 −0
Original line number Diff line number Diff line
''[Documentation]   robot --outputdir ../../outputs ./WaiMeasurement.robot
...    Test Suite to validate WLAN Measurement API (MEAS) operations.

*** Settings ***
Resource    environment/variables.txt
Resource    ../../../pics.txt
Resource    ../../../GenericKeywords.robot
Library     String
Library     OperatingSystem
Library     REST    ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT}    ssl_verify=false


*** Test Cases ***
TP_MEC_MEC028_SRV_WAI_012_OK
    [Documentation] 
    ...  Check that the IUT responds with a list of measurement 
    ...  configurations available from the WLAN Access Information Service
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.7.3.1
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.2.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Retrieve a list of list of measurement configurations
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MeasurementConfigLinkList
    
TP_MEC_MEC028_SRV_WAI_013_OK
    [Documentation] 
    ...  Check that the IUT responds with a new measurement configuration
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.7.3.4
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.2.1/WlanInformationApi.yaml#/schemas/MeasurementConfig
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    ${path}    Catenate    SEPARATOR=      jsons/     MeasurementConfig.json
    ${body}    Get File    ${path}
    ${json_object}=	Evaluate  json.loads('''${body}''')  json
    Create a new measurement configuration  ${body}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   MeasurementConfigLinkList
    Should Be Equal As Strings  ${response['body']['staIdentity']['staId']}     ${STA_ID}
    Should Be Equal As Strings  ${response['body']['measurementId']    ${MEAS_ID}
    Should Be Equal As Strings  ${json_object['measurementInfo']}    ${response['body']['measurementInfo']}

TP_MEC_MEC028_SRV_WAI_013_BR
    [Documentation] 
    ...  Check that the IUT responds with an error when an invalid request is sent
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.7.3.4
    ...  https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.2.1/WlanInformationApi.yaml#/schemas/MeasurementConfig
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    ${path}    Catenate    SEPARATOR=      jsons/     MeasurementConfigError.json
    ${body}    Get File    ${path}
    ${json_object}=	Evaluate  json.loads('''${body}''')  json
    Create a new measurement configuration  ${body}
    Check HTTP Response Status Code Is    400   

TP_MEC_MEC028_SRV_WAI_014_OK
    [Documentation] 
    ...  Check that the IUT responds with the specified measurement configuration
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.8.3.1
    ...  "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.2.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Check HTTP Response Body Json Schema Is   MeasurementConfig
    Retrieve a specified measurement configuration   ${MEAS_ID}
    Check HTTP Response Status Code Is    200
    Should Be Equal As Strings  ${response['body']['measurementId']    ${MEAS_ID}
    
    

TP_MEC_MEC028_SRV_WAI_014_NF
    [Documentation] 
    ...  Check that the IUT responds with an error when an invalid request is sent
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.8.3.1
    ...  "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.2.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Retrieve a specified measurement configuration   ${INVALID_MEASUREMENT_CONFIG_ID}
    Check HTTP Response Status Code Is    404
    

TP_MEC_MEC028_SRV_WAI_015_OK
    [Documentation] 
    ...  Check that the IUT responds with the modified measurement configuration
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.8.3.2
    ...  "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.2.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1  
    ${path}    Catenate    SEPARATOR=      jsons/     MeasurementConfigUpdate.json
    ${body}    Get File    ${path}
    ${json_object}=	Evaluate  json.loads('''${body}''')  json 
    Update a specified measurement configuration   ${MEAS_ID}   ${body}
    Check HTTP Response Status Code Is    200
    Should Be Equal As Strings  ${response['body']['staIdentity']['staId']}    ${json_object['staIdentity']['staId']}
    Should Be Equal As Strings  ${response['body']['measurementId']    ${MEAS_ID}
    Should Be Equal As Strings  ${response['body']['measurementInfo']}    ${json_object['measurementInfo']}



TP_MEC_MEC028_SRV_WAI_015_NF
    [Documentation] 
    ...  Check that the IUT responds with an error when an invalid request is sent
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.8.3.2
    ...  "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.2.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Update a specified measurement configuration   ${INVALID_MEASUREMENT_CONFIG_ID}   MeasurementConfigUpdate.json
    Check HTTP Response Status Code Is    404
    

TP_MEC_MEC028_SRV_WAI_016_OK
    [Documentation] 
    ...  Check that the IUT responds with with 204 when requested to delete the specified measurement configuration
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.8.3.5
    ...  "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.2.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Delete a specified measurement configuration   ${MEAS_ID} 
    Check HTTP Response Status Code Is    204
    

TP_MEC_MEC028_SRV_WAI_016_NF
    [Documentation] 
    ...  Check that the IUT responds with an error when an invalid request is sent
    ...  Reference "ETSI GS MEC 028 2.2.1, clause 7.8.3.5
    ...  "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.2.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Delete a specified measurement configuration   ${INVALID_MEASUREMENT_CONFIG_ID} 
    Check HTTP Response Status Code Is    204
    
  
*** Keywords ***
Retrieve a list of list of measurement configurations
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"*/*"}
    Set Headers    {"Authorization":"${TOKEN}"}
    GET     ${apiRoot}/${apiName}/${apiVersion}/queries/measurement
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
   
Create a new measurement configuration
    [Arguments]   ${body}
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"*/*"}
    Set Headers    {"Authorization":"${TOKEN}"}
    POST     ${apiRoot}/${apiName}/${apiVersion}/queries/measurements   ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    

Retrieve a specified measurement configuration
    [Arguments]   ${MEAS_CONF_ID}
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"*/*"}
    Set Headers    {"Authorization":"${TOKEN}"}
    GET     ${apiRoot}/${apiName}/${apiVersion}/queries/measurement/${MEAS_CONF_ID}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
Update a specified measurement configuration
    [Arguments]   ${MEAS_CONF_ID}  ${content}
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"*/*"}
    Set Headers    {"Authorization":"${TOKEN}"}
    GET     ${apiRoot}/${apiName}/${apiVersion}/queries/measurement/${MEAS_CONF_ID}    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    


Delete a specified measurement configuration
    [Arguments]   ${MEAS_CONF_ID}
    Should Be True    ${PIC_MEC_SYSTEM} == 1
    Should Be True    ${PIC_SERVICES} == 1
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"*/*"}
    Set Headers    {"Authorization":"${TOKEN}"}
    GET     ${apiRoot}/${apiName}/${apiVersion}/queries/measurement/${MEAS_CONF_ID} 
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
Loading