Commit 83ada92e authored by Elian Kraja's avatar Elian Kraja
Browse files

Added negative tests on MEC012 and check ProblemDetails on mec010-2

parent dc279ed1
Loading
Loading
Loading
Loading
+36 −5
Original line number Diff line number Diff line
@@ -102,7 +102,13 @@ Package app_pkg_mgt {
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_400_BAD_REQUEST
               status set to HTTP_400_BAD_REQUEST,
               body containing
                  problemDetails containing
                     status set to 400,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_OSS entity
         }
      }       
@@ -140,7 +146,13 @@ Package app_pkg_mgt {
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_401_UNAUTHORIZED
               status set to HTTP_401_UNAUTHORIZED,
               body containing
                  problemDetails containing
                     status set to 401,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_OSS entity
         }
      }       
@@ -177,7 +189,13 @@ Package app_pkg_mgt {
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_401_UNAUTHORIZED
               status set to HTTP_401_UNAUTHORIZED,
               body containing
                  problemDetails containing
                     status set to 401,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_OSS entity
         }
      }       
@@ -213,7 +231,13 @@ Package app_pkg_mgt {
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_404_NOT_FOUND
               status set to HTTP_404_NOT_FOUND,
               body containing
                  problemDetails containing
                     status set to 404,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_OSS entity
         }
      }       
@@ -393,7 +417,14 @@ Package app_pkg_mgt {
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_403_FORBIDDEN;
               status set to HTTP_403_FORBIDDEN,
               body containing
                  problemDetails containing
                     status set to 403,
                     detail set to any_value
                  ;
               ;
            ;
            to the MEC_OSS entity
         }
      }
+520 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ Package rnis_subscriptions {
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions" //TODO how to handle query parameters?
               uri indicating value "/rni/v1/subscriptions",
               query_parameters containing
                  subscriptionType indicating value "CellChangeSubscription"
               ;
@@ -65,6 +65,273 @@ Package rnis_subscriptions {
      }       
   }


   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_A"       // Negative test: Trying to get a 400 Bad Request using incorrect parameters (Not existent subscriptionType)
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
             subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions",
               query_parameters containing
                  subscriptionType indicating value "wrongSubscriptionType"
               ;
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_400_BAD_REQUEST,
               body containing
                  problemDetails containing
                     status set to "400",
                     detail set to "any_value"
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }
   

   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_B"       // Negative test: Trying to get a 401 Unauthorized (Client did not submit credentials)
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions",
               query_parameters containing
                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
                  subscriptionType indicating value "CellChangeSubscription"
               ;,
               "not" authorization                                             // Token not provided
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_401_UNAUTHORIZED,
               body containing
                  problemDetails containing
                     status set to 401,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }
   
   
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_C"       // Negative test: Trying to get a 401 Unauthorized (Invalid token)
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions",
               headers set to vHeadersInvalidToken,                            // Invalid token
               query_parameters containing
                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
                  subscriptionType indicating value "CellChangeSubscription"
               ;
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_401_UNAUTHORIZED,
               body containing
                  problemDetails containing
                     status set to 401,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }
      
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_D"       // Negative test: 404 Not found
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscrition",                       // Wrong URI
               query_parameters containing
                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
                  subscriptionType indicating value "CellChangeSubscription"
               ;
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_404_NOT_FOUND,
               body containing
                  problemDetails containing
                     status set to 404,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }
   
 
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_E"       // Negative test: 406 Not acceptable. Using Accept header as application/octet-stream
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions",
               headers set to vHeadersAcceptKO,
               query_parameters containing
                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
                  subscriptionType indicating value "CellChangeSubscription"
               ;
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_406_NOT_ACCEPTABLE,
               body containing
                  problemDetails containing
                     status set to 406,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }
   
//   Test Purpose {
//      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_F"       // Negative test: 403 Forbidden. 
//      
//      Test objective 
//         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
//      
//      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
//         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
//      Config Id Config_MEC_1
//      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS
//
//      Initial conditions  with {
//         the IUT entity having a RNIS_subscription containing
//            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
//            subscriptionType indicating value "CellChangeSubscription"
//         ;
//      }
//
//      Expected behaviour
//      ensure that {
//         when {
//            the IUT entity receives a vGET containing
//               uri indicating value "/rni/v1/subscriptions",
//               headers set to vHeadersAcceptKO,
//               query_parameters containing
//                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
//                  subscriptionType indicating value "CellChangeSubscription"
//               ;
//            ; from the MEC_SUB entity
//         }
//         then {
//            the IUT entity sends a HTTP_RESPONSE containing
//               status set to HTTP_406_NOT_ACCEPTABLE,
//               body containing
//                  problemDetails containing
//                     status set to 406,
//                     detail set to any_value
//                  ;
//               ;
//            ; to the MEC_SUB entity
//         }
//      }       
//   }   
 
 
   
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01"
      
@@ -123,4 +390,256 @@ Package rnis_subscriptions {
         }
      }       
   }
 
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_A"                      // 400 Bad Request
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      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 "/rni/v1/subscriptions",
               body containing
                  CellChangeSubscription containing
                     subscritionType indicating value "CelCangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_400_BAD_REQUEST,
               body containing
                  problemDetails containing
                     status set to 400,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }


   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_B"                      // 401 Unauthorized (No Token)
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      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 "/rni/v1/subscriptions",
               "not" authorized,
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_401_UNAUTHORIZED,
               body containing
                  problemDetails containing
                     status set to 401,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }
   
   
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_C"                      // 401 Unauthorized (Wrong token)
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      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 "/rni/v1/subscriptions",
               headers set to vHeadersInvalidToken,                     // wrong token
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_401_UNAUTHORIZED,
               body containing
                  problemDetails containing
                     status set to 401,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }   

   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_C"                      // 404 not Found (Wrong URI)
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      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 "/rnis/v1/subscription",              // wrong URI
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_404_NOT_FOUND,
               body containing
                  problemDetails containing
                     status set to 404,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   } 


   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_D"                      // 406 not acceptable (client accepts only application/octet-stream content format)
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      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 "/rni/v1/subscriptions",
               headers set to vHeadersAcceptKO,
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to HTTP_406_NOT_ACCEPTABLE,
               body containing
                  problemDetails containing
                     status set to 406,
                     detail set to any_value
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   } 

}
+220 −0

File changed.

Preview size limit exceeded, changes collapsed.

+180 −0

File changed.

Preview size limit exceeded, changes collapsed.

+0 −3
Original line number Diff line number Diff line
@@ -45,8 +45,6 @@ Package rnis_notifications {
      Expected behaviour
      ensure that {
         when {
            // TODO: Check whether this could be triggered by the tester of document otherwise
            // with a reference describing this type of events
            the IUT entity generates a cell_change_event containing 
               associateId set to ASSOCIATE_ID;
         }
@@ -58,7 +56,6 @@ Package rnis_notifications {
                  associateId set to ASSOCIATE_ID
               ;
            ; to the MEC_SUB entity
            
         }
      }
   }
Loading