Commit 684237aa authored by poglitsch's avatar poglitsch
Browse files

initial commit

parent b6b313ad
Loading
Loading
Loading
Loading
+114 −0
Original line number Diff line number Diff line
/**
 *	@author 	STF 370
 *  @version    $Id: $
 *	@desc		This module provides common function for TestCoordinator component.
 */
module AtsImsIot_Functions {
 
 	import from LibIot_TypesAndValues {type TriggerCommand;}

 	import from LibIms_ConfigAndTrigger all;

 	import from LibIot_TestInterface {type EutTrigger, TestCoordinator;}
 	
 	
 	group ue {
     	
     	/**
    	  * @desc Triggers an action at the UE.
    	  * @param p_trigger UE trigger component
    	  * @param p_cmd Trigger command
    	  * @return
    	  *     true in case of successfull execction of the command otherwise
    	  *     false.
    	  */
     	function f_ue_trigger_action(EutTrigger p_trigger, TriggerCommand p_cmd) runs on TestCoordinator return boolean {
     		var boolean v_success := false;
     		
     		if(p_cmd == c_SWITCH_ON_UE) {
     			p_trigger.start(f_triggerUeSwitchOn());
     		}
     		else if(p_cmd == c_SWITCH_OFF_UE) {
     			p_trigger.start(f_triggerUeSwitchOff());
     		}
     		else if(p_cmd == c_REGISTER_UE) {
     			p_trigger.start(f_triggerUeRegistration("dummy", "dummy", "dummy")); // TODO use correct parameter here!
     		}
     		else if(p_cmd == c_DEREGISTER_UE) {
     			p_trigger.start(f_triggerUeDeregistration());
     		}
     		
     		p_trigger.done;
     		
     		if(getverdict() == pass) {
     			v_success := true;
     		}
     		
     		return v_success;
     	}
    
    	/**
    	 * @desc
    	 *     UE preamble force the UE to switch on the terminal and triggers the
    	 *     registration
    	 * @param p_ueA UE A component
    	 * @param p_ueB UE B component
    	 * @return true in case of successfull execution otherwise false
    	 */
     	function f_ue_preamble(EutTrigger p_ueA, EutTrigger p_ueB) runs on TestCoordinator return boolean {
     		var boolean v_status := true; 
     		
     		if(v_status) {
     			v_status := f_ue_trigger_action(p_ueA, c_SWITCH_ON_UE);
     		}
     		
     		if(v_status) {
     			v_status := f_ue_trigger_action(p_ueA, c_REGISTER_UE);
     		}
     		
     		if(v_status) {
     			v_status := f_ue_trigger_action(p_ueB, c_SWITCH_ON_UE);
     		}
     		
     		if(v_status) {
     			v_status := f_ue_trigger_action(p_ueB, c_REGISTER_UE);
     		}
     		
     		return v_status;
     	}
     	
     	
     	
    	/**
    	 * @desc
    	 *     UE postamble force the UE to switch on the terminal and triggers the
    	 *     registration
    	 * @param p_ueA UE A component
    	 * @param p_ueB UE B component
    	 * @return true in case of successfull execution otherwise false
    	 */
     	function f_ue_postamble(EutTrigger p_ueA, EutTrigger p_ueB) runs on TestCoordinator return boolean {
     		var boolean v_status := true; 
     		
     		if(v_status) {
     			v_status := f_ue_trigger_action(p_ueA, c_DEREGISTER_UE);
     		}
     		
     		if(v_status) {
     			v_status := f_ue_trigger_action(p_ueA, c_SWITCH_OFF_UE);
     		}
     		
     		if(v_status) {
     			v_status := f_ue_trigger_action(p_ueB, c_DEREGISTER_UE);
     		}
     		
     		if(v_status) {
     			v_status := f_ue_trigger_action(p_ueB, c_SWITCH_OFF_UE);
     		}
     		
     		return v_status;
     	}
 	}
 
 
}
 No newline at end of file
+43 −0
Original line number Diff line number Diff line
/**
 *	@author 	STF 370
 *  @version    $Id: $
 *	@desc		This module provides ATS specific test case definitions.
 */
module AtsImsIot_TestCases {
 
	import from AtsImsIot_Functions {function f_ue_postamble, f_ue_preamble;}

	import from LibIot_TestConfiguration {
		function f_cf_create_trigger, f_cf_trigger_down, f_cf_trigger_up;
	}

	import from LibIot_TestInterface {
		type EutTrigger, SystemInterface, TestCoordinator;
	}
	
	/**
	 * @desc IMS network shall support SIP messages greater than 1500 bytes.
	 * @see TD_IMS_0001 in ETSI TS 186 011-2 V2.3.1 cause 4.5.1.1
	 */
	testcase TC_IMS_0001() runs on TestCoordinator system SystemInterface {
		// create components
		var EutTrigger v_ueA := f_cf_create_trigger("UE_A");
		var EutTrigger v_ueB := f_cf_create_trigger("UE_B");
		
		// map/connect component ports
		f_cf_trigger_up(v_ueA);
		f_cf_trigger_up(v_ueB);
		
		// preamble
		f_ue_preamble(v_ueA, v_ueB);
		
		// test body
		
		// postabmle
		f_ue_postamble(v_ueA, v_ueB);
		
		//unmap/disconnet component ports
		f_cf_trigger_down(v_ueA);
		f_cf_trigger_down(v_ueB);
	}
}
 No newline at end of file