diff --git a/SRV/UETAG/PlatUeIdentity.robot b/SRV/UETAG/PlatUeIdentity.robot index b1830b1fc711f85213b331b3f7b6dbfa5a8928e7..17de4cd92ce4ac741a694545ef255965dac13b88 100644 --- a/SRV/UETAG/PlatUeIdentity.robot +++ b/SRV/UETAG/PlatUeIdentity.robot @@ -12,7 +12,7 @@ Default Tags TC_MEC_SRV_UETAG *** Test Cases *** -Get UeIdentity tag information +Get UE Identity 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 @@ -31,9 +31,43 @@ Get UeIdentity tag information 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 -Register a UE Identity tag +Bad Request error on UE Identity Tag registration +# FIXME Which IE protocol should be invalid? + [Documentation] TC_MEC_SRV_UETAG_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 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_BR 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}/invalid/ue_identity_tag_info?ueIdentityTag=${UE_IDENTITY_TAG} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 400 + +Not Found error on UE Identity Tag registration + [Documentation] TC_MEC_SRV_UETAG_001_NF + # 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 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_NF 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/${NON_EXISTENT_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 404 + +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 @@ -41,11 +75,51 @@ Register a UE Identity tag [Tags] TP_MEC_SRV_UETAG_002_OK TP_MEC_SRV_UETAG + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"Basic YWxhZGRpbjpvcGVuc2VzYW1l"} # Preamble: Check that the user tag is not registered Check User Identity Tag state ${UE_IDENTITY_TAG} UNREGISTERED # 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 {"ueIdentityTags":[{"ueIdentityTag":"UeTagA","state":"REGISTERED"}]} + Post /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info {"ueIdentityTags":[{"ueIdentityTag":"${UE_IDENTITY_TAG}","state":"REGISTERED"}]} + ${output}= Output response + Set Suite Variable ${response} ${output} Check User Identity Tag state ${UE_IDENTITY_TAG} REGISTERED - Log ${UE_IDENTITY_TAG} was registered successfully + +Bad Request error on invalid state + [Documentation] TC_MEC_PLAT_UETAG_002_BR + # Check that the IUT responds with an error when an unauthorised request is sent 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_BR TP_MEC_SRV_UETAG + + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"Basic YWxhZGRpbjpvcGVuc2VzYW1l"} + # 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 {"ueIdentityTags":[{"ueIdentityTag":"${UE_IDENTITY_TAG}","state":"INVALID_STATE"}]} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 400 + +Precondition Failed error on invalid state + [Documentation] TC_MEC_PLAT_UETAG_002_PF + # Check that the IUT responds with ProblemDetails on information an invalid URI + # 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_PF TP_MEC_SRV_UETAG + + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"Basic YWxhZGRpbjpvcGVuc2VzYW1l"} + # 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 {"ueIdentityTags":[{"ueIdentityTag":"${UE_IDENTITY_TAG_INVALID_STATE}","state":"UNREGISTERED"}]} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 412 + # TODO Check ProblemDetails diff --git a/environment/variables.txt b/environment/variables.txt index 1a5525860faa90ce92d8457538be27550c9f66a4..664bfc07853a34dbe0f0bbe2709335f766dfece6 100644 --- a/environment/variables.txt +++ b/environment/variables.txt @@ -1,8 +1,12 @@ *** Variables *** -${MEC-APP_SCHEMA} http -${MEC-APP_HOST} 192.168.0.17 -${MEC-APP_PORT} 8081 -${ZONE_ID} zone01 -${APP_INSTANCE_ID} appInst01 -${UE_IDENTITY_TAG} UeTagA -${response} {} +${MEC-APP_SCHEMA} http +${MEC-APP_HOST} 172.28.4.87 +#${MEC-APP_HOST} 127.0.0.1 +#${MEC-APP_HOST} 192.168.0.17 +${MEC-APP_PORT} 8081 +${ZONE_ID} zone01 +${APP_INSTANCE_ID} appInst01 +${NON_EXISTENT_APP_INSTANCE_ID} appInst99 +${UE_IDENTITY_TAG} UeTagA +${UE_IDENTITY_TAG_INVALID_STATE} UeTagC +${response} {} diff --git a/resources/GenericKeywords.robot b/resources/GenericKeywords.robot index 6b3226b3a91745aae1d98f7a91a5857d78215c41..b609f8597ab1b04464cc3371410772a17d79e1e9 100644 --- a/resources/GenericKeywords.robot +++ b/resources/GenericKeywords.robot @@ -42,7 +42,7 @@ Should Be Present In Json List Check User Identity Tag state [Arguments] ${ue_identity_tag} ${state} - Log Check ueIdentityTag state + Log Check ueIdentityTag state ${state} Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"Basic YWxhZGRpbjpvcGVuc2VzYW1l"}