Commit 2843da8b authored by Yann Garcia's avatar Yann Garcia
Browse files

Create repository architecture proposal

parents
*** Settings ***
Documentation
... A test suite for validating Application Service Availability Query (APPSAQ) operations.
Resource ../../resources.robot
Default Tags TP_MEC_SRV_APPSAQ
*** Variables ***
*** Test Cases ***
Get the available MEC services for a given application instance
[Documentation]
... Check that the IUT responds with a list of available MEC services
... for a given application instance when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.0.8, clause 7.15.3.1
... OpenAPI https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/ServiceInfo
[Tags] TP_MEC_SRV_APPSAQ_001_OK TP_MEC_SRV_APPSAQ_BV
Given the Plaform IUT has a MEC Application instantiated
Log MEC 011, clause 5.2.5
# When the Plaform IUT entity receives a vGET for /mec_service_mgmt/v1/applications/${APP_INSTANCE_ID}/services
When the Plaform IUT entity receives a vGET for /${APP_INSTANCE_ID}/services
Log MEC 011, clause 7.15.3.1
Then the Plaform IUT sends a response 200 ServiceInfoList
MEC Applications sends incorrect parameters in request
[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 011 V2.0.8, clause 7.15.3.1
[Tags] TP_MEC_SRV_APPSAQ_001_BR TP_MEC_SRV_APPSAQ_BI
Given the Plaform IUT has a MEC Application instantiated
Log MEC 011, clause 5.2.5
Log Wrong parameter name should trigger an error response.
# When the Plaform IUT entity receives a vGET for /mec_service_mgmt/v1/applications/${APP_INSTANCE_ID}/services?instance_id=some_instance_id
When the Plaform IUT entity receives a vGET for /${APP_INSTANCE_ID}/services?instance_id=some_instance_id
Log MEC 011, clause 7.15.3.1
Then the Plaform IUT sends a response 400 ProblemDetails
New MEC Applications service registration
[Documentation]
... 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.8, clause 7.15.3.4
[Tags] TP_MEC_SRV_APPSAQ_002_OK TP_MEC_SRV_APPSAQ_BV
Given the Plaform IUT has a MEC Application instantiated
# TODO where does the __some_service__ data comes from?
Given a MEC Application subscribed to service notifications for __some_service__
Log MEC 011, clause 5.2.4
Log Wrong parameter name should trigger an error response.
# TODO where does the __some_data__ comes from?
# When the Plaform IUT entity receives a vPOST for /mec_service_mgmt/v1/applications/${APP_INSTANCE_ID}/services
When the Plaform IUT entity receives a vPOST for /${APP_INSTANCE_ID}/services __some_data__ ServiceInfo
Log MEC 011, clause 7.15.3.4
Then the Plaform IUT sends a response 201 ServiceInfo
And the Plaform IUT response header parameter Location __location__
Log MEC 011, clause 6.4.2
And the Plaform IUT sends a notification message to the subscribed MEC Applications with ServiceAvailabilityNotification
\ No newline at end of file
[Documentation] robot --outputdir ./outputs .SRV/UETAG/PlatUeIdentity.robot
... Test Suite to validate UE Identity Tag (UETAG) operations.
*** Settings ***
Resource environment/variables.txt
Resource resources/GenericKeywords.robot
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
Default Tags TC_MEC_SRV_UETAG
*** Variables ***
*** Test Cases ***
Get UeIdentity tag information
[Documentation] TC_MEC_SRV_UETAG_001_OK
... Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application
... Reference ETSI GS MEC 014 V1.1.1, clause 7.3.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/UeIdentityTagInfo
[Tags] TP_MEC_SRV_UETAG_001_OK TP_MEC_SRV_UETAG
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"Basic YWxhZGRpbjpvcGVuc2VzYW1l"}
Set Headers {"Content-Length":"0"}
Get /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info?ueIdentityTag=${UE_IDENTITY_TAG}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ueIdentityTagInfo
Log Check ueIdentityTagsList for ${UE_IDENTITY_TAG} element
Should Be Present In Json List ${response['body']['ueIdentityTagInfo']['ueIdentityTags']} ueIdentityTag ${UE_IDENTITY_TAG}
Log ${UE_IDENTITY_TAG} found
*** Test Cases ***
Register a UE Identity tag
[Documentation] TC_MEC_PLAT_UETAG_002_OK
... Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application
... Reference ETSI GS MEC 014 V1.1.1, clause 7.3.3.2
... Reference https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/UeIdentityTagInfo
[Tags] TP_MEC_SRV_UETAG_002_OK TP_MEC_SRV_UETAG
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"Basic YWxhZGRpbjpvcGVuc2VzYW1l"}
# Preamble: Check that the user tag is not registered
Check tag user ${UE_IDENTITY_TAG} 'UNREGISTERER'
# Test Body: Register the tag user and check that the IUT has registered the tag user
Post /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info { "userTagId": ${UE_IDENTITY_TAG}, "state": "REGISTER" }
Check tag user ${UE_IDENTITY_TAG} 'REGISTERER'
Log ${UE_IDENTITY_TAG} was registered successfully
*** Variables ***
${MEC-APP_SCHEMA} http
${MEC-APP_HOST} 192.168.0.5
${MEC-APP_PORT} 8081
${ZONE_ID} zone01
${APP_INSTANCE_ID} appInst01
${UE_IDENTITY_TAG} UeTagA
${response} {}
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 3.1.2 (Python 3.7.1 on win32)" generated="20190711 15:06:32.307" rpa="false">
<suite id="s1" name="PlatUeIdentity" source="C:\Users\yanng\Documents\STF569_RobotFramework\SRV\UETAG\PlatUeIdentity.robot">
<test id="s1-t1" name="Get UeIdentity tag information">
<kw name="... Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application">
<msg timestamp="20190711 15:06:32.676" level="FAIL">No keyword with name '... Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application' found.</msg>
<status status="FAIL" starttime="20190711 15:06:32.676" endtime="20190711 15:06:32.676"></status>
</kw>
<doc>TC_MEC_SRV_UETAG_001_OK</doc>
<tags>
<tag>TP_MEC_SRV_UETAG</tag>
<tag>TP_MEC_SRV_UETAG_001_OK</tag>
</tags>
<status status="FAIL" starttime="20190711 15:06:32.674" endtime="20190711 15:06:32.677" critical="yes">No keyword with name '... Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application' found.</status>
</test>
<test id="s1-t2" name="Register a UE Identity tag">
<kw name="... Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application">
<msg timestamp="20190711 15:06:32.680" level="FAIL">No keyword with name '... Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application' found.</msg>
<status status="FAIL" starttime="20190711 15:06:32.680" endtime="20190711 15:06:32.680"></status>
</kw>
<doc>TC_MEC_PLAT_UETAG_002_OK</doc>
<tags>
<tag>TP_MEC_SRV_UETAG</tag>
<tag>TP_MEC_SRV_UETAG_002_OK</tag>
</tags>
<status status="FAIL" starttime="20190711 15:06:32.678" endtime="20190711 15:06:32.681" critical="yes">No keyword with name '... Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application' found.</status>
</test>
<status status="FAIL" starttime="20190711 15:06:32.308" endtime="20190711 15:06:32.684"></status>
</suite>
<statistics>
<total>
<stat pass="0" fail="2">Critical Tests</stat>
<stat pass="0" fail="2">All Tests</stat>
</total>
<tag>
<stat pass="0" fail="2">TP_MEC_SRV_UETAG</stat>
<stat pass="0" fail="1">TP_MEC_SRV_UETAG_001_OK</stat>
<stat pass="0" fail="1">TP_MEC_SRV_UETAG_002_OK</stat>
</tag>
<suite>
<stat pass="0" fail="2" id="s1" name="PlatUeIdentity">PlatUeIdentity</stat>
</suite>
</statistics>
<errors>
<msg timestamp="20190711 15:06:32.335" level="ERROR">Error in file 'C:\Users\yanng\Documents\STF569_RobotFramework\SRV\UETAG\PlatUeIdentity.robot': Resource file 'environment\variables.txt' does not exist.</msg>
<msg timestamp="20190711 15:06:32.337" level="ERROR">Error in file 'C:\Users\yanng\Documents\STF569_RobotFramework\SRV\UETAG\PlatUeIdentity.robot': Resource file 'resources\GenericKeywords.robot' does not exist.</msg>
<msg timestamp="20190711 15:06:32.672" level="ERROR">Error in file 'C:\Users\yanng\Documents\STF569_RobotFramework\SRV\UETAG\PlatUeIdentity.robot': Resolving variable '${MEC-APP_SCHEMA}' failed: Variable '${MEC}' not found.</msg>
</errors>
</robot>
This source diff could not be displayed because it is too large. You can view the blob instead.
*** Settings ***
Resource environment/variables.txt
Resource GenericKeywords.robot
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
Library JSONSchemaLibrary schemas/
*** Keywords ***
Get User Equipment for location with filters
[Arguments] ${value}
Set Headers {"Accept":"application/json"}
Get /location/v2/users/${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
${status}= Convert To Integer ${expected_status}
Should Be Equal ${response['status']} ${status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
Check Location
[Arguments] ${value}
Log Check Location for userInfo element
Should be Equal ${response['body']['userInfo']['zoneId']} ${value}
Log Location OK
Should Be Present In Json List
[Arguments] ${expr} ${json_field} ${json_value}
Log Check if ${json_field} is present in ${expr} with the value ${value}
:FOR ${item} IN @{expr}
\ Exit For Loop If "${item['${json_field}']}" == "${json_value}"
Log Item found ${item}
[return] ${item}
Check tag user
[Arguments] ${ue_identity_tag} ${state}
Log Check ueIdentityTag state
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"Basic YWxhZGRpbjpvcGVuc2VzYW1l"}
Set Headers {"Content-Length":"0"}
Get /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info?ueIdentityTag=${ue_identity_tag}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ueIdentityTagInfo
Log Check ueIdentityTagsList for ${UE_IDENTITY_TAG} element
${result}= Should Be Present In Json List ${response['body']['ueIdentityTagInfo']['ueIdentityTags']} ueIdentityTag ${UE_IDENTITY_TAG}
Log ${UE_IDENTITY_TAG} found with state ${result}
Should Be Equal ${result} ${state}
{
"type": "array",
"items": {
"type": "object",
"required": [
"serInstanceId",
"version",
"state",
"transportInfo",
"serializer"
],
"properties": {
"serInstanceId": {
"type": "string"
},
"serName": {
"type": "string"
},
"serCategory": {
"type": "string"
},
"version": {
"type": "string"
},
"state": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"transportInfo": {
"type": "string"
},
"serializer": {
"type": "string"
},
"scopeOfLocality": {
"type": "string"
},
"consumedLocalOnly": {
"type": "string"
},
"isLocal": {
"type": "string"
}
}
}
}
{
"ProblemDetails": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/Problem.type"
},
"title": {
"$ref": "#/components/schemas/Problem.title"
},
"status": {
"$ref": "#/components/schemas/Problem.status"
},
"detail": {
"$ref": "#/components/schemas/Problem.detail"
},
"instance": {
"$ref": "#/components/schemas/Problem.instance"
}
}
},
"Problem.type": {
"type": "string",
"format": "uri",
"description": "A URI reference according to IETF RFC 3986 that identifies the problem type"
},
"Problem.title": {
"type": "string",
"description": "A short, human-readable summary of the problem type"
},
"Problem.status": {
"type": "integer",
"format": "uint32",
"description": "The HTTP status code for this occurrence of the problem"
},
"Problem.detail": {
"type": "string",
"description": "A human-readable explanation specific to this occurrence of the problem"
},
"Problem.instance": {
"type": "string",
"format": "uri",
"description": "A URI reference that identifies the specific occurrence of the problem"
},
"UeIdentityTagInfo": {
"description": "information of UE identity tag used in UE Identity feature",
"type": "object",
"required": [
"ueIdentityTags"
],
"properties": {
"ueIdentityTags": {
"$ref": "#/components/schemas/UeIdentityTags"
}
}
},
"UeIdentityTags": {
"description": "1 to N tags presented by a ME Application instance to a ME Platform",
"type": "array",
"items": {
"required": [
"ueIdentityTag",
"state"
],
"properties": {
"ueIdentityTag": {
"$ref": "#/components/schemas/UeIdentityTag"
},
"state": {
"$ref": "#/components/schemas/State"
}
}
}
},
"UeIdentityTag": {
"description": "Specific tag presented by a ME Application instance to a ME Platform",
"type": "string",
"example": "UeTagA"
},
"State": {
"description": "Status of the resource ueIdentityTagInfo",
"type": "string",
"enum": [
"UNREGISTERED",
"REGISTERED"
],
"example": "REGISTERED"
}
}
{
"UserInfo": {
"description": "A type containing user information.",
"type": "object",
"required": [
"address",
"accessPointId",
"zoneId",
"resourceURL"
],
"properties": {
"address": {
"description": "Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI).",
"type": "string",
"format": "uri",
"example": "acr:192.0.2.1"
},
"accessPointId": {
"description": "Identifier of access point, <E-CGI><Cell Portion ID> (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"
},
"zoneId": {
"description": "Identifier of zone",
"type": "string",
"example": "zone01"
},
"resourceURL": {
"description": "Self referring URL.",
"type": "string",
"format": "uri",
"example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123"
},
"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"
}
}
},
"contextLocationInfo": {
"description": "Contextual information of a user location (e.g., aisle, floor, room number, etc.)",
"type": "string",
"example": "GroundFloor"
},
"ancillaryInfo": {
"description": "Reserved for future use.",
"type": "string"
}
}
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment