Skip to content
Snippets Groups Projects
Commit 66494ad4 authored by piscione's avatar piscione
Browse files

MEC013 v3.1.1 UEAREALOOK Draft TCs avaialable.

parent 1795252b
No related branches found
No related tags found
1 merge request!3Merge of TT027 branch into master
*** Settings ***
Documentation
... A test suite for validating UE Area Lookup (UEAREALOOK) operations.
Resource ../../../GenericKeywords.robot
Resource ../../../pics.txt
Resource environment/variables.txt
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
Library String
Default Tags TC_MEC_SRV_UEAREASUB
*** Test Cases ***
TP_MEC_MEC013_SRV_UEAREALOOK_001_OK_01
[Documentation]
... Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - No filter
...
... Reference ETSI GS MEC 013 3.1.1 Clause 5.3.2
... ETSI GS MEC 013 3.1.1 Clause 6.3.3
... ETSI GS MEC 013 3.1.1 Clause 7.16.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
[Setup] Create new subscription and get sub id UserAreaSubscription
Get all Subscriptions
Check HTTP Response Body Json Schema Is NotificationSubscriptionList
Check HTTP Response Status Code Is 200
Should Be Equal As Strings ${response['body']['subscription'][0]['subscriptionType']} UserAreaSubscription
[TearDown] Remove subscription ${SUB_ID}
TP_MEC_MEC013_SRV_UEAREALOOK_001_OK_02
[Documentation]
... Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - No filter
...
... Reference ETSI GS MEC 013 3.1.1 Clause 5.3.2
... ETSI GS MEC 013 3.1.1 Clause 6.3.8
... ETSI GS MEC 013 3.1.1 Clause 6.4.8
... ETSI GS MEC 013 3.1.1 Clause 7.16.3.4
[Tags] PIC_MEC_PLAT PIC_SERVICES
[Setup] Create new subscription and get sub id UserAreaSubscription
Get all Subscriptions with filter ${SUB_TYPE_FILTER}
Check HTTP Response Body Json Schema Is NotificationSubscriptionList
Check HTTP Response Status Code Is 200
Should Be Equal As Strings ${response['body']['subscription'][0]['subscriptionType']} UserAreaSubscription
[TearDown] Remove subscription ${SUB_ID}
TP_MEC_MEC013_SRV_UEAREALOOK_002_OK
[Documentation]
... Check that the IUT acknowledges the change of UE area subscription request
... when commanded by a MEC Application
...
... Reference ETSI GS MEC 013 3.1.1 Clause 6.3.8
... ETSI GS MEC 013 3.1.1 Clause 6.4.8
... ETSI GS MEC 013 3.1.1 Clause 7.17.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
[Setup] Create new subscription and get sub id UserAreaSubscription
Get specific Subscription ${SUB_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is UserAreaNotification
Should be Equal ${response['body']['notificationType']} UserAreaNotification
[TearDown] Remove subscription ${SUB_ID}
TP_MEC_MEC013_SRV_UEAREALOOK_002_NF
[Documentation]
... Check that the IUT responds with an error
... when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application
...
... Reference ETSI GS MEC 013 3.1.1 Clause 6.3.8
... ETSI GS MEC 013 3.1.1 Clause 6.4.8
... ETSI GS MEC 013 3.1.1 Clause 7.17.3.1
[Tags] PIC_MEC_PLAT PIC_SERVICES
[Setup] Remove subscription ${NON_EXISTING_SUBSCRIPTION_ID}
Get specific Subscription ${NON_EXISTING_SUBSCRIPTION_ID}
Check HTTP Response Status Code Is 404
*** Keywords ***
Create new subscription and get sub id
[Arguments] ${content}
Create new subscription ${content}
${elements} = Split String ${response['headers']['Location']} /
Set Suite Variable ${SUB_ID} ${elements[3]}
Get all Subscriptions
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/area
${output}= Output response
Set Suite Variable ${response} ${output}
Get specific Subscription
[Arguments] ${subscriptionId}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/area/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
Get all Subscriptions with filter
[Arguments] ${filter}
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/area?subscription_type=${filter}
${output}= Output response
Set Suite Variable ${response} ${output}
Create new subscription
[Arguments] ${content}
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}/subscriptions/area ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Remove subscription
[Arguments] ${subscriptionId}
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/area/${subscriptionId}
${output}= Output response
Set Suite Variable ${response} ${output}
*** Variables ***
# Generic variables
${SCHEMA} http
${HOST} 127.0.0.1
${PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} location
${apiVersion} v3
${SUB_TYPE_FILTER} event
${SUB_TYPE_FILTER_ERROR} dummy
${NON_EXISTING_SUBSCRIPTION_ID} NON_EXISTING_SUBSCRIPTION_ID
\ No newline at end of file
{
"subscriptionType": "UserAreaSubscription",
"areaDefine": {
"shape": 1,
"points": [
{
"latitide": 50,
"longitude": 52
}
],
"radius": 100
},
"addressList": [
"http://someuri.com/123"
],
"trackingAccuracy": 99
}
\ No newline at end of file
{
"description": "This type contains a list of subscriptions.",
"properties": {
"resourceURL": {
"properties": {
"href": {
"description": "URI referring to a resource.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uri"
}
},
"required": [
"href"
],
"type": "object",
"x-etsi-ref": "6.7.2"
},
"subscription": {
"items": {
"description": "",
"minItems": 0,
"properties": {
"href": {
"description": "The URI referring to the subscription.",
"format": "uri",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Uri"
},
"subscriptionType": {
"description": "Type of the subscription. The string shall be set according to the \"subscriptionType\" attribute of the associated subscription data type defined in clauses 6.3.4, 6.3.5, 6.3.6, 6.3.7 6.3.8 and 6.3.9:\n\"UserLocationEventSubscription\"\n\"UserLocationPeriodicSubscription\"\n\"ZoneLocationEventSubscription\"\n\"ZoneStatusSubscription\"\n\"UserAreaSubscription\"\n\"UserDistanceSubscription\"",
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "String"
}
},
"required": [
"href",
"subscriptionType"
],
"type": "object",
"x-etsi-mec-cardinality": "0..N",
"x-etsi-mec-origin-type": "Structure (inlined)"
},
"type": "array"
}
},
"required": [
"resourceURL"
],
"type": "object",
"x-etsi-ref": "6.3.3"
}
\ No newline at end of file
This diff is collapsed.
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