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
''[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
Elian Kraja's avatar
Elian Kraja committed
19
20
    ...  ETSI GS MEC 012 2.1.1, clause 6.4.2
    ...  Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Yann Garcia's avatar
Yann Garcia committed
21
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
Elian Kraja's avatar
Elian Kraja committed
22
    ${json}=    Get File    schemas/CellChangeNotification.schema.json
Yann Garcia's avatar
Yann Garcia committed
23
    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
    &{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
Elian Kraja's avatar
Elian Kraja committed
37
38
    ...  ETSI GS MEC 012 2.1.1, clause 6.4.3
    ...  Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Yann Garcia's avatar
Yann Garcia committed
39
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
Elian Kraja's avatar
Elian Kraja committed
40
    ${json}=    Get File    schemas/RabEstNotification.schema.json
Yann Garcia's avatar
Yann Garcia committed
41
    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
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
Elian Kraja's avatar
Elian Kraja committed
55
56
    ...  ETSI GS MEC 012 2.1.1, clause 6.4.4
    ...  Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
57
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
Elian Kraja's avatar
Elian Kraja committed
58
    ${json}=    Get File    schemas/RabModNotification.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
Elian Kraja's avatar
Elian Kraja committed
73
74
    ...  ETSI GS MEC 012 2.1.1, clause 6.4.5
    ...  Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
75
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
Elian Kraja's avatar
Elian Kraja committed
76
    ${json}=    Get File    schemas/RabRelNotification.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
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
Elian Kraja's avatar
Elian Kraja committed
91
92
    ...  ETSI GS MEC 012 2.1.1, clause 6.4.6
    ...  Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
93
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
Elian Kraja's avatar
Elian Kraja committed
94
    ${json}=    Get File    schemas/MeasRepUeNotification.schema.json
95
    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
    &{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
Elian Kraja's avatar
Elian Kraja committed
109
110
    ...  ETSI GS MEC 012 2.1.1, clause 6.4.7
    ...  Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
111
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
Elian Kraja's avatar
Elian Kraja committed
112
    ${json}=    Get File    schemas/MeasTaSubscription.schema.json
113
    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
    &{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
Elian Kraja's avatar
Elian Kraja committed
127
128
    ...  ETSI GS MEC 012 2.1.1, clause 6.4.8
    ...  Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
129
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
Elian Kraja's avatar
Elian Kraja committed
130
    ${json}=    Get File    schemas/CaReconfSubscription.schema.json
131
    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
    &{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
Elian Kraja's avatar
Elian Kraja committed
145
146
    ...  ETSI GS MEC 012 2.1.1, clause 6.4.9
    ...  Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
147
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
Elian Kraja's avatar
Elian Kraja committed
148
    ${json}=    Get File    schemas/S1BearerSubscription.schema.json
Yann Garcia's avatar
Yann Garcia committed
149
150
151
152
153
154
155
156
157
158
159
    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}


Elian Kraja's avatar
Elian Kraja committed
160
TC_MEC_SRV_RNIS_009_OK
Yann Garcia's avatar
Yann Garcia committed
161
162
    [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
Elian Kraja's avatar
Elian Kraja committed
163
164
    ...  ETSI GS MEC 012 2.1.1, clause 6.4.11
    ...  Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Yann Garcia's avatar
Yann Garcia committed
165
    Should Be True    ${PIC_RNIS_NOTIFICATIONS} == 1
Elian Kraja's avatar
Elian Kraja committed
166
    ${json}=    Get File    schemas/NrMeasRepUeSubscription.schema.json
Yann Garcia's avatar
Yann Garcia committed
167
168
169
170
171
172
173
174
175
176
177
    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}


Elian Kraja's avatar
Elian Kraja committed
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# TC_MEC_SRV_RNIS_010_OK
    # [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}
    # &{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}
194