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
''[Documentation] robot --outputdir ../../outputs ./WaiSubscription.robot
... Test Suite to validate WLAN Information API (SUB) 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_005_OK
[Documentation]
... Check that the IUT responds with the requested list of subscription
... Reference "ETSI GS MEC 028 2.1.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the subscription information ${SUB_FILTER}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SubscriptionLinkList
FOR ${assocStaSub} IN @{response['body']['assocStaSubscription']}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${assocStaSub['_links']['self']['href']} ${HREF}
Exit For Loop If ${passed}
END
TP_MEC_MEC028_SRV_WAI_006_OK
[Documentation]
... Check that the IUT responds with the requested list of subscription
... Reference "ETSI GS MEC 028 2.1.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the subscription information ${SUB_FILTER}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SubscriptionLinkList
Should Be Equal As Strings ${response['body']['_links']['self']['href']} ${HREF}
TP_MEC_MEC028_SRV_WAI_006_BR
[Documentation]
... Check that the IUT responds with the requested list of subscription
... Reference "ETSI GS MEC 028 2.1.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the subscription information ${INVALID_SUB_FILTER}
Check HTTP Response Status Code Is 400
TP_MEC_MEC028_SRV_WAI_006_NF
[Documentation]
... Check that the IUT responds with an error when a request with not existing parameters is sent
... Reference "ETSI GS MEC 028 2.1.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
Retrieve the subscription information using wrong endpoint
Check HTTP Response Status Code Is 404
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
TP_MEC_MEC028_SRV_WAI_007_OK
[Documentation]
... Check that the IUT responds with a Notification Subscription
... Reference "ETSI GS MEC 028 2.1.1, clause 7.5.3.4
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Send a request for creating a subscription AssocStaSubscription.json
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is AssocStaSubscription
Should Be Equal As Strings ${response['body']['subscriptionType']} ${SUB_TYPE}
Should Be Equal As Strings ${response['body']['_links']['self']['href']} ${HREF}
Should Be Equal As Strings ${response['headers']['Location']} ${HREF}
TP_MEC_MEC028_SRV_WAI_007_BR
[Documentation]
... Check that the IUT responds with an error when an invalid Subscription request is sent
... ETSI GS MEC 028 2.1.1, clause 7.5.3.4
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Send a request for creating a subscription AssocStaSubscription_BR.json
Check HTTP Response Status Code Is 400
TP_MEC_MEC028_SRV_WAI_007_NF
[Documentation]
... Check that the IUT responds with an error when a request with not existing parameters is sent
... Reference "ETSI GS MEC 028 2.1.1, clause 7.5.3.1
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Send a request for creating a subscription using wrong endpoint AssocStaSubscription.json
Check HTTP Response Status Code Is 404
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
*** Keywords ***
Send a request for creating a subscription
[Arguments] ${content}
Log Creating a new subscription
#Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${path} Catenate SEPARATOR= jsons/ ${content}
${body} Get File ${path}
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body}
Log ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Send a request for creating a subscription using wrong endpoint
[Arguments] ${content}
Log Creating a new subscription
#Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${path} Catenate SEPARATOR= jsons/ ${content}
${body} Get File ${path}
Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions_INVALID_URI ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Retrieve the subscription information
[Arguments] ${subscription_type}
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
#Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?subscription_type=${subscription_type}
${output}= Output response
Set Suite Variable ${response} ${output}
Retrieve the subscription information using wrong endpoint
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
#Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions_INVALID_URI
${output}= Output response
Set Suite Variable ${response} ${output}