Commit e9d6e38e authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance UETAG test cases

parent bd1b7d9f
...@@ -15,12 +15,12 @@ Request UE Identity Tag information ...@@ -15,12 +15,12 @@ Request UE Identity Tag information
[Documentation] TC_MEC_SRV_UETAG_001_OK [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 ... 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 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 ... Reference https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/UeIdentityTagInfo
Get UE Identity Tag information Get UE Identity Tag information
Check HTTP Response Status Code Is 200 Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ueIdentityTagInfo Check HTTP Response Body Json Schema Is ueIdentityTagInfo
Check Result Contains ${response['body']['ueIdentityTagInfo']['ueIdentityTags']} ueIdentityTag ${UE_IDENTITY_TAG} Check Result Contains ${response['body']['ueIdentityTagInfo']['ueIdentityTags']} ueIdentityTag ${UE_IDENTITY_TAG}
Request UE Identity Tag information using bad parameters Request UE Identity Tag information using bad parameters
[Documentation] TC_MEC_SRV_UETAG_001_BR [Documentation] TC_MEC_SRV_UETAG_001_BR
...@@ -44,13 +44,13 @@ Register an UE Identity Tag ...@@ -44,13 +44,13 @@ Register an UE Identity Tag
[Documentation] TP_MEC_SRV_UETAG_002_OK [Documentation] TP_MEC_SRV_UETAG_002_OK
... Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application ... 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 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 ... Reference https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/UeIdentityTagInfo
Update an UE Identity Tag {"ueIdentityTags":[{"ueIdentityTag":"${UE_IDENTITY_TAG}","state":"REGISTERED"}]} Update an UE Identity Tag {"ueIdentityTags":[{"ueIdentityTag":"${UE_IDENTITY_TAG}","state":"REGISTERED"}]}
Check HTTP Response Status Code Is 200 Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is UeIdentityTagInfo Check HTTP Response Body Json Schema Is UeIdentityTagInfo
Log Checking Postcondition Log Checking Postcondition
Check User Identity Tag state ${UE_IDENTITY_TAG} REGISTERED Check User Identity Tag state ${UE_IDENTITY_TAG} REGISTERED
Register an UE Identity Tag using invalid state Register an UE Identity Tag using invalid state
[Documentation] TP_MEC_SRV_UETAG_002_BR [Documentation] TP_MEC_SRV_UETAG_002_BR
...@@ -59,33 +59,34 @@ Register an UE Identity Tag using invalid state ...@@ -59,33 +59,34 @@ Register an UE Identity Tag using invalid state
... Reference https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/UeIdentityTagInfo ... Reference https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/UeIdentityTagInfo
Update an UE Identity Tag using invalid state {"ueIdentityTags":[{"ueIdentityTag":"${UE_IDENTITY_TAG}","state":"INVALID_STATE"}]} Update an UE Identity Tag using invalid state {"ueIdentityTags":[{"ueIdentityTag":"${UE_IDENTITY_TAG}","state":"INVALID_STATE"}]}
Check HTTP Response Status Code Is 400 Check HTTP Response Status Code Is 400
Unregister an UE Identity Tag already in unregistered state Unregister an UE Identity Tag already in unregistered state
[Documentation] TP_MEC_SRV_UETAG_002_PF [Documentation] TP_MEC_SRV_UETAG_002_PF
... Check that the IUT responds with ProblemDetails on information an invalid URI ... 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 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 ... Reference https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/UeIdentityTagInfo
Update an UE Identity Tag using a not applicable valid state {"ueIdentityTags":[{"ueIdentityTag":"${UE_IDENTITY_TAG_INVALID_STATE}","state":"UNREGISTERED"}]} Update an UE Identity Tag using a not applicable valid state {"ueIdentityTags":[{"ueIdentityTag":"${UE_IDENTITY_TAG_INVALID_STATE}","state":"UNREGISTERED"}]}
Check HTTP Response Status Code Is 412 Check HTTP Response Status Code Is 412
*** Keywords *** *** Keywords ***
Get UE Identity Tag information Get UE Identity Tag information
Should Be True ${PIC_MEC_PLAT} == '1' Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == '1' Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"} Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"} Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"} Set Headers {"Content-Length":"0"}
Get /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info?ueIdentityTag=${UE_IDENTITY_TAG} Get /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info?ueIdentityTag=${UE_IDENTITY_TAG}
${output}= Output response ${output}= Output response
Set Suite Variable ${response} ${output}
Get UE Identity Tag information using bad parameters Get UE Identity Tag information using bad parameters
# FIXME Which IE protocol should be invalid? # FIXME Which IE protocol should be invalid?
Should Be True ${PIC_MEC_PLAT} == '1' Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == '1' Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"} Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"} Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Authorization":"${TOKEN}"}
...@@ -96,8 +97,8 @@ Get UE Identity Tag information using bad parameters ...@@ -96,8 +97,8 @@ Get UE Identity Tag information using bad parameters
Get UE Identity Tag information using non-existent application instance Get UE Identity Tag information using non-existent application instance
Should Be True ${PIC_MEC_PLAT} == '1' Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == '1' Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"} Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"} Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Authorization":"${TOKEN}"}
...@@ -105,27 +106,28 @@ Get UE Identity Tag information using non-existent application instance ...@@ -105,27 +106,28 @@ Get UE Identity Tag information using non-existent application instance
Get /exampleAPI/ui/v1/${NON_EXISTENT_APP_INSTANCE_ID}/ue_identity_tag_info?ueIdentityTag=${UE_IDENTITY_TAG} Get /exampleAPI/ui/v1/${NON_EXISTENT_APP_INSTANCE_ID}/ue_identity_tag_info?ueIdentityTag=${UE_IDENTITY_TAG}
${output}= Output response ${output}= Output response
Set Suite Variable ${response} ${output} Set Suite Variable ${response} ${output}
Update an UE Identity Tag Update an UE Identity Tag
[Arguments] ${content} [Arguments] ${content}
Should Be True ${PIC_MEC_PLAT} == '1' Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == '1' Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"} Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"} Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Authorization":"${TOKEN}"}
## As far as I understood, we are not checking preconditions. ## As far as I understood, we are not checking preconditions.
# Preamble: Check that the user tag is not registered # Preamble: Check that the user tag is not registered
## Check User Identity Tag state ${UE_IDENTITY_TAG} UNREGISTERED ## Check User Identity Tag state ${UE_IDENTITY_TAG} UNREGISTERED
log ${content}
Put /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info ${content} Put /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info ${content}
${output}= Output response ${output}= Output response
Set Suite Variable ${response} ${output} Set Suite Variable ${response} ${output}
Update an UE Identity Tag using invalid state Update an UE Identity Tag using invalid state
[Arguments] ${content} [Arguments] ${content}
Should Be True ${PIC_MEC_PLAT} == '1' Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == '1' Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"} Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"} Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Authorization":"${TOKEN}"}
...@@ -133,12 +135,12 @@ Update an UE Identity Tag using invalid state ...@@ -133,12 +135,12 @@ Update an UE Identity Tag using invalid state
Put /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info ${content} Put /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info ${content}
${output}= Output response ${output}= Output response
Set Suite Variable ${response} ${output} Set Suite Variable ${response} ${output}
Update an UE Identity Tag using a not applicable valid state
Update an UE Identity Tag using a not applicable valid state
[Arguments] ${content} [Arguments] ${content}
Should Be True ${PIC_MEC_PLAT} == '1' Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == '1' Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"} Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"} Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Authorization":"${TOKEN}"}
...@@ -146,6 +148,5 @@ Update an UE Identity Tag using a not applicable valid state ...@@ -146,6 +148,5 @@ Update an UE Identity Tag using a not applicable valid state
Put /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info ${content} Put /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info ${content}
${output}= Output response ${output}= Output response
Set Suite Variable ${response} ${output} Set Suite Variable ${response} ${output}
# TODO Check ProblemDetails # TODO Check ProblemDetails
\ No newline at end of file
*** Variables *** *** Variables ***
${PIC_MEC_PLAT} 1 ${PIC_MEC_PLAT} 1
${PIC_SERVICES} 1 ${PIC_SERVICES} 1
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
${MEC-APP_SCHEMA} http ${MEC-APP_SCHEMA} http
#${MEC-APP_HOST} 172.28.4.87 #${MEC-APP_HOST} 172.28.4.87
#${MEC-APP_HOST} 127.0.0.1 #${MEC-APP_HOST} 127.0.0.1
${MEC-APP_HOST} 10.192.2.172 ${MEC-APP_HOST} 192.168.56.1
${MEC-APP_PORT} 8081 ${MEC-APP_PORT} 8081
${ZONE_ID} zone01 ${ZONE_ID} zone01
${APP_INSTANCE_ID} appInst01 ${APP_INSTANCE_ID} appInst01
......
...@@ -33,7 +33,6 @@ Should Be Present In Json List ...@@ -33,7 +33,6 @@ Should Be Present In Json List
Log Item found ${item} Log Item found ${item}
[return] ${item} [return] ${item}
Check Result Contains
Check Result Contains
[Arguments] ${source} ${parameter} ${value} [Arguments] ${source} ${parameter} ${value}
Should Be Present In Json List ${source} ${parameter} ${value} Should Be Present In Json List ${source} ${parameter} ${value}
\ No newline at end of file
...@@ -9,8 +9,8 @@ Library JSONSchemaLibrary schemas/ ...@@ -9,8 +9,8 @@ Library JSONSchemaLibrary schemas/
*** Keywords *** *** Keywords ***
Check User Identity Tag state Check User Identity Tag state
[Arguments] ${ue_identity_tag} ${state} [Arguments] ${ue_identity_tag} ${state}
Should Be True ${PIC_MEC_PLAT} == '1' Should Be True ${PIC_MEC_PLAT} 1
Should Be True ${PIC_SERVICES} == '1' Should Be True ${PIC_SERVICES} 1
Log Check ueIdentityTag state ${state} Log Check ueIdentityTag state ${state}
Set Headers {"Accept":"application/json"} Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"} Set Headers {"Content-Type":"application/json"}
......
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