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
''[Documentation] robot --outputdir ../../outputs ./WaiApInfo.robot
... Test Suite to validate WLAN Information API (AP_INFO) 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_001_OK
[Documentation]
... Check that the IUT responds with the list of WLAN Access Point
... Reference "ETSI GS MEC 028 2.1.1, clause 7.3.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the access point information
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApInfo
## Post condition
FOR ${apInfo} IN @{response['body']}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${apInfo['apId']['macId']} ${MAC_ID}
Exit For Loop If ${passed}
END
Should Be True ${passed}
TP_MEC_MEC028_SRV_WAI_002_OK
[Documentation]
... Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter
... Reference "ETSI GS MEC 028 2.1.1, clause 7.3.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the access point information using filters ${filter}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ApInfo
## Post condition
FOR ${apInfo} IN @{response['body']}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${apInfo['apId']['macId']} ${MAC_ID}
Exit For Loop If ${passed}
END
Should Be True ${passed}
TP_MEC_MEC028_SRV_WAI_002_BR
[Documentation]
... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
... Reference "ETSI GS MEC 028 2.1.1, clause 7.3.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/ApInfo
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the access point information using filters ${bad_filter}
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
*** Keywords ***
Retrieve the access point information
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}/queries/ap/ap_information
${output}= Output response
Set Suite Variable ${response} ${output}
Retrieve the access point information using filters
[Arguments] ${filter}
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}/queries/ap/ap_information?filter=${filter}
${output}= Output response
Set Suite Variable ${response} ${output}