RnisNotifications.robot 11.7 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
''[Documentation]   robot --outputdir ../../outputs ./RnisNotifications_BV.robot
...    Test Suite to validate RNIS/Notification (RNIS) operations.

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


*** Test Cases ***
Cell change notification
    [Documentation]   TC_MEC_SRV_RNIS_001_OK
    ...  Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.2
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
    Log  Creating mock request and response to handle Cell change notification
Yann Garcia's avatar
Yann Garcia committed
24
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}/cell_change    body_type="JSON_SCHEMA"    body=${json}
Yann Garcia's avatar
Yann Garcia committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


RAB Establishment notification
    [Documentation]   TC_MEC_SRV_RNIS_002_OK
    ...  Check that the RNIS service sends an RNIS notification about RAB establishment if the RNIS service has an associated subscription and the event is generated
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.3
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
    Log  Creating mock request and response to handle RAB establishment notification
Yann Garcia's avatar
Yann Garcia committed
42
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}/rab_est    body_type="JSON_SCHEMA"    body=${json}
Yann Garcia's avatar
Yann Garcia committed
43
44
45
46
47
48
49
50
51
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


52
53
54
55
56
57
58
RAB modification notification
    [Documentation]   TC_MEC_SRV_RNIS_003_OK
    ...  Check that the RNIS service sends an RNIS notification about RAB modification if the RNIS service has an associated subscription and the event is generated
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.4
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
59
    Log  Creating mock request and response to handle RAB modification notification
Yann Garcia's avatar
Yann Garcia committed
60
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}/rab_mod    body_type="JSON_SCHEMA"    body=${json}
61
62
63
64
65
66
67
68
69
70
71
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


RAB release notification
    [Documentation]   TC_MEC_SRV_RNIS_004_OK
72
    ...  Check that the RNIS service sends an RNIS notification about RAB release if the RNIS service has an associated subscription and the event is generated
73
74
75
76
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.5
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
77
    Log  Creating mock request and response to handle RAB release notification
Yann Garcia's avatar
Yann Garcia committed
78
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}/rab_rel    body_type="JSON_SCHEMA"    body=${json}
79
80
81
82
83
84
85
86
87
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


88
89
90
91
92
93
94
95
UE measurement notification
    [Documentation]   TC_MEC_SRV_RNIS_005_OK
    ...  Check that the RNIS service sends an RNIS notification about UE measurement report  if the RNIS service has an associated subscription and the event is generated
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.6
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
    Log  Creating mock request and response to handle UE measurement notification
Yann Garcia's avatar
Yann Garcia committed
96
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}/MeasRepUeNotification    body_type="JSON_SCHEMA"    body=${json}
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


UE timing advance notification
    [Documentation]   TC_MEC_SRV_RNIS_006_OK
    ...  Check that the RNIS service sends an RNIS notification about UE timing advance if the RNIS service has an associated subscription and the event is generated
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.7
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
    Log  Creating mock request and response to handle UE timing advance notification
Yann Garcia's avatar
Yann Garcia committed
114
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}/MeasTaNotification    body_type="JSON_SCHEMA"    body=${json}
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


UE carrier aggregation reconfiguration notification
    [Documentation]   TC_MEC_SRV_RNIS_007_OK
    ...  Check that the RNIS service sends an RNIS notification about UE carrier aggregation reconfiguration if the RNIS service has an associated subscription and the event is generated
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.8
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
    Log  Creating mock request and response to handle UE carrier aggregation reconfiguration notification
Yann Garcia's avatar
Yann Garcia committed
132
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}/CaReconfSubscription    body_type="JSON_SCHEMA"    body=${json}
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


S1-U bearer notification
    [Documentation]   TC_MEC_SRV_RNIS_008_OK
    ...  Check that the RNIS service sends an RNIS notification about S1-U bearer if the RNIS service has an associated subscription and the event is generated
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.10
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
Yann Garcia's avatar
Yann Garcia committed
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
    Log  Creating mock request and response to handle S1-U bearer notification
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}/S1BearerSubscription    body_type="JSON_SCHEMA"    body=${json}
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


UE Measurement notification
    [Documentation]   TC_MEC_SRV_RNIS_009_OK
    ...  Check that the RNIS service sends an RNIS notification about 5G NR UE measurement report if the RNIS service has an associated subscription and the event is generated
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.11
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
    Log  Creating mock request and response to handle UE Measurement notification
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}/meas_rep_ue    body_type="JSON_SCHEMA"    body=${json}
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


UE Measurement notification
    [Documentation]   TC_MEC_SRV_RNIS_010_OK
    ...  Check that the RNIS service sends an RNIS notification on subscription expiration if the RNIS service has an associated subscription and the event is generated
    ...  ETSI GS MEC 012 2.0.4, clause 6.4.9
    ...  Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
    ${json}=    Get File    schemas/RadioNetworkInformationAPI.schema.json
    Log  Creating mock request and response to handle UE Measurement notification
    &{req}=    Create Mock Request Matcher    POST    ${callback_uri}${callback_endpoint}    body_type="JSON_SCHEMA"    body=${json}
187
188
189
190
191
192
193
194
195
    &{rsp}=    Create Mock Response    headers="Content-Type: application/json"    status_code=204
    Create Mock Expectation    ${req}    ${rsp}
    Wait Until Keyword Succeeds    ${total_polling_time}    ${polling_interval}    Verify Mock Expectation    ${req}
    Log  Verifying results
    Verify Mock Expectation    ${req}
    Log  Cleaning the endpoint
    Clear Requests    ${callback_endpoint}


Yann Garcia's avatar
Yann Garcia committed
196
*** Keywords ***