Commit 26a33a55 authored by Gabriele Scivoletto's avatar Gabriele Scivoletto
Browse files

Added Test Purposes for Resistered IoT Platform with field-based filtering

parent 84fc8544
Loading
Loading
Loading
Loading
+105 −20
Original line number Diff line number Diff line
@@ -8,11 +8,10 @@ Package MEC_MEC033_MEX_IOTS_IOTPLAT {
	import all from MEC_Common;
	
	Test Purpose {
		TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_OK_01"
		TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_OK_01_001"
		
		Test objective
        	"Check that the IUT responds with the list of registered IoT platforms
         	when queried by a Service Consumer"
        	"Check that the IUT responds with the list of registered IoT platforms when queried by a Service Consumer"
         
		Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.1"
         
@@ -58,13 +57,60 @@ Package MEC_MEC033_MEX_IOTS_IOTPLAT {

	}
	
	Test Purpose {
      TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_OK_01_002"

      Test objective
        "Check that the IUT responds with the list of registered IoT platform when queried by a Service Consumer filtering one field"

      Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.1"

      Config Id Config_MEC_6

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
			the IUT entity being_in idle_state and
			the MEC_PROVIDER entity having a IoTPlatformInfo containing
				iotPlatformId indicating value IOT_PLATFORM_ID,
				userTransportInfo indicating value USER_TRANSPORT_INFO,
				enabled indicating value BOOLEAN_VALUE
			;
		}
         

      // MEC 033 V3.1.1 Clause 6.2.2 Type: DeviceInfo
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "/iots/v1/registered_iot_platforms?fields=iotPlatformId"
               ;
               from the MEC_CONSUMER entity
            }
            then {
	               // MEC 033 Clause 7.5.3.1
	               the IUT entity sends a HTTP_RESPONSE containing
	                  status_code set to "200 OK"
	                  body containing
	                     arrayOfIoTPlatformInfo containing
		                     IoTPlatformInfo containing
					            iotPlatformId indicating value IOT_PLATFORM_ID
	                  			;
	               			;
	               		;
	               ;
	               to the MEC_CONSUMER entity
	            }
         }
   }
	
	
	Test Purpose {
		TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_OK_02"
		
		Test objective
	        "Check that the IUT registers the information of a new IoT platform
	        when requested by a Service Consumer"
	        "Check that the IUT registers the information of a new IoT platform when requested by a Service Consumer"
	        
	    Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.4"
	    
@@ -115,8 +161,7 @@ Package MEC_MEC033_MEX_IOTS_IOTPLAT {
		TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_BR_02"
		
		Test objective
	        "Check that the IUT returns an error
	        when Service Consumer request to register an IoT device with incorrect parameters"
	        "Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters"
	        
	    Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.4"
	    
@@ -155,11 +200,10 @@ Package MEC_MEC033_MEX_IOTS_IOTPLAT {
	}
	
	Test Purpose {
      TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_OK_03"
      TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_OK_03_001"

      Test objective
        "Check that the IUT returns the IoT platform information
         when requested by Service Consumer specifying the IoT platform identifier"
        "Check that the IUT returns the IoT platform information when requested by Service Consumer specifying the IoT platform identifier"

      Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.1"

@@ -203,12 +247,57 @@ Package MEC_MEC033_MEX_IOTS_IOTPLAT {
         }
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_OK_03_002"

      Test objective
        "Check that the IUT returns the IoT platform information when requested by Service Consumer specifying the IoT platform identifier filtering one field"

      Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.1"

      Config Id Config_MEC_6

      PICS Selection PIC_MEC_PLAT and PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state and
         the MEC_PROVIDER entity having a IotPlatformInfo containing
            iotPlatformId set to registeredIotPlatformId,
            userTransportInfo indicating value USER_TRANSPORT_INFO,
            enabled indicating value BOOLEAN_VALUE
         ;
         
      }

      // MEC 033 V3.1.1 Clause 6.2.3 Type: IotPlatformInfo
      Expected behaviour
         ensure that {
            when {
               the IUT entity receives a vGET containing
                  uri indicating value "/iots/v1/registered_iot_platforms/{registeredIotPlatformId}?fields=iotPlatformId"
                  ;
               from the MEC_CONSUMER entity
            }
            then {
               // MEC 033 Clause 7.5.3.1
               the IUT entity sends a HTTP_RESPONSE containing
                  status_code set to "200 OK",
                  body containing
                     IotPlatformInfo containing
			            iotPlatformId indicating value IOT_PLATFORM_ID
              			;
           			;
           		;
               to the MEC_CONSUMER entity
            }
         }
   }
   
   Test Purpose {
      TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_NF_03"

      Test objective
        "Check that the IUT returns error
         when Service Consumer request to retrieve a not registered IoT platform"
        "Check that the IUT returns error when Service Consumer request to retrieve a not registered IoT platform"

      Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.1"

@@ -249,8 +338,7 @@ Package MEC_MEC033_MEX_IOTS_IOTPLAT {

	
	      Test objective
	        "Check that the IUT updates the information about a registered IoT platform
	        when requested by a Service Consumer"
	        "Check that the IUT updates the information about a registered IoT platform when requested by a Service Consumer"
	
	      Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.2"
	
@@ -305,8 +393,7 @@ Package MEC_MEC033_MEX_IOTS_IOTPLAT {
	 TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_NF_04"
	
	      Test objective
	        "Check that the IUT returns an error
	        when a Service Consumer requests to update a not registered IoT platform"
	        "Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT platform"
	
	      Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.2"
	
@@ -353,8 +440,7 @@ Package MEC_MEC033_MEX_IOTS_IOTPLAT {
	     TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_OK_05"
	
	      Test objective
	        "Check that the IUT deregisters an IoT platform information
	        when requested by a Service Consumer specifying the registered IoT platform identifier"
	        "Check that the IUT deregisters an IoT platform information when requested by a Service Consumer specifying the registered IoT platform identifier"
	
	      Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.5"
	
@@ -395,8 +481,7 @@ Package MEC_MEC033_MEX_IOTS_IOTPLAT {
      TP Id "TP_MEC_MEC033_MEX_IOTS_IOTPLAT_NF_05"

      Test objective
        "Check that the IUT returns an error
        when a Service Consumer request to deregister an IoT platform using incorrect parameters"
        "Check that the IUT returns an error when a Service Consumer request to deregister an IoT platform using incorrect parameters"

      Reference "ETSI GS MEC 033 V3.1.1, clause 7.5.3.5"