RnisQuery_BV.robot 3.58 KB
Newer Older
1 2 3 4 5
''[Documentation]   robot --outputdir ../../outputs ./RnisQuery_BV.robot
...    Test Suite to validate RNIS/Subscription (RNIS) operations.

*** Settings ***
Resource    environment/variables.txt
Yann Garcia's avatar
Yann Garcia committed
6 7
Resource    ../../pics.txt
Resource    ../../GenericKeywords.robot
8 9 10 11 12 13
Resource    resources/RadioNetworkInformationAPI.robot
Library     REST    ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT}    ssl_verify=false



*** Test Cases ***
Yann Garcia's avatar
Yann Garcia committed
14 15 16 17 18 19
Request RabInfo info
    [Documentation]   TC_MEC_SRV_RNIS_016_OK
    ...  Check that the RNIS service returns the RAB information when requested
    ...  ETSI GS MEC 012 2.0.4, clause 7.3.3.1
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo
    Get RabInfo info
20 21
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   RadioNetworkInformationAPI
Yann Garcia's avatar
Yann Garcia committed
22
    Check RabInfo    ${response['body']['RabInfo']}
23 24


Yann Garcia's avatar
Yann Garcia committed
25 26 27 28 29 30 31
Request Plmn info
    [Documentation]   TC_MEC_SRV_RNIS_017_OK
    ...  Check that the RNIS service returns the PLMN information when requested
    ...  ETSI GS MEC 012 2.0.4, clause 7.4.3.1
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/PlmnInfo
    Get PLMN info
    Check HTTP Response Status Code Is    200
32
    Check HTTP Response Body Json Schema Is   RadioNetworkInformationAPI
Yann Garcia's avatar
Yann Garcia committed
33
    Check PlmnInfo    ${response['body']['PlmnInfo']}
34 35


36
Request S1Bearer info
37
    [Documentation]   TC_MEC_SRV_RNIS_018_OK
38 39 40 41 42 43 44 45 46 47
    ...  Check that the RNIS service returns the S1 bearer information
    ...  ETSI GS MEC 012 2.0.4, clause 7.4.3.1
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/S1BearerInfo
    Get S1Bearer info
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   RadioNetworkInformationAPI
    #log    ${response['body']}
    Check S1BearerInfo    ${response['body']['S1BearerInfo']}


48 49 50 51 52 53 54 55
Request L2Meas info
    [Documentation]   TC_MEC_SRV_RNIS_019_OK
    ...  Check that the RNIS service returns the L2 measurements information
    ...  ETSI GS MEC 012 2.0.4, clause 7.4.3.1
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/S1BearerInfo
    Fail    msg=Too many changes in JSON data description, not implemented


56
*** Keywords ***
Yann Garcia's avatar
Yann Garcia committed
57
Get RabInfo info
58 59 60 61 62
    Should Be True    ${PIC_RNIS_SPECIFIC_SUBSCRIPTION} == 1
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"application/json"}
    Set Headers    {"Authorization":"${TOKEN}"}
    Set Headers    {"Content-Length":"0"}
63
    Get    /exampleAPI/rni/v2/queries/rab_info?cell_id=${CELL_ID}
64 65 66
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Yann Garcia's avatar
Yann Garcia committed
67
Get Plmn info
68 69 70 71
    Should Be True    ${PIC_RNIS_SPECIFIC_SUBSCRIPTION} == 1
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"application/json"}
    Set Headers    {"Authorization":"${TOKEN}"}
Yann Garcia's avatar
Yann Garcia committed
72
    Set Headers    {"Content-Length":"0"}
73 74 75 76 77 78 79 80 81 82 83 84
    Get    /exampleAPI/rni/v2/queries/plmn_info?app_ins_id=${APP_INS_ID}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}


Get S1Bearer info
    Should Be True    ${PIC_RNIS_SPECIFIC_SUBSCRIPTION} == 1
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"application/json"}
    Set Headers    {"Authorization":"${TOKEN}"}
    Set Headers    {"Content-Length":"0"}
    Get    /exampleAPI/rni/v2/queries/s1_bearer_info?cell_id=${CELL_ID}
85 86
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}