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

Create repository architecture proposal

parents
Loading
Loading
Loading
Loading
+75 −0
Original line number Original line Diff line number Diff line
*** 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
+52 −0
Original line number Original line Diff line number Diff line
[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
+8 −0
Original line number Original line Diff line number Diff line
*** 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}          {}

outputs/log.html

0 → 100644
+0 −0

File added.

Preview size limit exceeded, changes collapsed.

outputs/output.xml

0 → 100644
+49 −0
Original line number Original line Diff line number Diff line
<?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>