Commit ce7743f1 authored by Elian Kraja's avatar Elian Kraja
Browse files

Update Test Purposes for MEC010-2 v2.0.9

parent ca2ae652
Loading
Loading
Loading
Loading
+1397 −0

File added.

Preview size limit exceeded, changes collapsed.

+799 −0

File added.

Preview size limit exceeded, changes collapsed.

+94 −0
Original line number Original line 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 MEC010_2_MEO_MM1_LCM_NOTIF {
   
   import all from MEC_Common;

   Test Purpose {
      TP Id "TP_MEC_MEO_MM1_LCM_NOTIF_001_v1"
      
      Test objective 
         "Check that the MEO sends an AppLcmOpOccNotification to the subscriber when the App Instance is enabled"
      
      Reference "ETSI GS MEC 010-2 2.0.9, clause 7.5.5.3.1",
              "ETSI GS MEC 010-2 2.0.9, table 6.2.2.18.2-1", // AppLcmOpOccNotification
              "ETSI GS MEC 010-2 2.0.9, table 6.2.2.17.2-1",  // AppLcmOpOccSubscriptionLinkList
              "ETSI GS MEC 010-2 2.0.9, table 6.2.2.4.2-1"  // AppInstanceInfo

      Config Id Config_MEC_3
      PICS Selection PIC_APP_LCM and PIC_APP_LCM_NOTIFICATIONS 

      Initial conditions  with {
         the IUT entity having a App_Instance containing
            appInstanceId set to APP_INSTANCE_ID,
            appDId set to APP_D_ID,
            appProvider set to APP_PROVIDER,
            appName set to APP_NAME,
            appSoftVersion set to APP_SOFT_VERSION,
            appDVersion set to APP_D_VEERSION,
            appPkgId set to APP_PKG_ID,
            instantiationState set to NOT_INSTANTIATED,
            _links containing
               self set to any_value
            ;
         ;
         and the IUT entity having a App_Package_subscription containing
            subscriptionId set to SUBSCRIPTION_ID,
            subscriptionType set to "AppLcmOpOccStateChangeSubscription",
            callbackUri set to URI,
            notificationType set to "NOT_INSTANTIATED",
            _links containing
               self set to "/alcmi/v1/subscriptions/{subscriptionId}"
            ;
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing
               notificationId set to any_value,
               notificationType set to "STARTING",
               subscriptionId set to SUBSCRIPTION_ID,
               timeStamp set to TIMESTAMP,
               appLcmOpOccId set to APP_LCM_OP_OCC_ID,
               appInstanceId set to APP_INSTANCE_ID,
               AppLcmOpOccSubscriptionLinkList containing
                  _links containing
                     self set to "/alcmi/v1/subscriptions/{subscriptionId}",
                     href set to "/alcmi/v1/app_instances/{appInstanceId}",
                     rel set to "STARTING"
                  ;
               ;
            ;
            from the MEC_OSS entity
         }
         then {
            the IUT entity sends a vPOST containing
               uri indicating value CALLBACK_URI,
               body containing
                  AppLcmOpOccNotification containing 
                     notificationId indicating value any_value,
                     notificationType indicating value "STARTING",
                     subscriptionId indicating value SUBSCRIPTION_ID,
                     appInstanceId set to APP_INSTANCE_ID
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }
   }

}
+0 −208
Original line number Original line 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 MEC010_2_MEO_MM1_PKGM_BO_BI {
   
   import all from MEC_Common;
   
   
   Test Purpose {
      TP Id "TP_MEC_MEO_MM1_PKGM_001_NEG_A"         //Negative case 400 Bad request
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a malformed request for creating a new App Package"
      
      Reference "ETSI GS MEC 010-2 1.2.2, clause 7.3.1.3.1",
              "ETSI GS MEC 010-2 1.2.2, Table 6.2.3.2.2-1"      //AppPkg
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE and PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/apmi/v1/app_packages",
               body containing
                  AppPkg containing
                     "not" appPkgName                  //mandatory attribute
                  ;
               ;
            ; from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ; to the MEC_OSS entity
         }
      }       
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEO_MM1_PKGM_001_NEG_B"         //Negative case 401 Unauthorized - no token
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a request for creating a new App Package without credentials"
      
      Reference "ETSI GS MEC 010-2 1.2.2, clause 7.3.1.3.1",
              "ETSI GS MEC 010-2 1.2.2, Table 6.2.3.2.2-1"      //AppPkg
              
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE and PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a POST containing 
               uri indicating value "/apmi/v1/app_packages",
               "not" authorization,               //Token is mandatory
               body containing
                  AppPkg containing
                     appPkgName set to any_value
                  ;
               ;
            ; from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the MEC_OSS entity
         }
      }       
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEO_MM1_PKGM_001_NEG_C"         //Negative case 401 Unauthorized - wrong token
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a request for creating a new App Package with wrong credentials"
      
      Reference "ETSI GS MEC 010-2 1.2.2, clause 7.3.1.3.1",
              "ETSI GS MEC 010-2 1.2.2, Table 6.2.3.2.2-1"      //AppPkg
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE and PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a HttpMsg containing
               headers set to vHeadersInvalidToken,      //wrong token
               uri indicating value "/apmi/v1/app_packages",
               body containing
                  AppPkg containing
                     appPkgName set to any_value
                  ;
               ;
            ; from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the MEC_OSS entity
         }
      }       
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEO_MM1_PKGM_001_NEG_D"         //Negative case 404 Not found
      
      Test objective 
         "Check that MEO responds with an error when it receives 
         a request for creating a new App Package to a wrong URI"
      
      Reference "ETSI GS MEC 010-2 1.2.2, clause 7.3.1.3.1",
              "ETSI GS MEC 010-2 1.2.2, Table 6.2.3.2.2-1"      //AppPkg
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE and PIC_APP_PACKAGE_MANAGEMENT

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing
               uri indicating value "/apmi/v1/appPackages",      //wrong URI
               body containing
                  AppPkg containing
                     appPkgName set to any_value
                  ;
               ;
            ; from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_OSS entity
         }
      }       
   }
   
   
   Test Purpose {
      TP Id "TP_MEC_MEO_MM1_PKGM_004_NEG_A"      //Negative case: 403 FORBIDDEN (operation not allowed due to the current status of the resource)
      
      Test objective
         "Check that MEO responds with an error when it receives 
         a request to enable an App Package that is already enabled"
      
      Reference "ETSI GS MEC 010-2 1.2.2, clause 7.3.2.3.3"
                
      Config Id Config_MEC_2
      PICS Selection PIC_APP_PACKAGE and PIC_APP_PACKAGE_MANAGEMENT 

      Initial conditions  with {
         the IUT entity having a App_Package containing
            appPkgId indicating value ON_BOARDED_APP_PKG_ID,
            operationalState set to "ENABLED";      //Ref. Table 6.2.3.3.2-1 MEC 010-2
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPUT containing 
               uri indicating value "/apmi/v1/app_packages/{ON_BOARDED_APP_PKG_ID}",
               uri_parameter appPkgOperation indicating value "ENABLE";      //Wrong since the app package is already enabled 
               from the MEC_OSS entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "403 Forbidden",
               body containing
                  problemDetails containing
                     status set to 403,
                     detail set to any_value
                  ;
               ;
            ;
            to the MEC_OSS entity
         }
      }
   }
}
+1166 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading