Commit 7a0c3429 authored by rennoch's avatar rennoch
Browse files

incomplete first test case (XML missing)

parent 7674303f
Loading
Loading
Loading
Loading
+83 −0
Original line number Diff line number Diff line
module CW_TC_Functions {
    import from LibIms_SIPTypesAndValues all;

    import from LibSip_SIPTypesAndValues language "TTCN-3:2005" all;

    import from SS_Ims_PIXITS all;

    import from LibIms_Steps all;

    import from LibIms_Interface all;

    import from LibSip_Steps language "TTCN-3:2005" all;

    import from LibSip_Templates all;

    import from LibCommon_Sync all;

    import from LibIms_Templates all;

    group SuplementaryService_CW{
    	group SS_CW_SIPSIP{
    		group destination_UE{
    
    			/**
    			* 
    			* @desc test case function f_Sip_CW_U01_001_PCSCF PCSCF component
    			* @param p_cSeq_s actual cseq number
    			* @verdict 
    			*/
    			function f_Sip_CW_U01_001_PCSCF(in CSeq p_cSeq_s) runs on ImsComponent {
    				
    				var template PAssertedID v_PAsserted;
    
    				// set PAssertedID
    				v_PAsserted := m_PAssertedID(m_AddrUnion_NameAddr(PX_SIP_NameAddr_PAsserted));
    								
    				// Request-Uri refers to home network (SUT)
    				f_IMS_preamble_woRegistration(c_userProfile_PCSCFwithHomeUE, p_cSeq_s); // LibSip
    
    				f_awaitingRegistration_IMS_gm(p_cSeq_s);
                    
                    //  Awaiting SUBSCRIBE with event=reg
                    f_awaitingSubscription(p_cSeq_s, mw_SUBSCRIBE_Request_IMS(*,*,*,*));
    				
    				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
    				// Testbody
    
    				// INVITE to UE2@SUThome
    				LibIms_Steps.f_setHeadersINVITE(vc_cSeq, c_userProfile_UE2atSUThome);
    				//TODO include XML with call-waiting-indication
        			f_SendINVITE(m_INVITE_Request_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_contact, omit, vc_route, vc_recordRoute, omit, omit, m_MBody_SDP(vc_sdp_local)));
        				    				
    				f_awaitingResponse(mw_Response_Base(c_statusLine180, vc_callId, vc_cSeq));
    				
    				f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq));
    
    				f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via));
    
    				//awaiting ReInvite
    				f_awaitingINVITE(mw_INVITE_Request_IMS(*,*,*,*));
    				
    				f_sendResponse(m_Response_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, f_route(), f_recordroute(), valueof(m_MBody_SDP(vc_sdp_local))));
    
    				// POSTAMBLE: await ACK, await termination
    				f_awaitingACK(mw_ACK_Request_Base(vc_callId));
    
    				f_awaitingBYE(mw_BYE_Request_Base(vc_callId));
    
    				f_sendResponse(m_Response_Base(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via));
    
    				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
    
                    // deregistration of UE
                    f_IMS_postamble_awaitDeRegistration();
    								
    			} // end f_Sip_CW_U01_001_PCSCF
        			
    		}// end group destination_UE
    		
    	}// end group SS_CW_SIPSIP
    }// end  group SuplementaryService_CW 

}
 No newline at end of file

CW/CW_TestCases.ttcn

0 → 100644
+54 −0
Original line number Diff line number Diff line
module CW_TestCases {
    import from LibSip_SIPTypesAndValues language "TTCN-3:2005" all;

    import from CW_TC_Functions all;

    import from SS_Ims_TestSystem all;

    import from SS_Ims_PICS all;

    import from LibIms_Interface all;

    import from LibCommon_Sync all;

    import from SS_Ims_TestConfiguration all;

    group SuplementaryService_CW{
    	
    	group SS_CW_SIPSIP{
    		
    		group destination_UE{
    
    			/**
    			* @desc TC_CW_U01_001
    			* @param p_cSeq_s Transaction Id
    			*/
    			testcase TC_CW_U01_001(inout CSeq p_cSeq_s) 
    			runs on ServerSyncComp
    			system TestAdapter {
    				if (PC_CW_INVOCATION_PROVIDED) {
        				//Variables
        				var ImsComponent v_imsComponent_pcscf;
        				f_cf_1PcscfUp(v_imsComponent_pcscf);
        
        				//Start
        				f_IncCSeq(p_cSeq_s); v_imsComponent_pcscf.start(f_Sip_CW_U01_001_PCSCF(p_cSeq_s));
        
        				// synchronize PTCs on 2 sychronization points
        				f_serverSync1Client({c_prDone, c_tbDone});
        
        				f_cf_1PcscfDown(v_imsComponent_pcscf);
       				}
        			else			
        			{
        				log("Is the invocation of the CW service provided? Set PC_CW_INVOCATION_PROVIDED to TRUE before running this test!");
        			}
    
    			} // end TC_CW_U01_001
    			
    		}// end group destination_UE
    		
    	}// end group SS_CW_SIPSIP
    	
    }// end  group SuplementaryService_CW 
}
 No newline at end of file