Commit f844d68f authored by Filipe Ferreira's avatar Filipe Ferreira
Browse files

MEC 014 negative test cases.

parent df5b513b
Loading
Loading
Loading
Loading
+379 −2
Original line number Original line Diff line number Diff line
@@ -102,6 +102,7 @@ Package plat_mp1_ue_identity {
            when {
            when {
               the IUT entity receives a vPUT containing
               the IUT entity receives a vPUT containing
                  Uri indicating value "ui/v1/{APP_INSTANCE_ID}/ue_identity_tag_info",
                  Uri indicating value "ui/v1/{APP_INSTANCE_ID}/ue_identity_tag_info",
                   If_Match indicating value PROPER_ETAG, 
                  body containing
                  body containing
                     ueIdentityTagsList containing
                     ueIdentityTagsList containing
                        ueIdentityTags containing
                        ueIdentityTags containing
@@ -143,6 +144,7 @@ Package plat_mp1_ue_identity {
         when commanded by a MEC Application"
         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",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ueIdentityTagsList",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/UeIdentityTagInfo"
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/UeIdentityTagInfo"


      Config Id Config_MEC_1
      Config Id Config_MEC_1
@@ -162,11 +164,12 @@ Package plat_mp1_ue_identity {
            when {
            when {
               the IUT entity receives a vPUT containing
               the IUT entity receives a vPUT containing
                  Uri indicating value "ui/v1/{APP_INSTANCE_ID}/ue_identity_tag_info",
                  Uri indicating value "ui/v1/{APP_INSTANCE_ID}/ue_identity_tag_info",
                  If_Match indicating value PROPER_ETAG, 
                  body containing
                  body containing
                     ueIdentityTagsList containing
                     ueIdentityTagsList containing
                        ueIdentityTags containing 
                        ueIdentityTags containing 
                           ueIdentityTag set to UE_IDENTITY_TAG,
                           ueIdentityTag indicating value UE_IDENTITY_TAG,
                           state set to UNREGISTERED
                           state indicating value UNREGISTERED
                        ;
                        ;
                     ;
                     ;
                  ;
                  ;
@@ -193,4 +196,378 @@ Package plat_mp1_ue_identity {
         }
         }
   }
   }



   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_UETAG_BI_001"
   
      Test objective
         "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",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ProblemDetails"
   
      Config Id Config_MEC_1
   
      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the MEC_APP entity having a app_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }
   
      // MEC 014, clause 5.2.2
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  Uri indicating value "ui/v1/{APP_INSTANCE_ID}/ue_identity_tag_info",
                  query_parameters containing
                     // Wrong parameter name should trigger an error response.
                     ueTag indicating value UE_IDENTITY_TAG
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 014, clause 7.3.3.1
               the IUT entity sends a HttpMsg containing
                  status_code set to "400 Bad Request"
                  body containing
                     ProblemDetails containing
                        detail set to any_value
                     ;
                  ; 
               ;
               to the MEC_APP entity
           }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_UETAG_BI_002"
   
      Test objective
         "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.1",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ProblemDetails"
   
      Config Id Config_MEC_1
   
      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the MEC_APP entity having a app_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }
   
      // MEC 014, clause 5.2.2
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a GET containing
                  Uri indicating value "ui/v1/{APP_INSTANCE_ID}/ue_identity_tag_info",
                  query_parameters containing
                     ueIdentityTag indicating value UE_IDENTITY_TAG
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 014, clause 7.3.3.1
               the IUT entity sends a HttpMsg containing
                  status_code set to "403 Forbidden"
                  body containing
                     ProblemDetails containing
                        detail set to any_value
                     ;
                  ; 
               ;
               to the MEC_APP entity
           }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_UETAG_BI_003"
   
      Test objective
         "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",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ProblemDetails"
   
      Config Id Config_MEC_1
   
      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the MEC_APP entity having a app_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }
   
      // MEC 014, clause 5.2.2
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  Uri indicating value "ui/v1/{UNKNOWN_APP_INSTANCE_ID}/ue_identity_tag_info",
                  query_parameters containing
                     ueIdentityTag indicating value UE_IDENTITY_TAG
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 014, clause 7.3.3.1
               the IUT entity sends a HttpMsg containing
                  status_code set to "404 Not Found"
                  body containing
                     ProblemDetails containing
                        detail set to any_value
                     ;
                  ; 
               ;
               to the MEC_APP entity
           }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_UETAG_BI_004"

      Test objective
         "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",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ueIdentityTagsList",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ProblemDetails"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the MEC_APP entity having a app_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }

      // MEC 014, clause 5.2.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  Uri indicating value "ui/v1/{APP_INSTANCE_ID}/ue_identity_tag_info",
x                  If_Match indicating value PROPER_ETAG, 
                  body containing
                     ueIdentityTagsList containing
                        ueIdentityTags containing 
                           ueIdentityTag set to UE_IDENTITY_TAG,
                           state set to INVALID_STATE
                        ;
                     ;
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 014, clause 7.3.3.2
               the IUT entity sends a HttpMsg containing
                  status_code set to "400 Bad Request"
                  body containing
                     ProblemDetails containing
                        detail set to any_value
                     ;
                  ; 
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_UETAG_BI_005"

      Test objective
         "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",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ueIdentityTagsList",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ProblemDetails"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the MEC_APP entity having a app_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }

      // MEC 014, clause 5.2.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a PUT containing
                  Uri indicating value "ui/v1/{APP_INSTANCE_ID}/ue_identity_tag_info",
                  If_Match indicating value PROPER_ETAG, 
                  body containing
                     ueIdentityTagsList containing
                        ueIdentityTags containing 
                           ueIdentityTag set to UE_IDENTITY_TAG,
                           state set to REGISTERED
                        ;
                     ;
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 014, clause 7.3.3.2
               the IUT entity sends a HttpMsg containing
                  status_code set to "403 Forbidden"
                  body containing
                     ProblemDetails containing
                        detail set to any_value
                     ;
                  ; 
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_UETAG_BI_006"

      Test objective
         "Check that the IUT responds with an error when
         a request for an unknown URI is sent by a MEC Application"

      Reference "ETSI GS MEC 014 V1.1.1, clause 7.3.3.2",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ueIdentityTagsList",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ProblemDetails"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the MEC_APP entity having a app_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }

      // MEC 014, clause 5.2.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  Uri indicating value "ui/v1/{UNKNOWN_APP_INSTANCE_ID}/ue_identity_tag_info",
x                  If_Match indicating value PROPER_ETAG, 
                  body containing
                     ueIdentityTagsList containing
                        ueIdentityTags containing 
                           ueIdentityTag set to UE_IDENTITY_TAG,
                           state set to REGISTERED
                        ;
                     ;
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 014, clause 7.3.3.2
               the IUT entity sends a HttpMsg containing
                  status_code set to "404 Not Found"
                  body containing
                     ProblemDetails containing
                        detail set to any_value
                     ;
                  ; 
               ;
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_UETAG_BI_007"

      Test objective
         "Check that the IUT responds with an error when
         a request sent by a MEC Application doesn't comply with a required condition"

      Reference "ETSI GS MEC 014 V1.1.1, clause 7.3.3.2",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ueIdentityTagsList",
         "https://forge.etsi.org/gitlab/mec/gs014-ue-identity-api/blob/master/UEidentityAPI.yaml#/definitions/ProblemDetails"

      Config Id Config_MEC_1

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the MEC_APP entity having a app_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }

      // MEC 014, clause 5.2.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  Uri indicating value "ui/v1/{APP_INSTANCE_ID}/ue_identity_tag_info",
x                  If_Match indicating value INVALID_ETAG, 
                  body containing
                     ueIdentityTagsList containing
                        ueIdentityTags containing 
                           ueIdentityTag set to UE_IDENTITY_TAG,
                           state set to UNREGISTERED
                        ;
                     ;
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 014, clause 7.3.3.2
               the IUT entity sends a HttpMsg containing
                  status_code set to "412 Precondition Failed"
                  body containing
                     ProblemDetails containing
                        detail set to any_value
                     ;
                  ; 
               ;
               to the MEC_APP entity
            }
         }
   }


}
}