Commit 47752b4d authored by piscione's avatar piscione
Browse files

Updated MEC010p2 TCs to v3.1.1

parent 0f15c1be
Loading
Loading
Loading
Loading
+0 −631
Original line number Diff line number Diff line
/*
Copyright (c) ETSI 2018-2023.
Released under BSD 3-clause license. For more information visit https://forge.etsi.org/legal-matters
*/
Package MEC_MEC010p2_APP_INSTANCE_LCM_BI {
   
   import all from MEC_Common;
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_001_BR"
      
      Test objective 
         "Check that MEC API provider sends an error when it receives a malformed request 
          for the creation of a new App Instance"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.1.3.1",
              "ETSI GS MEC 010-2 2.2.1, Table 6.2.2.3.2-1",      //CreateAppInstanceRequest
              "ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1"      //AppInstanceInfo
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_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 "/app_lcm/v1/app_instances",
               body containing
                  CreateAppInstanceRequest containing
                     appDDDId set to APP_D_ID //Wrong parameter into the request body
                  ;
               ;
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ; to the MEC_CONSUMER entity
         }
      }       
   }

   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_003_NF"   // Wrong APP_INSTANCE_ID
      
      Test objective 
         "Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.2.3.2",
              "ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1"      //AppInstanceInfo
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Instance containing
            appInstanceId indicating value NON_EXISTENT_APP_INSTANCE_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing 
               uri indicating value "/app_lcm/v1/app_instances/{NON_EXISTENT_APP_INSTANCE_ID}"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  
   

   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_004_NF"   // Wrong APP_INSTANCE_ID
      
      Test objective 
         "Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.2.3.4",
              "ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1"      //AppInstanceInfo
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Instance containing
            appInstanceId indicating value NON_EXISTENT_APP_INSTANCE_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vDELETE containing
               uri indicating value "/app_lcm/v1/app_instances/{NON_EXISTENT_APP_INSTANCE_ID}"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  
   

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_005_BR"
      
      Test objective 
         "Check that MEC API provider service fails to instantiate an App Instance when it receives a malformed request"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.6.3.1",
                    "ETSI GS MEC 010-2 2.2.1, table 6.2.2.7.2-1" // InstantiateAppRequest
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity having a App_Instance containing
            appInstanceId indicating value APP_INSTANCE_ID,
            instantiationState indicating value NOT_INSTANTIATED   
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/{APP_INSTANCE_ID}/instantiate",
               body containing
                  InstantiateAppRequest containing
                     appERRORId set to APP_INSTANCE_ID	//wrong name of the parameter
                  ;
               ;
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad request"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_005_NF"   // Wrong APP_INSTANCE_ID
      
      Test objective 
         "Check that MEC API provider service fails to instantiate an App Instance when it receives a request 
          related to a not existing App Instance"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.6.3.1",
                    "ETSI GS MEC 010-2 2.2.1, table 6.2.2.7.2-1" // InstantiateAppRequest
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Instance containing
            appInstanceId indicating value NON_EXISTENT_APP_INSTANCE_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/{NON_EXISTENT_APP_INSTANCE_ID}/instantiate"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  
  
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_006_BR"
      
      Test objective 
         "Check that MEC API provider service fails to terminate an App Instance when it receives a malformed request"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.7.3.1",
                    "ETSI GS MEC 010-2 2.2.1, table 6.2.2.9.2-1" // TerminateAppRequest
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity having a App_Instance containing
            appInstanceId indicating value APP_INSTANCE_ID,
            instantiationState indicating value INSTANTIATED   
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/{APP_INSTANCE_ID}/terminate",
               body containing
                  TerminateAppRequest containing
                     terminationERRORType set to GRACEFUL		//wrong parameter
                  ;
               ;
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad request"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_006_NF"   // Wrong APP_INSTANCE_ID
      
      Test objective 
         "Check that MEC API provider service fails to terminate an App Instance when it receives a request 
          related to a not existing App Instance"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.7.3.1",
                    "ETSI GS MEC 010-2 2.2.1, table 6.2.2.9.2-1" // TerminateAppRequest
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Instance containing
            appInstanceId indicating value NON_EXISTENT_APP_INSTANCE_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/{NON_EXISTENT_APP_INSTANCE_ID}/terminate"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }    

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_007_BR"
      
      Test objective 
         "Check that MEC API provider service fails to operate on an App Instance when it receives a malformed request"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.8.3.1",
                    "ETSI GS MEC 010-2 2.2.1, table 6.2.2.8.2-1" // OperateAppRequest
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity having a App_Instance containing
            appInstanceId indicating value APP_INSTANCE_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/{APP_INSTANCE_ID}/operate",
               body containing
                  OperateAppRequest containing
                     changeERRORStateTo set to any_value		//wrong parameter
                  ;
               ;
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad request"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  
   
      Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_007_NF"   // Wrong APP_INSTANCE_ID
      
      Test objective 
         "Check that MEC API provider service fails to change the status of an App Instance when it receives a request 
          related to a not existing App Instance"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.8.3.1",
                    "ETSI GS MEC 010-2 2.2.1, table 6.2.2.8.2-1" // OperateAppRequest
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Instance containing
            appInstanceId indicating value NON_EXISTENT_APP_INSTANCE_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/{NON_EXISTENT_APP_INSTANCE_ID}/operate"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }
   
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_009_NF"
      
      Test objective 
         "Check that MEC API provider service sends an error when it receives a query for a not existing LCM Operation Occurrence"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.10.1.3.2",
                    "ETSI GS MEC 010-2 2.2.1, table 6.2.2.13.2-1" // AppLcmOpOcc 
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Lcm_Op_Occ containing
            appLcmOpOccId indicating value NON_EXISTENT_APP_LCM_OP_OCC_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/app_lcm/v1/app_lcm_op_occs/{NON_EXISTENT_APP_LCM_OP_OCC_ID}"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }
   
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_010_BR"
      
      Test objective 
         "Check that MEC API provider service sends an error when it receives a malformed request to create a LCM Subscription"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.1",
             "ETSI GS MEC 010-2 2.2.1, table 6.2.2.12.2-1",   // AppInstSubscriptionRequest
             "ETSI GS MEC 010-2 2.2.1, table 6.2.2.14.2-1",   // AppLcmOpOccSubscriptionRequest
             "ETSI GS MEC 010-2 2.2.1, table 6.2.2.25.2-1",   // AppInstIdCreationSubscriptionRequest
             "ETSI GS MEC 010-2 2.2.1, table 6.2.2.28.2-1",   // AppInstIdDeletionSubscriptionRequest
             "ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1",    //AppInstSubscriptionInfo
             "ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1",    // AppLcmOpOccSubscriptionInfo
             "ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1",    // AppInstIdCreationSubscriptionInfo
             "ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1"    // AppInstIdDeletionSubscriptionInfo
                  
                 
      Config Id Config_MEC_6
      PICS Selection PIC_APP_LCM_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 "/app_lcm/v1/subscriptions"
               body containing
                  AppInstSubscriptionRequest containing
                     callbackERRORUri set to CALLBACK_URI		//wrong parameter
                  ;
               ;
            ;
            from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ;         
            to the MEC_CONSUMER entity
         }
      }
   }

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_012_NF"
      
      Test objective 
         "Check that MEC API provider service sends an error when it receives a query for a not existing LCM Subscription"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.2"
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Instance_Subscription containing
            subscriptionId set to NON_EXISTENT_SUBSCRIPTION_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing 
               uri indicating value "/app_lcm/v1/subscriptions/{NON_EXISTENT_SUBSCRIPTION_ID}"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_013_NF"
      
      Test objective 
         "Check that MEC API provider service sends an error when it receives a deletion request for a not existing LCM Subscription"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.4"
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_Instance_Subscription containing
            subscriptionId set to NON_EXISTENT_SUBSCRIPTION_ID
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vDELETE containing 
               uri indicating value "/app_lcm/v1/subscriptions/{NON_EXISTENT_SUBSCRIPTION_ID}"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  
      
	Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_014_BR"
      
      Test objective 
         "Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a malformed request"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.11.3.1",
                    "ETSI GS MEC 010-2 2.2.1, table 6.2.2.32.2-1" // CancelMode
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity having a App_LCM_op_occ containing
            id indicating value APP_LCM_OP_OCC_ID;
         }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/app_lcm_op_occs/{APP_LCM_OP_OCC_ID}/cancel",
               body containing
                  CancelMode containing
                     CancelMode set to GRACEFULLL		//It should be GRACEFUL
                  ;
               ;
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad request"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  
   
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_014_NF"   // Wrong APP_INSTANCE_ID
      
      Test objective 
         "Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a request 
          related to a not existing application LCM Operation"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.11.3.1",
                    "ETSI GS MEC 010-2 2.2.1, table 6.2.2.32.2-1" // CancelMode
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_LCM_op_occ containing
            id indicating value NON_EXISTENT_APP_LCM_OP_OCC_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/app_lcm_op_occs/{NON_EXISTENT_APP_INSTANCE_ID}/cancel"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }
    
    
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_015_NF"
      
      Test objective 
         "Check that MEC API provider service fails to make failed an on going LCM Operation when it receives a request 
          related to a not existing application LCM Operation"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.12.3.1"
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
          the IUT entity not having a App_LCM_op_occ containing
            id indicating value NON_EXISTENT_APP_LCM_OP_OCC_ID;
         
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/app_lcm_op_occs/{NON_EXISTENT_APP_INSTANCE_ID}/fail"
               
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  
   
   
   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_016_NF"   // Wrong APP_INSTANCE_ID
      
      Test objective 
         "Check that MEC API provider service fails to retry an LCM Operation when it receives a request 
          related to a not existing application LCM Operation"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.13.3.1"
      
      Config Id Config_MEC_6
      
      PICS Selection PIC_APP_LCM_MANAGEMENT

      Initial conditions  with {
         the IUT entity not having a App_LCM_op_occ containing
            id indicating value NON_EXISTENT_APP_LCM_OP_OCC_ID;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing 
               uri indicating value "/app_lcm/v1/app_instances/app_lcm_op_occs/{NON_EXISTENT_APP_INSTANCE_ID}/retry"
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_CONSUMER entity
         }
      }       
   }  
     
  
}
+0 −62
Original line number Diff line number Diff line
/*
Copyright (c) ETSI 2018-2023.
Released under BSD 3-clause license. For more information visit https://forge.etsi.org/legal-matters
*/
Package MEC_MEC010p2_LCM_NOTIF {
   
   import all from MEC_Common;

   Test Purpose {
      TP Id "TP_MEC_MEC010p2_MEX_LCM_017_OK"
      
      Test objective 
         "Check that MEC API provider sends a notification to the subscriber when an application LCM change event occurs"
      
      Reference "ETSI GS MEC 010-2 2.2.1, clause 7.4.5.3.1",
              "ETSI GS MEC 010-2 2.2.1, table 6.2.2.11.2-1", // AppInstNotification
              "ETSI GS MEC 010-2 2.2.1, table 6.2.2.16.2-1",  // AppLcmOpOccNotification 
              "ETSI GS MEC 010-2 2.2.1, table 6.2.2.27.2-1",  // AppInstanceIdentifierCreationNotification 
              "ETSI GS MEC 010-2 2.2.1, table 6.2.2.30.2-1"  // AppInstanceIdentifierDeletionNotification 
              

      Config Id Config_MEC_6
      PICS Selection PIC_APP_LCM_NOTIFICATIONS 

      Initial conditions  with {
         the IUT entity having a App_Instance_Subscription containing
            subscriptionType indicating value SUBSCRIPTION_TYPE,
            callbackUri indicating value CALLBACK_URI,
            _links containing
            self indicating value "/app_lcm/v1/subscriptions/{SUBSCRIPTION_ID}"
            ;
         ;
      }

      Expected behaviour
      ensure that {
         when {
         	the IUT entity generates a application_lcm_change_event containing 
               notificationId set to NOTIFICATION_ID;
            }
         then {
            the IUT entity sends a vPOST containing
               uri indicating value CALLBACK_URI,
               body containing
                  Notification containing 
                     id set to NOTIFICATION_ID,
                     notificationType set to NOTIFICATION_TYPE,
                     subscriptionId set to SUBSCRIPTION_ID,
                     timeStamp set to any_value,
                     appInstanceId set to APP_INSTANCE_ID,
                     appDId set to any_value,
                     _links containing 
                        	subscription set to "/app_lcm/v1/app_instances/{APP_INSTANCE_ID}"
                        	;
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }
   }

}