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
Y''[Documentation] robot --outputdir ../../../outputs ./RegisteredIoTPlatform.robot
... Test Suite to validate the Registered IOT Platform (IOTPLAT) operations.
*** Settings ***
Resource environment/variables.txt
Resource ../../../../pics.txt
Resource ../../../../GenericKeywords.robot
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
*** Test Cases ***
TP_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK
[Documentation]
... Check that the IUT responds with the list of registered IoT platforms
... when queried by a Service Consumer
... ETSI GS MEC 033 V3.1.1, clause 7.5.3.1
... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf
Retrieve all registered IOT Platform information
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is IotPlatformInfoList
TP_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK
[Documentation]
... Check that the IUT registers the information of a new IoT platform
... when requested by a Service Consumer
... ETSI GS MEC 033 V3.1.1, clause 7.5.3.4
... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf
Register IOT Platform information IotPlatformInfo
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is IotPlatformInfo
TP_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR
[Documentation]
... Check that the IUT returns an error
... when Service Consumer request to register an IoT device with incorrect parameters
... ETSI GS MEC 033 V3.1.1, clause 7.5.3.4
... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf
Register IOT Platform information IotPlatformInfoBR
Check HTTP Response Status Code Is 400
TP_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK
[Documentation]
... Check that the IUT returns the IoT platform information
... when requested by Service Consumer specifying the IoT platform identifier
... ETSI GS MEC 033 V3.1.1, clause 7.5.3.1
... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf
Retrieve specific registered IOT Platform information ${IOT_PLATFORM_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is IotPlatformInfo
TP_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF
[Documentation]
... Check that the IUT returns the IoT platform information
... when requested by Service Consumer specifying the IoT platform identifier
... ETSI GS MEC 033 V3.1.1, clause 7.5.3.1
... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf
Retrieve specific registered IOT Platform information ${NOT_EXISTING_IOT_PLATFORM_ID}
Check HTTP Response Status Code Is 404
TP_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK
[Documentation]
... Check that the IUT updates the information about a registered IoT platform
... when requested by a Service Consumer
... ETSI GS MEC 033 V3.1.1, clause 7.5.3.2
... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf
Update registered IOT Platform information ${IOT_PLATFORM_ID} IotPlatformInfoUpdate
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is IotPlatformInfo
TP_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF
[Documentation]
... Check that the IUT returns an error
... when a Service Consumer requests to update a not registered IoT platform
... ETSI GS MEC 033 V3.1.1, clause 7.5.3.2
... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf
Update registered IOT Platform information ${NOT_EXISTING_IOT_PLATFORM_ID} IotPlatformInfoUpdate
Check HTTP Response Status Code Is 404
TP_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK
[Documentation]
... Check that the IUT deregisters an IoT platform information
... when requested by a Service Consumer specifying the registered IoT platform identifier
... ETSI GS MEC 033 V3.1.1, clause 7.5.3.5
... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf
Deregister IOT Platform information ${IOT_PLATFORM_ID}
Check HTTP Response Status Code Is 204
TP_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF
[Documentation]
... Check that the IUT returns an error
... when a Service Consumer request to deregister an IoT platform using incorrect parameters
... ETSI GS MEC 033 V3.1.1, clause 7.5.3.5
... https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf
Deregister IOT Platform information ${NOT_EXISTING_IOT_PLATFORM_ID}
Check HTTP Response Status Code Is 404
############################################################################
*** Keywords ***
Retrieve all registered IOT Platform information
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms
${output}= Output response
Set Suite Variable ${response} ${output}
Retrieve specific registered IOT Platform information
[Arguments] ${registeredPlatformId}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms/${registeredPlatformId}
${output}= Output response
Set Suite Variable ${response} ${output}
Update registered IOT Platform information
[Arguments] ${registeredPlatformId} ${content}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms/${registeredPlatformId} ${content}
${output}= Output response
Set Suite Variable ${response} ${output}
Register IOT Platform information
[Arguments] ${content}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${file}
POST ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Deregister IOT Platform information
[Arguments] ${registeredPlatformId}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/registered_iot_platforms/${registeredPlatformId}
${output}= Output response
Set Suite Variable ${response} ${output}