diff --git a/GenericKeywords.robot b/GenericKeywords.robot index 90d51c56a049fba2fa18634d6c73f3099a5ffabb..189f921c91b093f043ee554ff66a809089fe1761 100644 --- a/GenericKeywords.robot +++ b/GenericKeywords.robot @@ -23,12 +23,21 @@ Check HTTP Response Body Json Schema Is Should Be Present In Json List [Arguments] ${expr} ${json_field} ${json_value} - Log Check if ${json_field} is present in ${expr} with the value ${jsonvalue} + Log Check if ${json_field} is present in ${expr} with the value ${json_value} :FOR ${item} IN @{expr} \ Exit For Loop If "${item['${json_field}']}" == "${json_value}" Log Item found ${item} [return] ${item} + +Should Be Present In Json + [Arguments] ${expr} ${json_field} ${json_value} + Log Check if ${json_field} is present in ${expr} with the value ${json_value} + Should Be Equal As Strings ${expr}['${json_field}'] ${json_value} +Check Response Contains + [Arguments] ${source} ${parameter} ${value} + Should Be Present In Json ${source} ${parameter} ${value} + Check Result Contains [Arguments] ${source} ${parameter} ${value} Should Be Present In Json List ${source} ${parameter} ${value} diff --git a/SRV/APPSAQ/PlatAppServices.robot b/SRV/APPSAQ/PlatAppServices.robot index 49de49a889a5ebf6ce1d108e8ad5d993c52b492c..0f118f4c32adbdb80459bd82e96ff7271b8fd707 100644 --- a/SRV/APPSAQ/PlatAppServices.robot +++ b/SRV/APPSAQ/PlatAppServices.robot @@ -47,7 +47,7 @@ TC_MEC_SRV_APPSAQ_002_OK ... Check that the IUT notifies the authorised relevant (subscribed) application ... instances when a new service for a given application instance is registered ... - ... Reference ETSI GS MEC 011 V2.0.9, clause 8.2.6.3.4 + ... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.6.3.4 ... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo [Tags] PIC_MEC_PLAT PIC_SERVICES @@ -55,7 +55,7 @@ TC_MEC_SRV_APPSAQ_002_OK Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is ServiceInfo Check HTTP Response Header Contains Location - Check Result Contains ${response['body']} serName ${NEW_SERVICE_NAME} + Check Response Contains ${response['body']} serName ${NEW_SERVICE_NAME} TC_MEC_SRV_APPSAQ_002_BR @@ -96,7 +96,7 @@ TC_MEC_SRV_APPSAQ_003_OK Get individual service ${APP_INSTANCE_ID} ${SERVICE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfo - Check Result Contains ${response['body']} serInstanceId ${SERVICE_ID} + Check Response Contains ${response['body']} serInstanceId ${SERVICE_ID} TC_MEC_SRV_APPSAQ_003_NF @@ -123,7 +123,7 @@ TC_MEC_SRV_APPSAQ_004_OK Update service ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdated Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfo - Check Result Contains ${response['body']} version ${SVC_NEW_VERSION} + Check Response Contains ${response['body']} version ${SVC_NEW_VERSION} TC_MEC_SRV_APPSAQ_004_BR diff --git a/SRV/APPSUB/PlatAppSubscriptions.robot b/SRV/APPSUB/PlatAppSubscriptions.robot index 4472cd8c111f6e9af472b5901f9adeb59cf4df14..985fd68d01464040dade1c4e499ddb47d820dc88 100644 --- a/SRV/APPSUB/PlatAppSubscriptions.robot +++ b/SRV/APPSUB/PlatAppSubscriptions.robot @@ -52,8 +52,8 @@ TC_MEC_SRV_APPSUB_002_OK Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription Check HTTP Response Header Contains Location - Check Result Contains ${response['body']} subscriptionType "AppTerminationNotificationSubscription" - Check Result Contains ${response['body']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI} + Check Response Contains ${response['body']} subscriptionType AppTerminationNotificationSubscription + Check Response Contains ${response['body']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI} TC_MEC_SRV_APPSUB_003_OK @@ -68,7 +68,7 @@ TC_MEC_SRV_APPSUB_003_OK Get individual subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription - Check Result Contains ${response['body']} subscriptionType "AppTerminationNotificationSubscription" + Check Response Contains ${response['body']} subscriptionType AppTerminationNotificationSubscription TC_MEC_SRV_APPSUB_003_NF diff --git a/SRV/SAQ/PlatServices.robot b/SRV/SAQ/PlatServices.robot index a5350b30027ca0826d42e2a0a5cdcbdb844ca6ca..10c254df42f1bec105446c8995612220c63c6623 100644 --- a/SRV/SAQ/PlatServices.robot +++ b/SRV/SAQ/PlatServices.robot @@ -52,7 +52,7 @@ TC_MEC_SRV_SAQ_002_OK Get specific MEC service ${SERVICE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfo - Check Result Contains ${response['body']} serInstanceId ${SERVICE_ID} + Check Response Contains ${response['body']} serInstanceId ${SERVICE_ID} TC_MEC_SRV_SAQ_002_NF diff --git a/SRV/SRVSUB/PlatSrvSubscriptions.robot b/SRV/SRVSUB/PlatSrvSubscriptions.robot index 890d01a67b735a7765e7fbe177715977f5e40a8b..80ea22f55f549c2a2f03758ef5aa3a6a1a8fd1e3 100644 --- a/SRV/SRVSUB/PlatSrvSubscriptions.robot +++ b/SRV/SRVSUB/PlatSrvSubscriptions.robot @@ -52,8 +52,8 @@ TC_MEC_SRV_SRVSUB_002_OK Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is SerAvailabilityNotificationSubscription Check HTTP Response Header Contains Location - Check Result Contains ${response['body']} subscriptionType "SerAvailabilityNotificationSubscription" - Check Result Contains ${response['body']} callbackReference ${APP_SRVSUB_NOTIF_CALLBACK_URI} + Check Response Contains ${response['body']} subscriptionType "SerAvailabilityNotificationSubscription" + Check Response Contains ${response['body']} callbackReference ${APP_SRVSUB_NOTIF_CALLBACK_URI} TC_MEC_SRV_SRVSUB_002_BR @@ -81,7 +81,7 @@ TC_MEC_SRV_SRVSUB_003_OK Get individual subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SerAvailabilityNotificationSubscription - Check Result Contains ${response['body']} subscriptionType "SerAvailabilityNotificationSubscription" + Check Response Contains ${response['body']} subscriptionType SerAvailabilityNotificationSubscription TC_MEC_SRV_SRVSUB_003_NF diff --git a/SRV/SRVSUB/schemas/SerAvailabilityNotificationSubscription.json b/SRV/SRVSUB/schemas/SerAvailabilityNotificationSubscription.schema.json similarity index 100% rename from SRV/SRVSUB/schemas/SerAvailabilityNotificationSubscription.json rename to SRV/SRVSUB/schemas/SerAvailabilityNotificationSubscription.schema.json diff --git a/SRV/TRAF/PlatTrafficRules.robot b/SRV/TRAF/PlatTrafficRules.robot index 5001bf0b54bd83eb73314d1f447726b91553534a..f8cf514ca89ea001206f44e243bb836b74efc419 100644 --- a/SRV/TRAF/PlatTrafficRules.robot +++ b/SRV/TRAF/PlatTrafficRules.robot @@ -51,7 +51,7 @@ TC_MEC_SRV_TRAF_002_OK Get individual traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TrafficRule - Check Result Contains ${response['body']} trafficRuleId ${TRAFFIC_RULE_ID} + Check Response Contains ${response['body']} trafficRuleId ${TRAFFIC_RULE_ID} TC_MEC_SRV_TRAF_003_OK @@ -66,8 +66,8 @@ TC_MEC_SRV_TRAF_003_OK Update a traffic rule ${APP_INSTANCE_ID} ${TRAFFIC_RULE_ID} TrafficRuleUpdate Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is TrafficRule - Check Result Contains ${response['body']} trafficRuleId ${TRAFFIC_RULE_ID} - Check Result Contains ${response['body']} action "DROP" + Check Response Contains ${response['body']} trafficRuleId ${TRAFFIC_RULE_ID} + Check Response Contains ${response['body']} action DROP TC_MEC_SRV_TRAF_003_BR diff --git a/SRV/UELOCLOOK/schemas/UserInfo.schema.json b/SRV/UELOCLOOK/schemas/UserInfo.schema.json index d337f92e794618166440bc43ceef02579cb1f78f..c1aed9f68ab9080e20c16e00eadb34b17b52a4a7 100644 --- a/SRV/UELOCLOOK/schemas/UserInfo.schema.json +++ b/SRV/UELOCLOOK/schemas/UserInfo.schema.json @@ -1,155 +1,144 @@ { "type": "object", "properties": { - "userInfo": { - "type": "object", + "accessPointId": { + "description": "The identity of the access point the user is currently on, see note 1.", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "String" + }, + "address": { + "description": "Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) currently on the access point, see note 1.", + "format": "uri", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "AnyURI" + }, + "ancillaryInfo": { + "description": "Reserved for future use.", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "contextLocationInfo": { + "description": "Contextual information of a user location (e.g. aisle, floor, room number, etc.).", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "locationInfo": { "properties": { - "accessPointId": { - "description": "The identity of the access point the user is currently on, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" + "accuracy": { + "type": "number" }, - "address": { - "description": "Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) currently on the access point, see note 1.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "AnyURI" + "accuracyAltitude": { + "type": "number" }, - "ancillaryInfo": { - "description": "Reserved for future use.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" + "accuracySemiMinor": { + "type": "number" }, - "contextLocationInfo": { - "description": "Contextual information of a user location (e.g. aisle, floor, room number, etc.).", - "type": "string", + "altitude": { + "description": "Location altitude relative to the WGS84 ellipsoid surface.", + "type": "number", "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" + "x-etsi-mec-origin-type": "Float" + }, + "confidence": { + "type": "number" + }, + "includedAngle": { + "type": "number" + }, + "innerRadius": { + "type": "number" }, - "locationInfo": { - "properties": { - "accuracy": { - "type": "number" - }, - "accuracyAltitude": { - "type": "number" - }, - "accuracySemiMinor": { - "type": "number" - }, - "altitude": { - "description": "Location altitude relative to the WGS84 ellipsoid surface.", - "type": "number", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Float" - }, - "confidence": { - "type": "number" - }, - "includedAngle": { - "type": "number" - }, - "innerRadius": { - "type": "number" - }, - "latitude": { - "description": "Location latitude, expressed in the range -90° to +90°. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "type": "number" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "longitude": { - "description": "Location longitude, expressed in the range -180° to +180°. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "type": "number" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "offsetAngle": { - "type": "number" - }, - "orientationMajorAxis": { - "type": "number" - }, - "shape": { - "description": "Shape information, as detailed in [14], associated with the reported location coordinate:\n1 = Ellipsoid_Arc\n2 = ellipsoid_Point\n3 = ellipsoid_Point_Altitude\n4 = ellipsoid_Point_Altitude_Uncert_Ellipsoid\n5 = ellipsoid_Point_Uncert_Circle\n6 = ellipsoid_Point_Uncert_Ellipse\n7 = polygon", - "enum": [ - "ELLIPSOID_ARC", - "ELLIPSOID_POINT", - "ELLIPSOID_POINT_ALTITUDE", - "ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID", - "ELLIPSOID_POINT_UNCERT_CIRCLE", - "ELLIPSOID_POINT_UNCERT_ELLIPSE", - "POLYGON" - ], - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum (inlined)" - }, - "uncertaintyRadius": { - "type": "number" - }, - "velocity": { - "description": "Structure with attributes relating to the target entity’s velocity, as defined in [14].", - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } + "latitude": { + "description": "Location latitude, expressed in the range -90° to +90°. Cardinality greater than one only if \"shape\" equals 7.", + "items": { + "type": "number" }, - "required": [ - "latitude", - "longitude", - "shape" - ], - "type": "object", - "x-etsi-ref": "6.5.3" + "minItems": 1, + "type": "array", + "x-etsi-mec-cardinality": "1..N", + "x-etsi-mec-origin-type": "Float" + }, + "longitude": { + "description": "Location longitude, expressed in the range -180° to +180°. Cardinality greater than one only if \"shape\" equals 7.", + "items": { + "type": "number" + }, + "minItems": 1, + "type": "array", + "x-etsi-mec-cardinality": "1..N", + "x-etsi-mec-origin-type": "Float" }, - "resourceURL": { - "description": "Self-referring URL, see note 1.", + "offsetAngle": { + "type": "number" + }, + "orientationMajorAxis": { + "type": "number" + }, + "shape": { + "description": "Shape information, as detailed in [14], associated with the reported location coordinate:\n1 = Ellipsoid_Arc\n2 = ellipsoid_Point\n3 = ellipsoid_Point_Altitude\n4 = ellipsoid_Point_Altitude_Uncert_Ellipsoid\n5 = ellipsoid_Point_Uncert_Circle\n6 = ellipsoid_Point_Uncert_Ellipse\n7 = polygon", "type": "string", "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" + "x-etsi-mec-origin-type": "Enum_inlined" }, - "timeStamp": { - "properties": { - "nanoSeconds": { - "type": "number" - }, - "seconds": { - "type": "number" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], + "uncertaintyRadius": { + "type": "number" + }, + "velocity": { + "description": "Structure with attributes relating to the target entity’s velocity, as defined in [14].", "type": "object", - "x-etsi-ref": "6.5.2" + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Structure (inlined)" + } + }, + "required": [ + "latitude", + "longitude", + "shape" + ], + "type": "object", + "x-etsi-ref": "6.5.3" + }, + "resourceURL": { + "description": "Self-referring URL, see note 1.", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "String" + }, + "timeStamp": { + "properties": { + "nanoSeconds": { + "type": "number" }, - "zoneId": { - "description": "The identity of the zone the user is currently within, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" + "seconds": { + "type": "number" } }, "required": [ - "address", - "accessPointId", - "zoneId", - "resourceURL", - "timeStamp" + "seconds", + "nanoSeconds" ], - "x-etsi-notes": ":\tAs specified in [5], clause 5.2.2.7.\nNOTE 2: \tAs specified in [5], clause 5.2.2.5.", - "x-etsi-ref": "6.2.2" + "type": "object", + "x-etsi-ref": "6.5.2" + }, + "zoneId": { + "description": "The identity of the zone the user is currently within, see note 1.", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "String" } - } -} + }, + "required": [ + "address", + "accessPointId", + "zoneId", + "resourceURL", + "timeStamp" + ], + "description": "Represents the information related to a user attached to an access point associated to the MEC host, such access point is in scope of the Location Service instance.\n", + "x-etsi-notes": ":\tAs specified in [5], clause 5.2.2.7.\nNOTE 2: \tAs specified in [5], clause 5.2.2.5.", + "x-etsi-ref": "6.2.2" +} \ No newline at end of file