Commit 0693930e authored by rennoch's avatar rennoch
Browse files

add TC_IMST2_GM_INI_04a

parent 944ad468
Loading
Loading
Loading
Loading
+115 −5
Original line number Diff line number Diff line
@@ -1066,11 +1066,6 @@ module AtsIms_Gm_TCFunctions {
				// TESTBODY
				// Awaiting INVITE
				f_awaitingINVITE(mw_INVITE_Request_Base);
//				f_sendResponse(m_Response_18XonINVITE_UE(c_statusLine180,
//														 vc_callId, vc_cSeq,
//														 vc_caller_From,
//														 vc_caller_To, vc_via,
//														 vc_contact));
														 
				//send response - 180 with PPreferred header
				f_sendResponse(m_Response_18XonINVITE_pPreferred_UE(c_statusLine180, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, vc_contact, 
@@ -1211,6 +1206,121 @@ module AtsIms_Gm_TCFunctions {
				f_SIP_postamble_UE2_withoutRegistration();
			} // end function f_Sip_TC_IMST2_GM_INI_04_UE2

			/*
	*  @desc	This is the test case function (SIP originating side - UE1) for TC_IMST2_GM_INI_04a_UE1
	*  @param	p_cSeq_s
	*/
			function f_TC_IMST2_GM_INI_04a_UE1(in CSeq p_cSeq_s)
			runs on ImsComponent {

				var REGISTER_Request v_register;

				v_register :=
					valueof(m_REGISTER_Request_Base(vc_requestUri, vc_callId,
													p_cSeq_s, vc_from, vc_to,
													vc_via_REG, vc_contact,
													vc_authorization));
				// preamble with send REGISTER, await 401, send REGISTER, await
				// 200 OK and user profile setting
				f_IMS_preamble_withRegistration(c_userProfile_UE1atSUThome,
												p_cSeq_s, v_register);
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
				// point
				// preamble
				// done
				// TESTBODY
				// prepare and send INVITE UE2
				// @SUT
				LibIms_Steps
				.f_setHeadersINVITE(p_cSeq_s, c_userProfile_UE2atSUThome);
				f_SendINVITE(m_INVITE_Request_UE(vc_requestUri, vc_callId,
												 p_cSeq_s, vc_from, vc_to,
												 vc_via, vc_contact, omit,
												 vc_route_REG, omit,
												 m_MBody_SDP(vc_sdp_local)));

				// await response - 200 ...
				f_awaitingResponse(mw_Response_PchargingVecFctadrId(c_statusLine200, vc_callId,
													vc_cSeq, omit, omit, omit));
													
				// send ACK
				LibSip_Steps.f_setHeadersACK();
				f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq,
											 vc_from, vc_to, vc_via));

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync
				// point
				// test
				// body
				// done
				// POSTAMBLE
				// SendBYE and await response
				f_terminateCall_UE(vc_requestUri, vc_callId, vc_cSeq,
								   vc_caller_From, vc_caller_To);

				// send REGISTER, await 401, send REGISTER, await 200 OK
				f_RemoveRegistration(vc_cSeq); // deregistration in SUT
				f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
				// point
				// postamble
				// done
				f_SIP_postamble_UE1_withoutRegistration();
			} // end function f_Sip_TC_IMST2_GM_INI_04a_UE1

			/*
	*  @desc	This is the test case function (SIP terminating side - UE2) for TC_IMST2_GM_INI_04a_UE2
	*  @param	loc_CSeq_s
	*/
			function f_TC_IMST2_GM_INI_04a_UE2(in CSeq p_cSeq_s)
			runs on ImsComponent {

				var REGISTER_Request v_register;

				v_register :=
					valueof(m_REGISTER_Request_Base(vc_requestUri, vc_callId,
													p_cSeq_s, vc_from, vc_to,
													vc_via_REG, vc_contact,
													vc_authorization));

				// IMS1 component interface initialization
				f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF2);
				// preamble with send REGISTER, await 401, send REGISTER, await
				// 200 OK and user profile setting
				f_IMS_preamble_withRegistration(c_userProfile_UE2atSUThome,
												p_cSeq_s, v_register);

				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
				// point
				// preamble
				// done
				// TESTBODY
				// Awaiting INVITE
				f_awaitingINVITE(mw_INVITE_Request_Base);
				//send response - 200 with PPreferred header
				f_sendResponse(m_Response_2XXonINVITE_pPreferred_UE(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, vc_contact, 
										 	m_PPreferredID(m_AddrUnion_DisplayAndSipUrl(PX_IMS_SUT_UE2_DISPLAY/*vc_userprofile.publUsername*/, m_SipUrl_currDomain(vc_userprofile))), 
										 	vc_recordRoute, valueof(m_MBody_SDP(vc_sdp_local))));			
				
				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync
				// point
				// test
				// body
				// done
				// POSTAMBLE
				// await BYE and send 200OK
				f_awaitingBYE_sendReply(mw_BYE_Request_Base(vc_callId));

				// send REGISTER, await 401, send REGISTER, await 200 OK
				f_RemoveRegistration(vc_cSeq);

				f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
				// point
				// postamble
				// done
				f_SIP_postamble_UE2_withoutRegistration();
			} // end function f_Sip_TC_IMST2_GM_INI_04a_UE2


			/*
	*  @desc	This is the test case function (SIP originating side - UE1) for TC_IMST2_GM_INI_05_UE1
	*  @param	p_cSeq_s
+22 −0
Original line number Diff line number Diff line
@@ -392,6 +392,28 @@ module AtsIms_Gm_Testcases
		
			} // end TC_IMST2_GM_INI_04
						
			/*
			* @desc TC_IMST2_GM_INI_04a
			* @param p_cSeq_s Transaction Id
			*/
			testcase TC_IMST2_GM_INI_04a(inout CSeq p_cSeq_s) 
			runs on ServerSyncComp
			system TestAdapter {
				//Variables
				var ImsComponent v_imsComponent_ue1, v_imsComponent_ue2;
				f_cf_2GmUp(v_imsComponent_ue1, v_imsComponent_ue2);
		
				//Start
				f_IncCSeq(p_cSeq_s); v_imsComponent_ue1.start(f_TC_IMST2_GM_INI_04a_UE1(p_cSeq_s));
				f_IncCSeq(p_cSeq_s); v_imsComponent_ue2.start(f_TC_IMST2_GM_INI_04a_UE2(p_cSeq_s));
		
				// synchronize both PTCs on 3 sychronization points
				f_serverSync2Clients({c_prDone, c_tbDone, c_poDone});
		
				f_cf_2GmDown(v_imsComponent_ue1, v_imsComponent_ue2);
		
			} // end TC_IMST2_GM_INI_04a
			
			/*
			* @desc TC_IMST2_GM_INI_05
			* @param p_cSeq_s Transaction Id