Commit 3bc10067 authored by Michele Carignani's avatar Michele Carignani
Browse files

Merge branch 'nxw' into master

parents 9781e1e8 6e7ee3ef
Loading
Loading
Loading
Loading
+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
         }
      }
   }
}
+0 −207
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 MEC012_APP_MP1_RNI_QUERY_BO_BI {
   
   import all from MEC_Common;
   
   Test Purpose {
      TP Id "TP_MEC025_RNI_QUERY_01_NEG_A"                         // Negative test: 400 Bad request 
      
      Test objective 
         "Check that the RNIS service returns an error when the RAB information when requested"
      
      Reference "ETSI GS MEC 012 2.0.3, clause 7.3.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo"
      
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_QUERY

      Initial conditions  with {
         the IUT entity having a RabInfo containing
            cellId indicating value CELL_USER_INFO
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing 
               uri indicating value "/rni/v1/queries/rab_info",
               query_parameters containing 
                  cId indicating value C_ID
               ;
            ; from the RNIS_CLIENT entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ; to the RNIS_CLIENT entity
         }
      }       
   }   


   Test Purpose {
      TP Id "TP_MEC025_RNI_QUERY_01_NEG_B"                         // Negative test: 401 Unauthorized (No token provided) 
      
      Test objective 
         "Check that the RNIS service returns an error when the RAB information when requested"
      
      Reference "ETSI GS MEC 012 2.0.3, clause 7.3.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo"
      
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_QUERY

      Initial conditions  with {
         the IUT entity having a RabInfo containing
            cellId indicating value CELL_USER_INFO
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a GET containing
               uri indicating value "/rni/v1/queries/rab_info",
               "not" authorization,
               query_parameters containing 
                  cellId indicating value CELL_ID
               ;
            ; from the RNIS_CLIENT entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the RNIS_CLIENT entity
         }
      }       
   }
   
   
   Test Purpose {
      TP Id "TP_MEC025_RNI_QUERY_01_NEG_C"                         // Negative test: 401 Unauthorized (Invalid token provided) 
      
      Test objective 
         "Check that the RNIS service returns an error when the RAB information when requested"
      
      Reference "ETSI GS MEC 012 2.0.3, clause 7.3.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo"
      
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_QUERY

      Initial conditions  with {
         the IUT entity having a RabInfo containing
            cellId indicating value CELL_USER_INFO
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a GET containing
               uri indicating value "/rni/v1/queries/rab_info",
               headers set to vHeadersInvalidToken,
               query_parameters containing 
                  cellId indicating value CELL_ID
               ;
            ; from the RNIS_CLIENT entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the RNIS_CLIENT entity
         }
      }       
   } 
   

   Test Purpose {
      TP Id "TP_MEC025_RNI_QUERY_01_NEG_D"                         // Negative test: 404 Not found 
      
      Test objective 
         "Check that the RNIS service returns an error when the RAB information when requested"
      
      Reference "ETSI GS MEC 012 2.0.3, clause 7.3.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo"
      
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_QUERY

      Initial conditions  with {
         the IUT entity having a RabInfo containing
            cellId indicating value CELL_USER_INFO
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rnis/v1/query/rab_info",
               headers set to vHeadersInvalidToken,
               query_parameters containing 
                  cellId indicating value CELL_ID
               ;
            ; from the RNIS_CLIENT entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the RNIS_CLIENT entity
         }
      }       
   } 
   

   Test Purpose {
      TP Id "TP_MEC025_RNI_QUERY_01_NEG_E"                         // Negative test: 406 Not Acceptable 
      
      Test objective 
         "Check that the RNIS service returns an error when the RAB information when requested"
      
      Reference "ETSI GS MEC 012 2.0.3, clause 7.3.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo"
      
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_QUERY

      Initial conditions  with {
         the IUT entity having a RabInfo containing
            cellId indicating value CELL_USER_INFO
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/queries/rab_info",
               headers set to vHeadersAcceptKO,
               query_parameters containing 
                  cellId indicating value CELL_ID
               ;
            ; from the RNIS_CLIENT entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "406 Not Acceptable"
            ; to the RNIS_CLIENT entity
         }
      }       
   } 
}
 No newline at end of file
+85 −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 MEC_COMMON_BI {
   
   import all from MEC_Common;
   
   
   Test Purpose {
      TP Id "TP_MEC_COMMON_001_NT"         //Negative case 401 Unauthorized - no token
      
      Test objective 
         "Check that a MEC API provider responds with an error when it receives 
         a request without token"
      
      Reference "ETSI GS MEC 009 1.1.1, clause 6.16.1"
              
      Config Id Config_MEC_6
      
      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a HTTP_REQUEST containing
               uri indicating value ACCEPTABLE_URI,
	       "not" authorization
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the MEC_CONSUMER entity
         }
      }       
   }
   
   Test Purpose {
      TP Id "TP_MEC_COMMON_001_WT"         //Negative case 401 Unauthorized - wrong token
      
      Test objective 
         "Check that a MEC API provider responds with an error when it receives 
         a request with a wrong token"
      
      Reference "ETSI GS MEC 009 1.1.1, clause 6.16.1"

      Config Id Config_MEC_6

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a HTTP_REQUEST containing
               uri indicating value ACCEPTABLE_URI,
               headers containing
      			  authorization set to NOT_VALID_TOKEN
      		   ;
            ; from the MEC_CONSUMER entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the MEC_CONSUMER entity
         }
      }       
   }
   
     
}
+1475 −0

File added.

Preview size limit exceeded, changes collapsed.

+689 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading