diff --git a/SRV/RLOCLOOK/PlatRadioNodeLocation.robot b/SRV/RLOCLOOK/PlatRadioNodeLocation.robot index bc5109987fb546ef8bc6d9c9bc2304dd31a9b615..f995c18ffe6d568bfd552461947696f75609b541 100644 --- a/SRV/RLOCLOOK/PlatRadioNodeLocation.robot +++ b/SRV/RLOCLOOK/PlatRadioNodeLocation.robot @@ -25,7 +25,7 @@ TC_MEC_SRV_RLOCLOOK_001_OK Get the access points list ${ZONE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AccessPointList - Check Result Contains ${response['body']['accessPointList']} zoneId ${ZONE_ID} + Should Be Equal As Strings ${response['body']['accessPointList']['zoneId']} ${ZONE_ID} TC_MEC_SRV_RLOCLOOK_001_NF diff --git a/SRV/RLOCLOOK/schemas/AccessPointList.schema.json b/SRV/RLOCLOOK/schemas/AccessPointList.schema.json index 767e377ac77c05dca8ec4a308185288ed3dd45cc..50efd4edbdfc79a1e5740017c0e89b8ab08cc56b 100644 --- a/SRV/RLOCLOOK/schemas/AccessPointList.schema.json +++ b/SRV/RLOCLOOK/schemas/AccessPointList.schema.json @@ -1,124 +1,128 @@ { - "description": "A type containing list of access points.", - "type": "object", - "required": [ - "zoneId", - "resourceURL" - ], - "properties": { - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "example": "zone01" - }, - "accessPoint": { - "description": "Collection of the access point information list.", - "type": "array", - "items": { - "description": "A type containing access point information.", - "type": "object", - "required": [ - "accessPointId", - "connectionType", - "operationStatus", - "numberOfUsers", - "resourceURL" - ], - "properties": { - "accessPointId": { - "description": "Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element", - "type": "string", - "example": "001010000000000000000000000000001" - }, - "locationInfo": { - "description": "A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided.", - "type": "object", - "required": [ - "latitude", - "longitude", - "accuracy" - ], - "properties": { - "latitude": { - "type": "number", - "format": "float", - "example": "80.123" - }, - "longitude": { - "type": "number", - "format": "float", - "example": "70.123" - }, - "altitude": { - "type": "number", - "format": "float", - "example": "10.0" - }, - "accuracy": { - "type": "integer", - "format": "int32", - "example": "10" - } - } - }, - "connectionType": { - "description": "The connection type for the access point", - "type": "string", - "enum": [ - "Femto", - "LTE-femto", - "Smallcell", - "LTE-smallcell", - "Wifi", - "Pico", - "Micro", - "Macro", - "Wimax", - "Unknown" - ], - "example": "Macro" - }, - "operationStatus": { - "description": "The operation status of the access point", - "type": "string", - "enum": [ - "Serviceable", - "Unserviceable", - "Unknown" - ], - "example": "Serviceable" - }, - "numberOfUsers": { - "description": "The number of users currently on the access point.", - "type": "integer", - "format": "uint32", - "example": "7" - }, - "timezone": { - "description": "Time zone of access point", - "type": "string", - "format": "date-time", - "example": "2017-01-01T02:51:43Z" - }, - "interestRealm": { - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "type": "string", - "example": "LA" - }, - "resourceURL": { - "description": "Self referring URL.", - "type": "string", - "format": "uri", - "example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123" - } - } - } - }, - "resourceURL": { - "description": "Self referring URL.", - "type": "string", - "format": "uri", - "example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123" - } - } -} \ No newline at end of file + "properties": { + "accessPointList": { + "description": "A type containing list of access points.", + "type": "object", + "required": [ + "zoneId", + "resourceURL" + ], + "properties": { + "zoneId": { + "description": "Identifier of zone", + "type": "string", + "example": "zone01" + }, + "accessPoint": { + "description": "Collection of the access point information list.", + "type": "array", + "items": { + "description": "A type containing access point information.", + "type": "object", + "required": [ + "accessPointId", + "connectionType", + "operationStatus", + "numberOfUsers", + "resourceURL" + ], + "properties": { + "accessPointId": { + "description": "Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element", + "type": "string", + "example": "001010000000000000000000000000001" + }, + "locationInfo": { + "description": "A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided.", + "type": "object", + "required": [ + "latitude", + "longitude", + "accuracy" + ], + "properties": { + "latitude": { + "type": "number", + "format": "float", + "example": "80.123" + }, + "longitude": { + "type": "number", + "format": "float", + "example": "70.123" + }, + "altitude": { + "type": "number", + "format": "float", + "example": "10.0" + }, + "accuracy": { + "type": "integer", + "format": "int32", + "example": "10" + } + } + }, + "connectionType": { + "description": "The connection type for the access point", + "type": "string", + "enum": [ + "Femto", + "LTE-femto", + "Smallcell", + "LTE-smallcell", + "Wifi", + "Pico", + "Micro", + "Macro", + "Wimax", + "Unknown" + ], + "example": "Macro" + }, + "operationStatus": { + "description": "The operation status of the access point", + "type": "string", + "enum": [ + "Serviceable", + "Unserviceable", + "Unknown" + ], + "example": "Serviceable" + }, + "numberOfUsers": { + "description": "The number of users currently on the access point.", + "type": "integer", + "format": "uint32", + "example": "7" + }, + "timezone": { + "description": "Time zone of access point", + "type": "string", + "format": "date-time", + "example": "2017-01-01T02:51:43Z" + }, + "interestRealm": { + "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", + "type": "string", + "example": "LA" + }, + "resourceURL": { + "description": "Self referring URL.", + "type": "string", + "format": "uri", + "example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123" + } + } + } + }, + "resourceURL": { + "description": "Self referring URL.", + "type": "string", + "format": "uri", + "example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123" + } + } + } + } + } \ No newline at end of file diff --git a/SRV/UEAREASUB/PlatUeAreaSubscription.robot b/SRV/UEAREASUB/PlatUeAreaSubscription.robot index 426b21b2868a44d1cccbf7994e25937ca5a6a96b..979c773fe9ac2f649a950d696bf9e217e0a2ca50 100644 --- a/SRV/UEAREASUB/PlatUeAreaSubscription.robot +++ b/SRV/UEAREASUB/PlatUeAreaSubscription.robot @@ -26,9 +26,8 @@ TC_MEC_SRV_UEAREASUB_001_OK Create new subscription CircleNotificationSubscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is CircleNotificationSubscription - Check Result Contains ${response['body']['circleNotificationSubscription']} clientCorrelator ${UEAREASUB_CLIENT_ID} - Check Result Contains ${response['body']['circleNotificationSubscription']} callbackReference ${APP_UEAREASUB_CALLBACK_URI} - Check Result Contains ${response['body']['circleNotificationSubscription']} address ${IP_ADDRESS} + Should Be Equal As Strings ${response['body']['circleNotificationSubscription']['callbackReference']} ${APP_UEAREASUB_CALLBACK_URI} + Should Be Equal As Strings ${response['body']['circleNotificationSubscription']['address']} ${IP_ADDRESS} diff --git a/SRV/UEINFOSUB/PlatUeInformationSubscription.robot b/SRV/UEINFOSUB/PlatUeInformationSubscription.robot index 340d32720559a533fc740371f1d50c505ff632ea..34c101445226f2326634a0502e0c2182b52091cf 100644 --- a/SRV/UEINFOSUB/PlatUeInformationSubscription.robot +++ b/SRV/UEINFOSUB/PlatUeInformationSubscription.robot @@ -25,9 +25,8 @@ TC_MEC_SRV_UEINFOSUB_001_OK Create new subscription ZonalTrafficSubscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is ZonalTrafficSubscription - Check Result Contains ${response['body']['zonalTrafficSubscription']} clientCorrelator ${ZONAL_TRAF_SUB_CLIENT_ID} - Check Result Contains ${response['body']['zonalTrafficSubscription']} callbackReference ${ZONAL_TRAF_NOTIF_CALLBACK_URI} - Check Result Contains ${response['body']['zonalTrafficSubscription']} zoneId ${ZONAL_TRAF_ZONE_ID} + Should Be Equal As Strings ${response['body']['zonalTrafficSubscription']['callbackReference']} ${ZONAL_TRAF_NOTIF_CALLBACK_URI} + Should Be Equal As Strings ${response['body']['zonalTrafficSubscription']['zoneId']} ${ZONAL_TRAF_ZONE_ID} TC_MEC_SRV_UEINFOSUB_001_BR @@ -55,7 +54,7 @@ TC_MEC_SRV_UEINFOSUB_002_OK Check HTTP Response Status Code Is 204 -TC_MEC_SRV_UEDISTSUB_002_NF +TC_MEC_SRV_UEINFOSUB_002_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application diff --git a/SRV/UEINFOSUB/environment/variables.txt b/SRV/UEINFOSUB/environment/variables.txt index 3da4c6fffa4bec1be571ad1868a3fd29169ad71c..56b79c19706916d2368d912731af35b66bcca897 100644 --- a/SRV/UEINFOSUB/environment/variables.txt +++ b/SRV/UEINFOSUB/environment/variables.txt @@ -12,7 +12,7 @@ ${apiVersion} v2 # Specific variables ${ZONAL_TRAF_SUB_CLIENT_ID} 0123 ${ZONAL_TRAF_NOTIF_CALLBACK_URI} {"notifyURL": "http://clientApp.example.com/location_notifications/123456"} -${ZONAL_TRAF_ZONE_ID} zone01 +${ZONAL_TRAF_ZONE_ID} zone1 ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID \ No newline at end of file diff --git a/SRV/UEINFOSUB/schemas/ZonalTrafficSubscription.schema.json b/SRV/UEINFOSUB/schemas/ZonalTrafficSubscription.schema.json index 6325e7aa236653f8783e69cec5a6ed3b97e33a9a..6c9a35d36307177c7cd311aba463e0f70c202875 100644 --- a/SRV/UEINFOSUB/schemas/ZonalTrafficSubscription.schema.json +++ b/SRV/UEINFOSUB/schemas/ZonalTrafficSubscription.schema.json @@ -1,75 +1,71 @@ { - "name": "zonalTrafficSubscription", - "in": "body", - "description": "Zonal Traffic Subscription", - "required": true, - "schema": { - "description": "A type containing zonal traffic subscription", - "type": "object", - "required": [ - "callbackReference", - "zoneId" - ], - "properties": { - "clientCorrelator": { - "description": "Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription.", - "type": "string", - "example": "0123" - }, - "callbackReference": { - "description": "Notification callback definition.", - "type": "object", - "required": [ - "notifyURL" - ], - "properties": { - "notifyURL": { - "description": "The URL of your own listener application.", - "type": "string", - "format": "url", - "example": "http://clientApp.example.com/location_notifications/123456" - } - } - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "example": "zone01" - }, - "interestRealm": { - "description": "Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.).", - "type": "array", - "items": { - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "type": "string", - "example": "LA" - } - }, - "userEventCriteria": { - "description": "List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event.", - "type": "array", - "items": { - "description": "User event", - "type": "string", - "enum": [ - "Entering", - "Leaving", - "Transferring" - ], - "example": "Entering" - } - }, - "duration": { - "description": "Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid.", - "type": "string", - "example": "0" - }, - "resourceURL": { - "description": "Self referring URL.", - "type": "string", - "format": "uri", - "example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123" - } - } - } - } \ No newline at end of file + "zonalTrafficSubscription": { + "description": "A type containing zonal traffic subscription", + "type": "object", + "required": [ + "callbackReference", + "zoneId" + ], + "properties": { + "clientCorrelator": { + "description": "Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription.", + "type": "string", + "example": "0123" + }, + "callbackReference": { + "description": "Notification callback definition.", + "type": "object", + "required": [ + "notifyURL" + ], + "properties": { + "notifyURL": { + "description": "The URL of your own listener application.", + "type": "string", + "format": "url", + "example": "http://clientApp.example.com/location_notifications/123456" + } + } + }, + "zoneId": { + "description": "Identifier of zone", + "type": "string", + "example": "zone01" + }, + "interestRealm": { + "description": "Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.).", + "type": "array", + "items": { + "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", + "type": "string", + "example": "LA" + } + }, + "userEventCriteria": { + "description": "List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event.", + "type": "array", + "items": { + "description": "User event", + "type": "string", + "enum": [ + "Entering", + "Leaving", + "Transferring" + ], + "example": "Entering" + } + }, + "duration": { + "description": "Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid.", + "type": "string", + "example": "0" + }, + "resourceURL": { + "description": "Self referring URL.", + "type": "string", + "format": "uri", + "example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123" + } + } + } + } \ No newline at end of file diff --git a/SRV/UELOCLOOK/PlatUeLocationLookup.robot b/SRV/UELOCLOOK/PlatUeLocationLookup.robot index 7cbfe1f1bad003f293462765d2a8ea5bdbf96a51..780bafc8617edfca789aaab0bb4e186b9791ecc7 100644 --- a/SRV/UELOCLOOK/PlatUeLocationLookup.robot +++ b/SRV/UELOCLOOK/PlatUeLocationLookup.robot @@ -11,7 +11,8 @@ Library OperatingSystem Default Tags TC_MEC_SRV_UELOCLOOK - +*** Variables *** +${response} *** Test Cases *** @@ -20,7 +21,7 @@ TC_MEC_SRV_UELOCLOOK_001_OK ... Check that the IUT responds with a list for the location of User Equipments ... when queried by a MEC Application ... - ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.2 + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.3 ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo [Tags] PIC_MEC_PLAT PIC_SERVICES @@ -35,7 +36,7 @@ TC_MEC_SRV_UELOCLOOK_001_BR ... Check that the IUT responds with an error when ... a request with incorrect parameters is sent by a MEC Application ... - ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.2 + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.3 [Tags] PIC_MEC_PLAT PIC_SERVICES Get list of user equipments zone ${ZONE_ID} @@ -53,11 +54,47 @@ TC_MEC_SRV_UELOCLOOK_001_NF Get list of user equipments zoneId ${NON_EXISTENT_ZONE_ID} Check HTTP Response Status Code Is 404 + + + +TC_MEC_SRV_UELOCLOOK_002_OK + [Documentation] + ... Check that the IUT responds with a User Equipment information + ... when queried by a MEC Application + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.2 + ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo + + [Tags] PIC_MEC_PLAT PIC_SERVICES + Get specific user equipments ${USER_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is UserInfo + + +TC_MEC_SRV_UELOCLOOK_002_NF + [Documentation] + ... Check that the IUT responds with an error when + ... a request for an unknown URI is sent by a MEC Application + ... + ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.2 + + [Tags] PIC_MEC_PLAT PIC_SERVICES + Get specific user equipments ${NON_EXISTENT_USER_ID} + Check HTTP Response Status Code Is 404 + *** Keywords *** Get list of user equipments - [Arguments] ${key} ${value} + [Arguments] ${key} ${value} Set Headers {"Accept":"application/json"} Set Headers {"Authorization":"${TOKEN}"} Get ${apiRoot}/${apiName}/${apiVersion}/users?${key}=${value} ${output}= Output response Set Suite Variable ${response} ${output} + +Get specific user equipments + [Arguments] ${userId} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Get ${apiRoot}/${apiName}/${apiVersion}/users/${userId} + ${output}= Output response + Set Suite Variable ${response} ${output} diff --git a/SRV/UELOCLOOK/environment/variables.txt b/SRV/UELOCLOOK/environment/variables.txt index e1df76f50ced76c896a792f5f92e535c2cb49acf..c12a3a0e28afe6a526ec233b186ec69939203242 100644 --- a/SRV/UELOCLOOK/environment/variables.txt +++ b/SRV/UELOCLOOK/environment/variables.txt @@ -11,4 +11,6 @@ ${apiVersion} v2 # Specific variables ${ZONE_ID} zone01 +${USER_ID} ue1 +${NON_EXISTENT_USER_ID} NON_EXISTENT_USER_ID ${NON_EXISTENT_ZONE_ID} NON_EXISTENT_ZONE_ID \ No newline at end of file diff --git a/SRV/UELOCSUB/PlatUeLocationSubscription.robot b/SRV/UELOCSUB/PlatUeLocationSubscription.robot index 4ec9bcb555219f0fa4fae0603b98e738ac00594c..0b32cb9986cd57b7f68b5a53a770a003f9d6f1c2 100644 --- a/SRV/UELOCSUB/PlatUeLocationSubscription.robot +++ b/SRV/UELOCSUB/PlatUeLocationSubscription.robot @@ -13,7 +13,7 @@ Default Tags TC_MEC_SRV_UELOCSUB *** Variables *** - +${response} *** Test Cases ***