Commit ff183e3c authored by Muhammad Umair Khan's avatar Muhammad Umair Khan
Browse files

update MEC 015 test purposes as per version v3.1.1

parent 98485f3d
Loading
Loading
Loading
Loading
+303 −0
Original line number Diff line number Diff line
/*
Copyright (c) ETSI 2018-2025.
Released under BSD 3-clause license. For more information visit https://forge.etsi.org/legal-matters
*/

Package MEC_MEC015_SRV_BWSUBLOOKUP {
   
   import all from MEC_Common;

   Test Purpose {
      TP Id "TP_MEC_MEC015_SRV_BWSUBLOOKUP_001_OK"

      Test objective
         "Check that the IUT responds with a list of BWM change event susbsciption when queried by a MEC Application"

      Reference 
        "ETSI GS MEC 015 3.1.1, clause 7.3.3",
        "ETSI GS MEC 015 3.1.1, clause 8.5.3.1"

      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 IUT entity having several bwm_change_event_subscription containing
            	href indicating value HREF_VALUE;
      }

      // MEC 015 3.1.1, clause 6.2.6
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
               		uri indicating value "bwm/v1/subscriptions";
               from the MEC_APP entity
            }
            then {
               // MEC 015 3.1.1, clause 8.5.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                      subscriptionLinkList containing
                        href set to HREF_VALUE;;;
               to the MEC_APP entity
            }
         }
   }

   Test Purpose {
      TP Id "TP_MEC_MEC015_SRV_BWSUBLOOKUP_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 015 3.1.1, clause 7.3.3",
        "ETSI GS MEC 015 3.1.1, clause 8.5.3.1"

      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 IUT entity having several bwm_change_event_subscription
      }

      // MEC 015 3.1.1, clause 6.2.6
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
               		uri indicating value "bwm/v1/subscriptions",
                  	query_parameters containing
                  		subscriptionType indicating value any_value;; // Wrong URL structure: Invalid URI query parameters supported
               from the MEC_APP entity
            }
            then {
               // MEC 015 3.1.1, clause 8.5.3.1
               the IUT entity sends a HTTP_RESPONSE containing
               		status_code set to "400 Bad Request";
               to the MEC_APP entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF"

      Test objective
         "Check that the IUT responds with an error when no subscription are created"

      Reference 
        "ETSI GS MEC 015 3.1.1, clause 7.3.3",
        "ETSI GS MEC 015 3.1.1, clause 8.5.3.1"

      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 IUT entity not having several bwm_change_event_subscription
      }

      // MEC 015 3.1.1, clause 6.2.6
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "bwm/v1/subscriptions";
               from the MEC_APP entity
            }
            then {
               // MEC 011 3.1.1, clause 8.5.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found";
               to the MEC_APP entity
            }
         }
   }

   Test Purpose {
      TP Id "TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK"

      Test objective
         "Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - Filter on subscription_type"

      Reference 
        "ETSI GS MEC 015 3.1.1, clause 6.2.6",
        "ETSI GS MEC 015 3.1.1, clause 7.3.3",
        "ETSI GS MEC 015 3.1.1, clause 8.5.3.1"

      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 IUT entity having a bwm_change_event_subscription containing
                href indicating value HREF_VALUE_1; and
            the IUT entity having a bwm_change_event_subscription containing
                href indicating value HREF_VALUE_2; and
            the IUT entity having a bwm_change_event_subscription containing
                href indicating value HREF_VALUE_3;
      }

      // MEC 015 3.1.1, clause 6.2.6
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "bwm/v1/subscriptions",
                  query_parameters containing
                        subscriptionType indicating value "bw_chg";;
               from the MEC_APP entity
            }
            then {
               // MEC 011 3.1.1, clause 8.5.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     SubscriptionLinkList containing
                        href set to HREF_VALUE_1,
                        href set to HREF_VALUE_3;;;
               to the MEC_APP entity
            }
         }
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF"

      Test objective
         "Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscription_type"

      Reference 
        "ETSI GS MEC 015 3.1.1, clause 6.2.6",
        "ETSI GS MEC 015 3.1.1, clause 7.3.3",
        "ETSI GS MEC 015 3.1.1, clause 8.5.3.1"

      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 IUT entity having a bwm_change_event_subscription containing
                href indicating value HREF_VALUE_1; and
            the IUT entity having a bwm_change_event_subscription containing
                href indicating value HREF_VALUE_2; and
            the IUT entity having a bwm_change_event_subscription containing
                href indicating value HREF_VALUE_3;
      }

      // MEC 015 3.1.1, clause 6.2.6
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "bwm/v1/subscriptions",
                  query_parameters containing
                        subscriptionType indicating value "bw_chg";;
               from the MEC_APP entity
            }
            then {
               // MEC 015 3.1.1, clause 8.5.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found";
               to the MEC_APP entity
            }
         }
   }

   Test Purpose {
      TP Id "TP_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK"

      Test objective
         "Check that the IUT responds with a BWM change event susbsciption when queried by a MEC Application"

      Reference 
        "ETSI GS MEC 015 3.1.1, clause 7.3.2",
        "ETSI GS MEC 015 3.1.1, clause 8.6.3.1"

      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 IUT entity having several bwm_change_event_subscription containing
                  subscriptionId indicating value SUBSCRIPTION_ID,
                  callbackReference indicating value CALLBACK_URL,
                  filterCriteria indicating value FILTER_CRITERIA;
      }

      // MEC 015 3.1.1, clause 6.2.6
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "bwm/v1/subscriptions/{subscriptionId}";
               from the MEC_APP entity
            }
            then {
               // MEC 015 3.1.1, clause 8.6.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK"
                  body containing
                     BwChgEventSubscription containing
                        _links containing 
                           self containing
                              href set to HREF_VALUE;,
                        subscriptionType indicating value "BwChgEventSubscription",
                        callbackReference indicating value CALLBACK_URL,
                        filterCriteria indicating value FILTER_CRITERIA;;;;
               to the MEC_APP entity
            }
         }
   }

   Test Purpose {
      TP Id "TP_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF"

      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 015 3.1.1, clause 7.3.3",
        "ETSI GS MEC 015 3.1.1, clause 8.5.3.1"

      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 IUT entity having several bwm_change_event_subscription containing
                  subscriptionId indicating value SUBSCRIPTION_ID,
                  callbackReference indicating value CALLBACK_URL,
                  filterCriteria indicating value FILTER_CRITERIA;
      }

      // MEC 015 3.1.1, clause 6.2.6
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "qms/v1/subscriptions/{UNKNOWN_SUBSCRIPTION_ID}";
               from the MEC_APP entity
            }
            then {
               // MEC 015 3.1.1, clause 8.5.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "404 Not Found";
               to the MEC_APP entity
            }
         }
   }

} // End of Package MEC_MEC015_SRV_BWMSUBLOOKUP
+409 −0

File added.

Preview size limit exceeded, changes collapsed.