Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
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
187
188
189
''[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}