Skip to content
Snippets Groups Projects
Commit 1e775e75 authored by piscione's avatar piscione
Browse files

Merge branch 'TTF_T027' of https://forge.etsi.org/rep/mec/gs032p3-robot-test-suite into TTF_T027

parents 4844af41 ab3921d4
No related branches found
No related tags found
1 merge request!3Merge of TT027 branch into master
Showing
with 1027 additions and 901 deletions
......@@ -90,7 +90,7 @@ TC_MEC_MEC028_SRV_WAI_010_OK
TC_MEC_MEC028_SRV_WAI_010_NF
[Documentation]
... Check that the IUT responds with an error when an not existing subscription cannot be deleted"
... Reference "ETSI GS MEC 028 2.2.1, clause 7.6.3.5
... Reference "ETSI GS MEC 028 2.3.1, clause 7.6.3.5
[Setup] Remove Subscription Info Using SubId ${NOT_EXISTING_SUB_ID}
......@@ -146,7 +146,6 @@ Create New Subscription Info
${file}= Catenate SEPARATOR= jsons/ CreateAssocStaSubscription .json
${body}= Get File ${file}
${json_data}= Evaluate json.loads('''${body}''') json
Log Original JSON: ${json_data}
${new_href}= Set Variable ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT}/${apiRoot}/${apiName}/${apiVersion}/subscriptions/${SUB_ID}
Set To Dictionary ${json_data["_links"]["self"]} href=${new_href}
${modified_json_string}= Evaluate json.dumps(${json_data})
......
......@@ -3,7 +3,7 @@
"callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1",
"_links": {
"self": {
"href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123"
"href": "/wai/v2/subscriptions/sub123"
}
},
"expiryDeadline": {
......
......@@ -5,84 +5,95 @@
Resource environment/variables.txt
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Library Collections
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
TC_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
... Reference "ETSI GS MEC 028 2.3.1, clause 7.7.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList
[Setup] Create a new measurement configuration ${MEAS_ID}
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
[TearDown] Delete a specified measurement configuration ${MEAS_ID}
TP_MEC_MEC028_SRV_WAI_013_OK
TC_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
... Reference "ETSI GS MEC 028 2.3.1, clause 7.7.3.4
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.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
Create a new measurement configuration ${MEAS_ID}
Check HTTP Response Status Code Is 201
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']}
Should Be Equal As Strings ${response['body']['measurementId']} ${MEAS_ID}
Should Be Equal As Strings ${response['body']['measurementInfo']} ${response['body']['measurementInfo']}
TP_MEC_MEC028_SRV_WAI_013_BR
TC_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
... Reference "ETSI GS MEC 028 2.3.1, clause 7.7.3.4
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.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}
Create a new measurement configuration from file MeasurementConfigError
Check HTTP Response Status Code Is 400
TP_MEC_MEC028_SRV_WAI_014_OK
TC_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"
... Reference "ETSI GS MEC 028 2.3.1, clause 7.8.3.1
... "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
[Setup] Create a new measurement configuration ${MEAS_ID}
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 Body Json Schema Is MeasurementConfig
Check HTTP Response Status Code Is 200
Should Be Equal As Strings ${response['body']['measurementId'] ${MEAS_ID}
Should Be Equal As Strings ${response['body']['measurementId']} ${MEAS_ID}
TP_MEC_MEC028_SRV_WAI_014_NF
[TearDown] Delete a specified measurement configuration ${MEAS_ID}
TC_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"
... Reference "ETSI GS MEC 028 2.3.1, clause 7.8.3.1
... "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
[Setup] Delete a specified measurement configuration ${INVALID_MEASUREMENT_CONFIG_ID}
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
TC_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"
... Reference "ETSI GS MEC 028 2.3.1, clause 7.8.3.2
... "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
[Setup] Create a new measurement configuration ${MEAS_ID}
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
${path} Catenate SEPARATOR= jsons/ MeasurementConfigUpdate.json
......@@ -91,42 +102,55 @@ TP_MEC_MEC028_SRV_WAI_015_OK
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']['measurementId']} ${MEAS_ID}
Should Be Equal As Strings ${response['body']['measurementInfo']} ${json_object['measurementInfo']}
[TearDown] Delete a specified measurement configuration ${MEAS_ID}
TP_MEC_MEC028_SRV_WAI_015_NF
TC_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"
... Reference "ETSI GS MEC 028 2.3.1, clause 7.8.3.2
... "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
[Setup] Create a new measurement configuration ${MEAS_ID}
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
[TearDown] Delete a specified measurement configuration ${MEAS_ID}
TP_MEC_MEC028_SRV_WAI_016_OK
TC_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"
... Reference "ETSI GS MEC 028 2.3.1, clause 7.8.3.5
... "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
[Setup] Create a new measurement configuration ${MEAS_ID}
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
TC_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"
... Reference "ETSI GS MEC 028 2.3.1, clause 7.8.3.5
... "https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/MeasurementConfigLinkList"
[Setup] Delete a specified measurement configuration ${INVALID_MEASUREMENT_CONFIG_ID}
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
Check HTTP Response Status Code Is 404
*** Keywords ***
......@@ -136,18 +160,39 @@ Retrieve a list of list of measurement configurations
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/queries/measurement
GET ${apiRoot}/${apiName}/${apiVersion}/measurements
${output}= Output response
Set Suite Variable ${response} ${output}
Create a new measurement configuration
[Arguments] ${body}
[Arguments] ${measurementId}
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${path} Catenate SEPARATOR= jsons/ MeasurementConfig.json
${body} Get File ${path}
${json_data}= Evaluate json.loads('''${body}''') json
Set To Dictionary ${json_data} measurementId=${measurementId}
${modified_json_string}= Evaluate json.dumps(${json_data})
POST ${apiRoot}/${apiName}/${apiVersion}/measurements ${modified_json_string}
${output}= Output response
Set Suite Variable ${response} ${output}
Create a new measurement configuration from file
[Arguments] ${filename}
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}"}
POST ${apiRoot}/${apiName}/${apiVersion}/queries/measurements ${body}
${path} Catenate SEPARATOR= jsons/ ${filename} .json
${body} Get File ${path}
${json_data}= Evaluate json.loads('''${body}''') json
POST ${apiRoot}/${apiName}/${apiVersion}/measurements ${json_data}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -157,9 +202,9 @@ Retrieve a specified measurement configuration
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/queries/measurement/${MEAS_CONF_ID}
GET ${apiRoot}/${apiName}/${apiVersion}/measurements/${MEAS_CONF_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -168,14 +213,13 @@ Update a specified measurement configuration
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/queries/measurement/${MEAS_CONF_ID} ${body}
PUT ${apiRoot}/${apiName}/${apiVersion}/measurements/${MEAS_CONF_ID} ${content}
${output}= Output response
Set Suite Variable ${response} ${output}
Delete a specified measurement configuration
[Arguments] ${MEAS_CONF_ID}
Should Be True ${PIC_MEC_SYSTEM} == 1
......@@ -183,7 +227,7 @@ Delete a specified measurement configuration
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/queries/measurement/${MEAS_CONF_ID}
DELETE ${apiRoot}/${apiName}/${apiVersion}/measurements/${MEAS_CONF_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -4,11 +4,11 @@ ${apiName} wai
${apiVersion} v2
${MEC-APP_SCHEMA} http
${MEC-APP_HOST} 127.0.0.1
${MEC-APP_PORT} 8082
${MEC-APP_HOST} mockoon
${MEC-APP_PORT} 3001
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${STA_ID} 123
${MEAS_ID} 456
${MEAS_ID} 123
${INVALID_MEASUREMENT_CONFIG_ID} 999
\ No newline at end of file
......@@ -4,6 +4,9 @@
"macId": "123"
}
],
"staIdentity": {
"staId": "123"
},
"measurementId": "123",
"measurementInfo": {
"measurementDuration": 10
......
{
"StaIdentities": [
"statId": [
{
"macId": "123"
}
],
"measurementId": "123",
"measurementId": "321",
"measurementInfo": {
"measurementDuration": 10
},
......
......@@ -4,6 +4,9 @@
"macId": "123"
}
],
"staIdentity": {
"staId": "123"
},
"measurementId": "123",
"measurementInfo": {
"measurementDuration": 50
......
......@@ -14,8 +14,8 @@ Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_v
TP_MEC_MEC028_SRV_WAI_003_OK
[Documentation]
... Check that the IUT responds with the list of Station Point
... Reference "ETSI GS MEC 028 2.2.1, clause 7.4.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schema/StaInfo #Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.4.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schema/StaInfo
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the station information
......@@ -31,8 +31,8 @@ TP_MEC_MEC028_SRV_WAI_003_OK
TP_MEC_MEC028_SRV_WAI_004_OK
[Documentation]
... Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter
... Reference "ETSI GS MEC 028 2.2.1, clause 7.4.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schema/StaInfo #Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.4.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schema/StaInfo
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the station information using filters ${filter}
......@@ -49,8 +49,8 @@ TP_MEC_MEC028_SRV_WAI_004_OK
TP_MEC_MEC028_SRV_WAI_004_BR
[Documentation]
... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
... ETSI GS MEC 028 2.2.1, clause 7.4.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schema/StaInfo #Outdated
... ETSI GS MEC 028 2.3.1, clause 7.4.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schema/StaInfo
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
Retrieve the station information using filters ${bad_filter}
......
......@@ -4,8 +4,8 @@ ${apiName} wai
${apiVersion} v2
${MEC-APP_SCHEMA} http
${MEC-APP_HOST} 127.0.0.1
${MEC-APP_PORT} 8082
${MEC-APP_HOST} mockoon
${MEC-APP_PORT} 3001
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
......
{
"properties": {
"detail": {
"description": "A human-readable explanation specific to this occurrence of the problem",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
{
"properties": {
"detail": {
"description": "A human-readable explanation specific to this occurrence of the problem",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"instance": {
"description": "A URI reference that identifies the specific occurrence of the problem",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "URI"
},
"status": {
"description": "The HTTP status code for this occurrence of the problem",
"format": "uint32",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
},
"title": {
"description": "A short, human-readable summary of the problem type",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"type": {
"description": "A URI reference according to IETF RFC 3986 that identifies the problem type",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "URI"
}
},
"instance": {
"description": "A URI reference that identifies the specific occurrence of the problem",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "URI"
},
"status": {
"description": "The HTTP status code for this occurrence of the problem",
"format": "uint32",
"type": "integer",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "Uint32"
},
"title": {
"description": "A short, human-readable summary of the problem type",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "String"
},
"type": {
"description": "A URI reference according to IETF RFC 3986 that identifies the problem type",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "URI"
}
},
"type": "object"
}
\ No newline at end of file
"type": "object"
}
\ No newline at end of file
This diff is collapsed.
......@@ -5,6 +5,7 @@
Resource environment/variables.txt
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Library Collections
Library String
Library OperatingSystem
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
......@@ -13,24 +14,32 @@ Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_v
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.2.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription #Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
[Setup] Create New Subscription Info ${SUB_ID}
Set Suite Variable ${Location} ${response['headers']['Location']}
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']}
FOR ${assocStaSub} IN @{response['body']}
${passed} Run Keyword And Return Status Should Be Equal As Strings ${assocStaSub['_links']['self']['href']} ${HREF}
Exit For Loop If ${passed}
END
[TearDown] Remove Subscription Info ${Location}
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.2.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription #Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
[Setup] Create New Subscription Info ${SUB_ID}
Set Suite Variable ${Location} ${response['headers']['Location']}
Should Be True ${PIC_MEC_SYSTEM} == 1
Should Be True ${PIC_SERVICES} == 1
......@@ -38,31 +47,38 @@ TP_MEC_MEC028_SRV_WAI_006_OK
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}
[TearDown] Remove Subscription Info ${Location}
TP_MEC_MEC028_SRV_WAI_006_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.2.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription #Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
[Setup] Create New Subscription Info ${SUB_ID}
Set Suite Variable ${Location} ${response['headers']['Location']}
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
[TearDown] Remove Subscription Info ${Location}
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.2.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription #Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.5.3.1
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription
Retrieve the subscription information using wrong endpoint
Check HTTP Response Status Code Is 404
TP_MEC_MEC028_SRV_WAI_007_OK
[Documentation]
... Check that the IUT responds with a Notification Subscription
... Reference "ETSI GS MEC 028 2.2.1, clause 7.5.3.4
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription #Outdated
... Reference "ETSI GS MEC 028 2.3.1, clause 7.5.3.4
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.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
......@@ -75,8 +91,8 @@ TP_MEC_MEC028_SRV_WAI_007_OK
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.2.1, clause 7.5.3.4
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.1.1/WlanInformationApi.yaml#/schemas/AssocStaSubscription #Outdated
... ETSI GS MEC 028 2.3.1, clause 7.5.3.4
... https://forge.etsi.org/rep/mec/gs028-wai-api/blob/v2.3.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
......@@ -85,7 +101,7 @@ TP_MEC_MEC028_SRV_WAI_007_BR
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.2.1, clause 7.5.3.1
... Reference "ETSI GS MEC 028 2.3.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
......@@ -96,7 +112,7 @@ TP_MEC_MEC028_SRV_WAI_007_NF
Send a request for creating a subscription
[Arguments] ${content}
Log Creating a new subscription
#Set Headers {"Accept":"application/json"}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${path} Catenate SEPARATOR= jsons/ ${content}
......@@ -109,7 +125,7 @@ Send a request for creating a subscription
Send a request for creating a subscription using wrong endpoint
[Arguments] ${content}
Log Creating a new subscription
#Set Headers {"Accept":"application/json"}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${path} Catenate SEPARATOR= jsons/ ${content}
......@@ -122,7 +138,7 @@ 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 {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?subscription_type=${subscription_type}
......@@ -137,4 +153,29 @@ Retrieve the subscription information using wrong endpoint
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions_INVALID_URI
${output}= Output response
Set Suite Variable ${response} ${output}
\ No newline at end of file
Set Suite Variable ${response} ${output}
Create New Subscription Info
[Arguments] ${content}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${file}= Catenate SEPARATOR= jsons/ CreateAssocStaSubscription .json
${body}= Get File ${file}
${json_data}= Evaluate json.loads('''${body}''') json
${new_href}= Set Variable ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT}/${apiRoot}/${apiName}/${apiVersion}/subscriptions/${SUB_ID}
Set To Dictionary ${json_data["_links"]["self"]} href=${new_href}
${modified_json_string}= Evaluate json.dumps(${json_data})
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${modified_json_string}
${output}= Output response
Set Suite Variable ${response} ${output}
Remove Subscription Info
[Arguments] ${delete_url}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
DELETE ${delete_url}
\ No newline at end of file
......@@ -4,8 +4,8 @@ ${apiName} wai
${apiVersion} v2
${MEC-APP_SCHEMA} http
${MEC-APP_HOST} 127.0.0.1
${MEC-APP_PORT} 8082
${MEC-APP_HOST} mockoon
${MEC-APP_PORT} 3001
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
......@@ -14,5 +14,6 @@ ${SUB_TYPE} AssocStaSubscription
${SUB_FILTER} assoc_sta
${INVALID_SUB_FILTER} assocStaSub
${SUB_ID} 123
${HREF} /wai/v2/subscriptions/1
${CALLBACK_URI} http://callback.uri/1
\ No newline at end of file
{
"_links": {
"self": {
"href": "/wai/v2/subscriptions/1"
}
},
"apId": {
"macId": "macId01"
"ipAddress": ["192.168.1.1", "2001:db8::1"],
"macId": "00:1A:2B:3C:4D:5E",
"ssid": ["Network1", "Network2"]
},
"callbackReference": "http://example.com/callback",
"expiryDeadline": {
"nanoSeconds": 500000000,
"seconds": 1641234567
},
"callbackReference": "http://callback.uri/1",
"subscriptionType": "AssocStaSubscription"
}
\ No newline at end of file
}
\ No newline at end of file
{
"subscriptionType": "AssocStaSubscription",
"callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1",
"_links": {
"self": {
"href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123"
}
},
"expiryDeadline": {
"seconds": 1977836800,
"nanoSeconds": 0
},
"apId": {
"bssid": "005C0A0A0A0A",
"ssid": [
"myNetworkSsid"
],
"macId": "macId01",
"ipAddress": [
"10.10.100.1"
]
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment