Commit e6691511 authored by ringst's avatar ringst
Browse files

Base for TC_IMS_0006 added

parent 60c34f19
Loading
Loading
Loading
Loading
+100 −55
Original line number Diff line number Diff line
@@ -11,6 +11,12 @@ module AtsImsIot_Behavior {

	import from AtsImsIot_TypesAndValues {type SipMessage, SipMessageList;}
	
	import from AtsImsIot_Functions {function  f_getHostname, f_getUEHostname;}
	
	import from Interface_configuration {modulepar PX_EUT_A, PX_EUT_B;}
	
	import from LibIms_ConfigAndTrigger {type ImsUserInfo;}

	import from LibIot_TypesAndValues {type DefaultList;}
	import from LibIot_TestInterface {type TestCoordinator, InterfaceMonitor;}

@@ -18,16 +24,6 @@ module AtsImsIot_Behavior {
	
	import from LibSip_Templates all;
	
	import from LibSip_Templates {
		template
			mw_ACK_Request_Base,
			mw_INVITE_Request_Base,
			mw_MESSAGE_Request_Base,
			mw_NOTIFY_Request_Base,
			mw_REGISTER_Request_Base,
			mw_SUBSCRIBE_Request_Base,
			mw_Response_Base;
	}
	import from AtsImsIot_Functions all;
	import from Interface_configuration {modulepar PX_EUT_A, PX_EUT_B;}
	
@@ -444,8 +440,57 @@ module AtsImsIot_Behavior {
    						false
    			)
        	);
    	p_monitorCompRef.done;
    	}
	
    	/**
    	* @desc Starts monitor component behavior for TP_IMS_5093_01 (mw)
    	* @param p_monitorCompRef Reference to monitor component
    	*/
    	function f_mtc_check_TP_IMS_5093_01_UE_mw(InterfaceMonitor p_monitorCompRef) 
    		runs on TestCoordinator {
    		
    		var CallId v_callId; // TODO what it the call id? not initialized !!!
    		
    		var charstring v_hostname;
    		var integer PX_UE_B := 1; // TODO this is just temporary, UE PIXIT needs to be determined
    		f_getUEHostname(PX_UE_B, v_hostname); // TODO needs recheck, maybe in more detail with userOrTelephoneSubscriber etc
    
    		p_monitorCompRef.start(
    			f_imsIot_receive(
    				{mw_SipRequest(mdw_TP_IMS_5093_01_UE_mw(v_callId, mw_SIP_URI(v_hostname)))}, // TODO getHostname(PCSCF) how to hande the callid?
    				{mw_SipRequest(mw_MESSAGE_Request_Base(?))},
    				"TP_IMS_5093_01_mw",
    				"NOTIFY request",
    				0,
    				false
    			)
    		);
    		p_monitorCompRef.done;
    	}		
	
	/**
    	* @desc Starts monitor component behavior for TP_IMS_5093_01 (mw)
    	* @param p_monitorCompRef Reference to monitor component
    	*/
    	function f_mtc_check_TP_IMS_5093_01_IMS_mw(InterfaceMonitor p_monitorCompRef) 
    		runs on TestCoordinator {
    		
    		var CallId v_callId; // TODO what it the call id? not initialized !!!
    		
    		var charstring v_hostname;
    		f_getHostname(PX_EUT_A, "pcscf", v_hostname); // needs recheck
    
    		p_monitorCompRef.start(
    			f_imsIot_receive(
    				{mw_SipRequest(mdw_TP_IMS_5093_01_IMS_mw(v_callId, mw_SIP_URI(v_hostname)))}, // TODO getHostname(PCSCF) how to hande the callid?
    				{mw_SipRequest(mw_MESSAGE_Request_Base(?))},
    				"TP_IMS_5093_01_mw",
    				"NOTIFY request",
    				0,
    				false
    			)
    		);
    		p_monitorCompRef.done;
    	}		
	} // end group
}// end module
 No newline at end of file
+18 −0
Original line number Diff line number Diff line
@@ -170,6 +170,24 @@ module AtsImsIot_Functions {
 		  return false;
 		}
 		
		// TODO 
		function f_getHostname(integer p_productIdx, charstring p_entity, out charstring p_hostname) 
					return boolean {
  	
			// TODO
			
			return true;		
		} 		
 		
		// TODO 
		function f_getUEHostname(integer p_ID, out charstring p_hostname) 
				return boolean {
	  	
			// TODO
				
			return true;		
		} 
 		
    	/**
    	 * @desc
    	 *     Preamble to handle user registration in home network from test coordinator
+127 −92
Original line number Diff line number Diff line
@@ -193,7 +193,27 @@ module AtsImsIot_Templates {
			messageBody := ? // TODO 
		}
    	
        template NOTIFY_Request mdw_TP_IMS_5093_01_UE_mw(CallId p_callId, template SipUrl p_UE_SIP_URI) modifies mw_NOTIFY_Request_Base := { 
        	requestLine := { requestUri := p_UE_SIP_URI }, // TODO check if this is the UE_SIP_URI
        	msgHeader := { 
        		event := {
        			fieldName := EVENT_E, 
        			eventType := pattern "*reg_event*", // TODO check content
        			eventParams := *},
        		route := ? }, // TODO route header indicating the original Route_header from SUBSCRIBE 
        	messageBody := ? // TODO 
        }       
            
        template NOTIFY_Request mdw_TP_IMS_5093_01_IMS_mw(CallId p_callId, template SipUrl p_PCSCF_SIP_URI) modifies mw_NOTIFY_Request_Base := { 
        	requestLine := { requestUri := p_PCSCF_SIP_URI }, // TODO check if this is the P-CSCF_SIP_URI
        	msgHeader := { 
        		event := {
        			fieldName := EVENT_E, 
        			eventType := pattern "*reg_event*", // TODO check content
        			eventParams := *},
        		route := ? }, // TODO route header indicating the original Route_header from SUBSCRIBE 
        	messageBody := ? // TODO 
        }  

  	}//end group
	group HeaderTemplates {
@@ -288,6 +308,21 @@ group AuxiliaryInformationElementTemplates {
        otherResponse := {authScheme := "IntegrityNo", authParams := *} // TODO
      }
      
    } //end group

	group config {
	
	template SipUrl mw_SIP_URI (charstring p_host):= {
		scheme := "sip",  
		userInfo := *,
		hostPort := {
			host := p_host, 
			portField := *
		},
		urlParameters := *,
		headers := *
	}

} // end group
	
}//end module
 No newline at end of file
+32 −0
Original line number Diff line number Diff line
@@ -162,6 +162,38 @@ module AtsImsIot_TestCases {
		f_cf_monitor_down(v_mw);
	}
	
	/**
	* @desc IMS network can initiate user de-registration, 
	* 		e.g., when a user runs out of credit
	* @see 	TD_IMS_0006 in ETSI TS 186 011-2 V2.3.1 cause 4.5.2.7
	*/
	testcase TC_IMS_0006() runs on TestCoordinator system SystemInterface {
		// create components
		var EutTrigger v_ueB := f_cf_create_trigger(c_trigger_B);
		var InterfaceMonitor v_gmA := f_cf_create_monitor(c_gm_A);
		var InterfaceMonitor v_mw := f_cf_create_monitor(c_mw);
		
		// map/connect component ports
		f_cf_trigger_up(v_ueB);
		f_cf_monitor_up(v_gmA);
		f_cf_monitor_up(v_mw);
		
		// test body
		// IMS_B is triggered manually to de-register user B
		
		f_mtc_check_TP_IMS_5093_01_UE_mw(v_mw);
		f_mtc_check_TP_IMS_5093_01_IMS_mw(v_mw);
		f_mtc_userCheckRegistration(v_ueB, PX_EUT_A);
		
		// postamble
		f_PO_user_home_deregistration(v_ueB);
		
		//unmap/disconnet component ports
		f_cf_trigger_down(v_ueB);
		f_cf_monitor_down(v_gmA);
		f_cf_monitor_down(v_mw);
	}
	
	/**
	 * @desc IMS network supports properly application services based on 
	 * 		the example of the CFU supplementary service