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

MEC 011 negative test cases.

parent d464dccd
Loading
Loading
Loading
Loading
+614 −2
Original line number Diff line number Diff line
@@ -213,6 +213,7 @@ Package plat_mp1_app_services {
            when {
               the IUT entity receives a vPUT containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services/{SERVICE_ID}",
                  If_Match indicating value VALID_ETAG, 
                  body containing
                     version indicating value NEW_VERSION
                  ;
@@ -220,7 +221,7 @@ Package plat_mp1_app_services {
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.3.3.2
               // MEC 011, clause 7.14.3.2
               the IUT entity sends a HttpMsg containing
                  status_code set to "200 OK"
                  body containing
@@ -234,4 +235,615 @@ Package plat_mp1_app_services {
         }
   }
   

   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_APPSAQ_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 011 V2.0.8, clause 7.15.3.1",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.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 IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }

      // MEC 011, clause 5.2.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services"
                  query_parameters containing
                     // Wrong parameter name should trigger an error response.
                     instance_id indicating value any_value
                  ; 
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.15.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_APPSAQ_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 011 V2.0.8, clause 7.15.3.1",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.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 IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }

      // MEC 011, clause 5.2.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a GET containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services"
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.15.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_APPSAQ_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 011 V2.0.8, clause 7.15.3.1",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.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 IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ;
      }

      // MEC 011, clause 5.2.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  Uri indicating value "/mp1/v1/applications/{UNKNOWN_APP_INSTANCE_ID}/services"
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.15.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_APPSAQ_BI_004"
      
      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 011 V2.0.8, clause 7.15.3.4",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/ProblemDetails"

      Config Id Config_MEC_1
      
      PICS Selection PIC_MEC_PLAT and PIC_SERVICES and PIC_NOTIFICATIONS

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the MEC_APP_Registrant entity being_in idle_state and
         the MEC_APP_Subscriber entity subscribed_to the MP1_SUBSCRIPTION_A
      }

      // MEC 011, clause 5.2.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPOST containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services",
                  body containing
                     // Wrong parameter name should trigger an error response.
                     Name indicating value SERVICE_NAME
                  ;
               ;
               from the MEC_APP_Registrant entity
            }
            then {
               // MEC 011, clause 7.15.3.4
               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_Registrant entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_APPSAQ_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 011 V2.0.8, clause 7.15.3.4",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/ProblemDetails"

      Config Id Config_MEC_1
      
      PICS Selection PIC_MEC_PLAT and PIC_SERVICES and PIC_NOTIFICATIONS

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the MEC_APP_Registrant entity being_in idle_state and
         the MEC_APP_Subscriber entity subscribed_to the MP1_SUBSCRIPTION_A
      }

      // MEC 011, clause 5.2.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a POST containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services",
                  body containing
                     serName indicating value SERVICE_NAME
                  ;
               ;
               from the MEC_APP_Registrant entity
            }
            then {
               // MEC 011, clause 7.15.3.4
               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_Registrant entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_APPSAQ_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 011 V2.0.8, clause 7.15.3.4",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/ProblemDetails"

      Config Id Config_MEC_1
      
      PICS Selection PIC_MEC_PLAT and PIC_SERVICES and PIC_NOTIFICATIONS

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the MEC_APP_Registrant entity being_in idle_state and
         the MEC_APP_Subscriber entity subscribed_to the MP1_SUBSCRIPTION_A
      }

      // MEC 011, clause 5.2.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPOST containing
                  Uri indicating value "/mp1/v1/applications/{UNKNOWN_APP_INSTANCE_ID}/services",
                  body containing
                     serName indicating value SERVICE_NAME
                  ;
               ;
               from the MEC_APP_Registrant entity
            }
            then {
               // MEC 011, clause 7.15.3.4
               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_Registrant entity
            }
         }
   }


   Test Purpose {
      TP Id "TP_MEC_PLAT_MP1_APPSAQ_BI_007"
      
      Test objective 
         "Check that the IUT responds with an error when
         an unauthorised request is sent by a MEC Application"
      
      Reference "ETSI GS MEC 011 V2.0.8, clause 7.14.3.1",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.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 IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a services_running containing  
            service_id indicating value SERVICE_ID
         ;
      }

      // MEC 011, clause 5.2.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a GET containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services/{SERVICE_ID}"
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.14.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_APPSAQ_BI_008"
      
      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 011 V2.0.8, clause 7.14.3.1",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.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 IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a services_running containing  
            service_id indicating value SERVICE_ID
         ;
      }

      // MEC 011, clause 5.2.5
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services/{UNKNOWN_SERVICE_ID}"
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.14.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_APPSAQ_BI_009" 
      
      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 011 V2.0.8, clause 7.14.3.2",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml#/definitions/ServiceInfo"

      
      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 apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a services_running containing  
            service_id indicating value SERVICE_ID
         ;
      }

      // MEC 011, clause 5.2.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services/{SERVICE_ID}",
                  If_Match indicating value VALID_ETAG, 
                  body containing
                     // Wrong parameter name should trigger an error response.
                     a_version indicating value NEW_VERSION
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.14.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_APPSAQ_BI_010" 
      
      Test objective 
         "Check that the IUT responds with an error when
         an unauthorised request is sent by a MEC Application"
      
      Reference "ETSI GS MEC 011 V2.0.8, clause 7.14.3.2",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.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 IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a services_running containing  
            service_id indicating value SERVICE_ID
         ;
      }

      // MEC 011, clause 5.2.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a PUT containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services/{SERVICE_ID}",
                  If_Match indicating value VALID_ETAG, 
                  body containing
                     version indicating value NEW_VERSION
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.14.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_APPSAQ_BI_011" 
      
      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 011 V2.0.8, clause 7.14.3.2",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.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 IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a services_running containing  
            service_id indicating value SERVICE_ID
         ;
      }

      // MEC 011, clause 5.2.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services/{UNKNOWN_SERVICE_ID}",
                  If_Match indicating value VALID_ETAG, 
                  body containing
                     version indicating value NEW_VERSION
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.14.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_APPSAQ_BI_012" 
      
      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 011 V2.0.8, clause 7.14.3.2",
         "https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.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 IUT entity having a apps_instance containing
            instance_id indicating value APP_INSTANCE_ID
         ; and
         the IUT entity having a services_running containing  
            service_id indicating value SERVICE_ID
         ;
      }

      // MEC 011, clause 5.2.4
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vPUT containing
                  Uri indicating value "/mp1/v1/applications/{APP_INSTANCE_ID}/services/{SERVICE_ID}",
                  If_Match indicating value INVALID_ETAG, 
                  body containing
                     version indicating value NEW_VERSION
                  ;
               ;
               from the MEC_APP entity
            }
            then {
               // MEC 011, clause 7.14.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
            }
         }
   }
}
+222 −9

File changed.

Preview size limit exceeded, changes collapsed.

+390 −0

File changed.

Preview size limit exceeded, changes collapsed.

+136 −0

File changed.

Preview size limit exceeded, changes collapsed.

+171 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading