Commit de80f966 authored by Michele Carignani's avatar Michele Carignani
Browse files

Merge branch 'ubi-M1'

parents f122c52d c1416799
Loading
Loading
Loading
Loading
+341 −0
Original line number Diff line number Diff line
/*
Copyright (c) ETSI 2018.

This software is subject to copyrights owned by ETSI. Non-exclusive permission
is hereby granted, free of charge, to copy, reproduce and amend this file
under the following conditions: It is provided "as is", without warranty of any
kind, expressed or implied.

ETSI shall never be liable for any claim, damages, or other liability arising
from its use or inability of use.This permission does not apply to any documentation
associated with this file for which ETSI keeps all rights reserved. The present
copyright notice shall be included in all copies of whole or part of this
file and shall not imply any sub-license right.
*/

Package MEC_MEO_UEAPPCTX {

   import all from MEC_Common;


   /*
    * UE Application Contexts (UEAPPCTX)
    */

   Test Purpose {
      TP Id "TP_MEC_MEO_UEAPPCTX_001_OK"

      Test objective
         "Check that the IUT acknowledges the creation of the application context
         when requested by an UE Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.4.3.4",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      // MEC 016, clause 5.1.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPOST containing
                  uri indicating value "mx2/v2/app_contexts",
                  body containing
                     AppContext containing
                        appInfo containing
                           appName set to APP_NAME
                        ;
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.4.3.4
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "201 Created",
                  Location set to LOCATION,
                  body containing
                     AppContext containing
                        appInfo containing
                           appName set to APP_NAME
                        ;
                     ;
                  ;
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_MEO_UEAPPCTX_001_BR"

      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 016 V2.1.1, clause 7.4.3.4",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      // MEC 016, clause 5.1.3
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPOST containing
                  uri indicating value "mx2/v2/app_contexts",
                  body containing
                     AppContext containing
                        appInfo containing
                           // Wrong parameter name should trigger an error response.
                           app set to APP_NAME
                        ;
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.4.3.4
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "400 Bad Request"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_MEO_UEAPPCTX_002_OK"

      Test objective
         "Check that the IUT updates the application callback reference
         when commanded by an UE Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.2",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}"
                  body containing
                     AppContext containing
                        callbackReference indicating value some_uri
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 017, clause 7.5.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "204 No Content"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_MEO_UEAPPCTX_002_BR"

      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 016 V2.1.1, clause 7.5.3.2",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}"
                  body containing
                     AppContext containing
                        // A parameter not legible for update should trigger an error response.
                        associateUeAppId indicating value some_value
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 017, clause 7.5.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "400 Bad Request"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_MEO_UEAPPCTX_002_NF"

      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 016 V2.1.1, clause 7.5.3.2",
         "https://forge.etsi.org/gitlab/mec/gs016-ue-app-api/blob/master/UEAppInterfaceApi.yaml#/definitions/AppContext"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity "not" having a appContext containing
            contextId indicating value NON_EXISTENT_CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  uri indicating value "mx2/v2/app_contexts/{NON_EXISTENT_CONTEXT_ID}",
                  body containing
                     AppContext containing
                        callbackReference indicating value some_uri
                     ;
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 017, clause 7.5.3.2
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_MEO_UEAPPCTX_003_OK"

      Test objective
         "Check that the IUT deletes the application context
         when commanded by an UE Application"

      Reference "ETSI GS MEC 016 V2.1.1, clause 7.5.3.5"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appContext containing
            contextId indicating value CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vDELETE containing
                  uri indicating value "mx2/v2/app_contexts/{CONTEXT_ID}"
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.5.3.5
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "204 No Content"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_MEO_UEAPPCTX_003_NF"

      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 016 V2.1.1, clause 7.5.3.5"

      Config Id Config_MEC_4

      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity "not" having a appContext containing
            contextId indicating value NON_EXISTENT_CONTEXT_ID
         ;
      }

      // MEC 016, clause 5.1.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vDELETE containing
                  uri indicating value "mx2/v2/app_contexts/{NON_EXISTENT_CONTEXT_ID}"
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.5.3.5
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found"
               ;
               to the UE_APP entity
            }
         }
   }
}
+7 −93
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ copyright notice shall be included in all copies of whole or part of this
file and shall not imply any sub-license right.
*/

Package sys_mx2_ue_applications {
Package MEC_MEO_UEAPPS {

   import all from MEC_Common;

@@ -23,7 +23,7 @@ Package sys_mx2_ue_applications {
    */

   Test Purpose {
      TP Id "TP_MEC_SYS_UEAPPS_001_OK"
      TP Id "TP_MEC_MEO_UEAPPS_001_OK"
   
      Test objective
      "Check that the IUT responds with the list of user applications available 
@@ -74,7 +74,7 @@ Package sys_mx2_ue_applications {


   Test Purpose {
      TP Id "TP_MEC_SYS_UEAPPS_001_BR"
      TP Id "TP_MEC_MEO_UEAPPS_001_BR"
   
      Test objective
         "Check that the IUT responds with an error when
@@ -119,93 +119,7 @@ Package sys_mx2_ue_applications {


   Test Purpose {
      TP Id "TP_MEC_SYS_UEAPPS_002_BI"
   
      Test objective
         "Check that the IUT responds with an error when
         a non-authenticated request is sent by a MEC Application"
   
      Reference "ETSI GS MEC 016 V2.1.1, clause 7.3.3.1"
   
      Config Id Config_MEC_4
   
      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appInfo containing
            appName indicating value APP_NAME
         ;
      }
   
      // MEC 016, clause 5.1.2
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a iGET containing
                  uri indicating value "mx2/v2/app_list",
                  query_parameters containing
                     appName indicating value APP_NAME
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.3.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "401 Unauthorized"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_UEAPPS_003_BI"
   
      Test objective
         "Check that the IUT responds with an error when
         an unauthorised request is sent by a MEC Application"
   
      Reference "ETSI GS MEC 016 V2.1.1, clause 7.3.3.1"
   
      Config Id Config_MEC_4
   
      PICS Selection PIC_MEC_SYSTEM and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appInfo containing
            appName indicating value APP_NAME
         ;
      }
   
      // MEC 016, clause 5.1.2
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a GET containing
                  uri indicating value "mx2/v2/app_list",
                  query_parameters containing
                     appName indicating value APP_NAME
                  ;
               ;
               from the UE_APP entity
            }
            then {
               // MEC 016, clause 7.3.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "403 Forbidden"
               ;
               to the UE_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_SYS_UEAPPS_004_NF"
      TP Id "TP_MEC_MEO_UEAPPS_001_NF"
   
      Test objective
         "Check that the IUT responds with an error when
@@ -219,8 +133,8 @@ Package sys_mx2_ue_applications {

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the UE_APP entity having a appInfo containing
            appName indicating value APP_NAME
         the UE_APP entity "not" having a appInfo containing
            appName indicating value NON_EXISTING_APP_NAME
         ;
      }
   
@@ -232,7 +146,7 @@ Package sys_mx2_ue_applications {
                  uri indicating value "mx2/v2/app_list",
                  query_parameters containing
                     // Wrong value should trigger an error response.
                     appName indicating value UNKNOWN_APP_NAME
                     appName indicating value NON_EXISTING_APP_NAME
                  ;
               ;
               from the UE_APP entity
+571 −0

File added.

Preview size limit exceeded, changes collapsed.

+387 −0

File added.

Preview size limit exceeded, changes collapsed.

+804 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading