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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
*** Settings ***
Resource environment/variables.txt
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
*** Test Cases ***
POST Create a new subscription
[Documentation] Test ID: 9.3.4.1.1
... Test title: POST Create a new subscription
... Test objective: The objective is to test that POST method creates a subscription
... Pre-conditions: none
... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: Subscription is created in the NFVO
POST subscriptions
Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is subscription
Check Resource URI
POST Create a new Subscription - DUPLICATION
[Documentation] Test ID: 9.3.4.1.2
... Test title: POST Create a new subscription - DUPLICATION
... Test objective: The objective is to test that POST method creates a duplicate subscription
... Pre-conditions: A subscription shall already exist
... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: Duplication supported by NFVO-C
... Post-Conditions: Duplicate subscription is created in the NFVO
Check Subscription Existence
POST subscriptions DUPLICATION
Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is subscription
POST Create a new Subscription - NO-DUPLICATION
[Documentation] Test ID: 9.3.4.1.3
... Test title: POST Create a new subscription - NO-DUPLICATION
... Test objective: The objective is to test that POST method cannot create a duplicate subscription
... Pre-conditions: A subscription shall already exist
... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: Duplication NOT supported by NFVO-C
... Post-Conditions: Duplicate subscription is not created in the NFVO
Check Subscription Existence
POST subscriptions NO DUPLICATION
Check HTTP Response Status Code Is 303
Check HTTP Response Header Contains Location
GET Subscriptions
[Documentation] Test ID: 9.3.4.1.4
... Test title: GET Subscriptions
... Test objective: The objective is to test that GET method retrieves the list of existing subscriptions
... Pre-conditions: none
... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Subscriptions
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is subscriptions
GET Subscription - Filter
[Documentation] Test ID: 9.3.4.1.5
... Test title: GET Subscription - Filter
... Test objective: The objective is GET the list of active subscriptions using a filter
... Pre-conditions: none
... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Subscriptions with filter
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is subscriptions
GET subscriptions - Bad Request Invalid attribute-based filtering parameters
[Documentation] Test ID: 9.3.4.1.6
... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters
... Test objective: The objective is GET the list of active subscriptions using an invalid filter
... Pre-conditions: none
... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get subscriptions - invalid filter
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
GET subscriptions - Bad Request Response too Big
[Documentation] Test ID: 9.3.4.1.7
... Test title: GET subscriptions - Bad Request Response too Big
... Test objective: The objective is test that the retrieval of active subscriptions list fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response.
... Pre-conditions: none
... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Subscriptions
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
GET subscriptions with "all_fields" attribute selector
[Documentation] Test ID: 9.3.4.1.8
... Test title: GET subscriptions with "all_fields" attribute selector
... Test objective: The objective is to retrieve the list of active subscriptions with "all_fields" attribute selector
... Pre-conditions:
... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability:
... Post-Conditions:
Get subscriptions with all_fields attribute selector
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is subscriptions
GET subscriptions with "exclude_default" attribute selector
[Documentation] Test ID: 9.3.4.1.9
... Test title: GET subscriptions with "exclude_default" attribute selector
... Test objective: The objective is to retrieve the list of active subscriptions with "exclude_default"s attribute selector
... Pre-conditions:
... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability:
... Post-Conditions:
Get subscriptions with exclude_default attribute selector
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is subscriptions
GET subscriptions with "fields" attribute selector
[Documentation] Test ID: 9.3.4.1.10
... Test title: GET subscriptions with "fields" attribute selector
... Test objective: The objective is to retrieve the list of active subscriptions with "fields" attribute selector
... Pre-conditions:
... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability:
... Post-Conditions:
Get subscriptions with fields attribute selector
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is subscriptions
GET subscriptions with "exclude_fields" attribute selector
[Documentation] Test ID: 9.3.4.1.11
... Test title: GET subscriptions with "exclude_fields" attribute selector
... Test objective: The objective is to retrieve the list of active subscriptions with "exclude_fields" attribute selector
... Pre-conditions:
... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability:
... Post-Conditions:
Get subscriptions with exclude_fields attribute selector
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is subscriptions
GET Subscriptions as Paged Response
[Documentation] Test ID: 9.3.4.1.12
... Test title: GET Subscriptions as Paged Response
... Test objective: The objective is to test that GET method retrieve the list of existing subscriptions as paged response.
... Pre-conditions: none
... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Subscriptions
Check HTTP Response Status Code Is 200
Check LINK in Header
PUT subscriptions - Method not implemented
[Documentation] Test ID: 9.3.4.1.13
... Test title: PUT subscriptions - Method not implemented
... Test objective: The objective is to test that PUT method cannot modify a NS instance usage subscription
... Pre-conditions: none
... Reference: Clause 8.5.3.3.3 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
PUT subscriptions
Check HTTP Response Status Code Is 405
PATCH subscriptions - Method not implemented
[Documentation] Test ID: 9.3.4.1.14
... Test title: PATCH subscriptions - Method not implemented
... Test objective: The objective is to test that PUT method cannot modify a NS instance usage subscription
... Pre-conditions: none
... Reference: Clause 8.5.3.3.4 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
PATCH subscriptions
Check HTTP Response Status Code Is 405
DELETE subscriptions - Method not implemented
[Documentation] Test ID: 9.3.4.1.15
... Test title: DELETE subscriptions - Method not implemented
... Test objective: The objective is to test that DELETE method cannot delete a NS instance usage subscription
... Pre-conditions: none
... Reference: Clause 8.5.3.3.5 - ETSI GS NFV-SOL 011 [6] v3.3.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: Subscription is not deleted
DELETE subscriptions
Check HTTP Response Status Code Is 405
*** Keywords ***
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE}
Should Contain ${response['headers']} ${CONTENT_TYPE}
Log Header is present
Check Resource URI
${uri}= Get Value From Json ${response['headers']} $..Location
Should Not Be Empty ${uri}
Log URI is present
Check subscription existence
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 200
#more robust functionaity needed
#Check URI is Of Existing Resource
# ${uri}= Get Value From Json ${response['headers']} $..Location
# Should Be Equal As Strings ${uri} ${}
Check LINK in Header
${linkURL}= Get Value From Json ${response['headers']} $..Link
Should Not Be Empty ${linkURL}
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate ${input} .schema.json
Validate Json ${schema} ${response['body']}
POST subscriptions
Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/NsInstanceUsageSubscriptionRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST subscriptions DUPLICATION
Log Trying to create a subscription with an already created content
Pass Execution If ${NFVO_DUPLICATION} == 1 NFVO is permitting duplication. Skipping the test
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/NsInstanceUsageSubscriptionRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST subscriptions NO DUPLICATION
Log Trying to create a subscription with an already created content
Pass Execution If ${NFVO_DUPLICATION} == 0 NFVO is not permitting duplication.
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body}= Get File jsons/NsInstanceUsageSubscriptionRequest.json
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Subscriptions
Log Get the list of active subscriptions
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Get subscriptions with all_fields attribute selector
Log Get the list of active subscriptions, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?all_fields
${output}= Output response
Set Suite Variable ${response} ${output}
Get subscriptions with exclude_default attribute selector
Log Get the list of active subscriptions, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
Get subscriptions with fields attribute selector
Log Get the list of active subscriptions, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
Get subscriptions with exclude_fields attribute selector
Log Get the list of active subscriptions, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
GET subscriptions with filter
Log Get the list of active subscriptions using a filter
Set Headers {"Accept": "${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Get subscriptions - invalid filter
Log Get the list of active subscriptions using an invalid filter
Set Headers {"Accept": "${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT subscriptions
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH subscriptions
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE subscriptions
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}