Loading DiameterCxDx/ttcn/DiameterCxDx_Dx_TCFunctions.ttcn3 +6 −6 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ module DiameterCxDx_Dx_TCFunctions { function f_TC_DX_SLF_UA_01() runs on DiameterCx { f_preamble_ICSCF(); f_preambleDx_ICSCF(); f_selfOrClientSyncAndVerdict( c_prDone, f_getVerdict() ); // sync - preamble done Loading @@ -58,7 +58,7 @@ module DiameterCxDx_Dx_TCFunctions { f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync - postamble done f_postamble_ICSCF(); f_postambleDx_ICSCF(); } // end function f_TC_DX_SLF_UA_01 } // group TP_SLFRole_UA Loading @@ -70,7 +70,7 @@ module DiameterCxDx_Dx_TCFunctions { function f_TC_DX_SLF_SA_01() runs on DiameterCx { f_preamble_SCSCF(); f_preambleDx_SCSCF(); f_selfOrClientSyncAndVerdict( c_prDone, f_getVerdict() ); // sync - preamble done Loading @@ -93,7 +93,7 @@ module DiameterCxDx_Dx_TCFunctions { f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync - postamble done f_postamble_SCSCF(); f_postambleDx_SCSCF(); } // end function f_TC_DX_SLF_SA_01 } // group TP_SLFRole_SA Loading @@ -105,7 +105,7 @@ module DiameterCxDx_Dx_TCFunctions { function f_TC_DX_SLF_LI_01() runs on DiameterCx { f_preamble_ICSCF(); f_preambleDx_ICSCF(); f_selfOrClientSyncAndVerdict( c_prDone, f_getVerdict() ); // sync - preamble done Loading @@ -125,7 +125,7 @@ module DiameterCxDx_Dx_TCFunctions { f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync - postamble done f_postamble_ICSCF(); f_postambleDx_ICSCF(); } // end function f_TC_DX_SLF_LI_01 } // group TP_SLFRole_LI Loading DiameterCxDx/ttcn/DiameterCxDx_Steps.ttcn +109 −3 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ vc_send_hopid:=hex2int('00000100'H); vc_send_endid:=hex2int('01000000'H); } // end function f_DiameterCx_init } // end function f_DiameterCx_SCSCF_init /* * @desc This is a test step that init global variables Loading Loading @@ -105,6 +105,78 @@ } // end function f_DiameterCx_ICSCF_init /* * @desc This is a test step that init global variables * @param */ function f_DiameterDx_SCSCF_init() runs on DiameterCx { //Defaults vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation f_Diameter_Init_Component(); vc_ETS_address := PX_DIAMETER_CX_ETS_SCSCF_IPADDR; vc_ETS_port := PX_DIAMETER_CX_ETS_SCSCF_PORT; vc_SUT_address := PX_DIAMETER_CX_SUT_SLF_IPADDR; vc_SUT_port := PX_DIAMETER_CX_SUT_SLF_PORT; //TODO check following values/PIXITS if they should be different than in ICSCF_init function vc_sessionId := m_sessionId(PX_SessionID); vc_originHost := m_originHost(PX_OriginHost); vc_originRealm := m_originRealm(PX_OriginRealm); // realm of the originator (TS) vc_originHost_IUT := m_originHost(PX_DestinationHost); vc_originRealm_IUT := m_originRealm(PX_DestinationRealm); // realm of the originator (TS) vc_destinationHost := m_destinationHost(PX_DestinationHost); vc_destinationRealm := m_destinationRealm(PX_DestinationRealm); vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_CX_ETS_SCSCF_IPADDR)); vc_send_hopid:=hex2int('00000100'H); vc_send_endid:=hex2int('01000000'H); } // end function f_DiameterDx_SCSCF_init /* * @desc This is a test step that init global variables * @param */ function f_DiameterDx_ICSCF_init() runs on DiameterCx { //Defaults vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation f_Diameter_Init_Component(); vc_ETS_address := PX_DIAMETER_CX_ETS_ICSCF_IPADDR; vc_ETS_port := PX_DIAMETER_CX_ETS_ICSCF_PORT; vc_SUT_address := PX_DIAMETER_CX_SUT_SLF_IPADDR; vc_SUT_port := PX_DIAMETER_CX_SUT_SLF_PORT; vc_sessionId := m_sessionId(PX_SessionID); vc_originHost := m_originHost(PX_OriginHost); vc_originRealm := m_originRealm(PX_OriginRealm); // realm of the originator (TS) vc_originHost_IUT := m_originHost(PX_DestinationHost); vc_originRealm_IUT := m_originRealm(PX_DestinationRealm); // realm of the originator (TS) vc_destinationHost := m_destinationHost(PX_DestinationHost); vc_destinationRealm := m_destinationRealm(PX_DestinationRealm); vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_CX_ETS_ICSCF_IPADDR)); vc_send_hopid:=hex2int('00000100'H); vc_send_endid:=hex2int('01000000'H); } // end function f_DiameterDx_ICSCF_init } // end group GlobalSteps group Preambles{ Loading @@ -118,6 +190,15 @@ f_preambleDiameterBaseClient(c_applId3GPPCxDx); } function f_preambleDx_SCSCF () runs on DiameterCx { if(PX_DIAM_LLP_ENABLED) { f_preambleClient(); } f_DiameterDx_SCSCF_init(); f_preambleDiameterBaseClient(c_applId3GPPCxDx); } function f_preamble_ICSCF () runs on DiameterCx { if(PX_DIAM_LLP_ENABLED) { Loading @@ -127,16 +208,41 @@ f_preambleDiameterBaseClient(c_applId3GPPCxDx); } function f_preambleDx_ICSCF () runs on DiameterCx { if(PX_DIAM_LLP_ENABLED) { f_preambleClient(); } f_DiameterDx_ICSCF_init(); f_preambleDiameterBaseClient(c_applId3GPPCxDx); } }// end group Preambles group Postambles { function f_postamble_SCSCF () runs on DiameterCx { //TODO f_postambleDiameterBase(); if(PX_DIAM_LLP_ENABLED) { f_postambleDisconnect(); } // Deactivate defaults deactivate; } function f_postambleDx_SCSCF () runs on DiameterCx { f_postamble_SCSCF(); } function f_postamble_ICSCF () runs on DiameterCx { //TODO f_postamble_SCSCF(); } function f_postambleDx_ICSCF () runs on DiameterCx { f_postamble_ICSCF(); } }// end group Postambles Loading DiameterCxDx/ttcn/DiameterCxDx_TestCases.ttcn +207 −47 Original line number Diff line number Diff line Loading @@ -13,6 +13,12 @@ module DiameterCxDx_TestCases //LibDiameter import from LibDiameter_Interface all; import from LibDiameter_TypesAndValues {const c_sync1;}; //LibSip import from LibSip_Interface all; import from LibSip_SIPTypesAndValues all; //LibIms import from LibIms_SIPTypesAndValues all; import from LibIms_Interface all; //AtsIms import from DiameterCxDx_TestConfiguration all; import from DiameterCxDx_TestSystem all; Loading @@ -24,6 +30,7 @@ module DiameterCxDx_TestCases import from DiameterCxDx_TestSystem all; group TP_Cx { //Cx Test cases group TP_HSSRole{ // §5.2.1.1 group TP_HSSRole_MS {//Cx Messages Loading @@ -34,24 +41,110 @@ module DiameterCxDx_TestCases runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_scscf; f_cf_1CxUp_HSS(v_diameterComponent_scscf); var DiameterCx v_diameterComponent_icscf; f_cf_1CxUp_HSS(v_diameterComponent_icscf); //Start v_diameterComponent_scscf.start(f_TC_CX_HSS_MS_01_I()); v_diameterComponent_icscf.start(f_TC_CX_HSS_MS_01_I()); // synchronize PTC on 3 sychronization points f_serverSync1Client({c_prDone, c_tbDone, c_poDone}); f_serverSyncNClients(1,{c_prDone, c_tbDone, c_poDone}); f_cf_1CxDown_HSS(v_diameterComponent_scscf); f_cf_1CxDown_HSS(v_diameterComponent_icscf); } // end TC_CX_HSS_MS_01 /* * @desc TC_CX_HSS_MS_02 */ testcase TC_CX_HSS_MS_02() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf; f_cf_1CxUp_HSS(v_diameterComponent_icscf); //Start //v_diameterComponent_icscf.start(f_TC_CX_HSS_MS_02_I()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(1,{c_prDone, c_tbDone, c_poDone}); f_cf_1CxDown_HSS(v_diameterComponent_icscf); } // end TC_CX_HSS_MS_02 } // group TP_HSSRole_MS group TP_HSSRole_UA {//Cx UA /* * @desc TC_CX_HSS_UA_01 */ testcase TC_CX_HSS_UA_01() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf; f_cf_1CxUp_HSS(v_diameterComponent_icscf); //Start //v_diameterComponent_icscf.start(f_TC_CX_HSS_UA_01_I()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(1,{c_prDone, c_tbDone, c_poDone}); f_cf_1CxDown_HSS(v_diameterComponent_icscf); } // end TC_CX_HSS_UA_01 /* * @desc TC_CX_HSS_UA_02 */ testcase TC_CX_HSS_UA_02() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf, v_diameterComponent_scscf; f_cf_2CxUp_HSS(v_diameterComponent_icscf, v_diameterComponent_scscf); //Start //v_diameterComponent_icscf.start(f_TC_CX_HSS_UA_02_I()); //v_diameterComponent_scscf.start(f_TC_CX_HSS_UA_02_S()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(2,{c_prDone, c_tbDone, c_poDone}); f_cf_2CxDown_HSS(v_diameterComponent_icscf, v_diameterComponent_scscf); } // end TC_CX_HSS_UA_02 } // group TP_HSSRole_UA group TP_HSSRole_SA {//Cx SA } // group TP_HSSRole_SA group TP_HSSRole_RT {//Cx RT /* * @desc TC_CX_HSS_RT_08 */ testcase TC_CX_HSS_RT_08() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf, v_diameterComponent_scscf,v_diameterComponent_scscf2; f_cf_3CxUp_HSS(v_diameterComponent_icscf, v_diameterComponent_scscf, v_diameterComponent_scscf2); //Start //v_diameterComponent_icscf.start(f_TC_CX_HSS_RT_08_I()); //v_diameterComponent_scscf.start(f_TC_CX_HSS_RT_08_S()); //v_diameterComponent_scscf.start(f_TC_CX_HSS_RT_08_S2()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(3,{c_prDone, c_tbDone, c_poDone}); f_cf_3CxDown_HSS(v_diameterComponent_icscf, v_diameterComponent_scscf, v_diameterComponent_scscf2); } // end TC_CX_HSS_RT_08 } // group TP_HSSRole_RT group TP_HSSRole_LI {//Cx LI } // group TP_HSSRole_LI Loading @@ -65,6 +158,29 @@ module DiameterCxDx_TestCases group TP_CSCFRole{ // §5.2.1.2 group TP_CSCFRole_MS {//Cx Messages /* * @desc TC_CX_CSCF_MS_01 */ testcase TC_CX_CSCF_MS_01() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_cscf; var ImsComponent v_imsComponent_ue1; f_cf_1Cx1GmUp_CSCF(v_diameterComponent_cscf, v_imsComponent_ue1); //Start //v_diameterComponent_cscf.start(f_TC_CX_CSCF_MS_01())); //v_imsComponent_ue1.start(f_TC_CX_CSCF_MS_01_UE())); // synchronize PTC on 3 sychronization points f_serverSyncNClients(f_NrofCompsCx(),{c_prDone, c_tbDone, c_poDone}); f_cf_1Cx1GmDown_CSCF(v_diameterComponent_cscf, v_imsComponent_ue1); } // end TC_CX_CSCF_MS_01 } // group TP_CSCFRole_MS group TP_CSCFRole_UA {//Cx UA } // group TP_CSCFRole_UA Loading @@ -77,6 +193,50 @@ module DiameterCxDx_TestCases group TP_CSCFRole_PP {//Cx PP } // group TP_CSCFRole_PP } // group TP_CSCFRole } // group TP_Cx group TP_Dx { //Dx Test Cases group TP_SLFRole{ // §5.2.2.1 group TP_SLFRole_UA {//Dx UA /* * @desc TC_DX_SLF_UA_01 */ testcase TC_DX_SLF_UA_01() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf; f_cf_1DxUp_SLF(v_diameterComponent_icscf); //Start v_diameterComponent_icscf.start(f_TC_DX_SLF_UA_01()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(1,{c_prDone, c_tbDone, c_poDone}); f_cf_1DxDown_SLF(v_diameterComponent_icscf); } // end TC_DX_SLF_UA_01 } // group TP_SLFRole_UA group TP_SLFRole_SA {//Dx SA } // group TP_SLFRole_SA group TP_SLFRole_LI {//Dx LI } // group TP_SLFRole_LI group TP_SLFRole_MA {//Dx MA } // group TP_SLFRole_MA } // group TP_SLFRole group TP_CSCFRole{ // §5.2.1.2 group TP_CSCFRole_UA {//Dx UA } // group TP_CSCFRole_UA group TP_CSCFRole_SA {//Dx SA } // group TP_CSCFRole_SA group TP_CSCFRole_LI {//Dx LI } // group TP_CSCFRole_LI group TP_CSCFRole_MA {//Dx MA } // group TP_CSCFRole_LI } // group TP_CSCFRole } // group TP_Dx }// end module DiameterCx_TestCases No newline at end of file DiameterCxDx/ttcn/DiameterCxDx_TestConfiguration.ttcn +53 −38 Original line number Diff line number Diff line Loading @@ -103,6 +103,39 @@ module DiameterCxDx_TestConfiguration f_setVerdict( e_success ); } // End of function f_cf_2CxUp_HSS /** * @desc Creates test configuration of CF_3Cx - HSS is the SUT, with three cscf simulated * @param v_diameterCx_scscf Component instance for HSS IUT role * @param v_diameterCx_scscf2 Component instance for HSS IUT role */ function f_cf_3CxUp_HSS ( out DiameterCx v_diameterCx_icscf, out DiameterCx v_diameterCx_scscf, out DiameterCx v_diameterCx_scscf2 ) runs on DiameterCx { // Create v_diameterCx_icscf := DiameterCx.create; v_diameterCx_scscf := DiameterCx.create; v_diameterCx_scscf2 := DiameterCx.create; // Connect client sync ports connect(v_diameterCx_icscf:syncPort, self:syncPort); connect(v_diameterCx_scscf:syncPort, self:syncPort); connect(v_diameterCx_scscf2:syncPort, self:syncPort); // Map port map( v_diameterCx_icscf:DIAMP, system:CSCF_Cx ); map( v_diameterCx_scscf:DIAMP, system:CSCF_Cx2 ); map( v_diameterCx_scscf2:DIAMP, system:CSCF_Cx3 ); // Activate sync default for MTC activate(a_mtc_shutdown()); f_setVerdict( e_success ); } // End of function f_cf_3CxUp_HSS /** * @desc Creates test configuration of CF_1Cx1Gm - CSCF is the SUT, with one HSS and one UE simulated * @param v_diameterCx_cscf Component instance for HSS IUT role Loading Loading @@ -233,6 +266,26 @@ module DiameterCxDx_TestConfiguration disconnect; } // End of function f_cf_2CxDown_HSS /** * @desc Deletes test configuration of CF_3Cx - HSS is the SUT, with three cscf simulated * @param v_diameterCx_icscf Component instance for HSS IUT role * @param v_diameterCx_scscf Component instance for HSS IUT role * @param v_diameterCx_scscf2 Component instance for HSS IUT role */ function f_cf_3CxDown_HSS ( out DiameterCx v_diameterCx_icscf, out DiameterCx v_diameterCx_scscf, out DiameterCx v_diameterCx_scscf2 ) runs on DiameterCx { // Deactivate all deactivate; // Unmap all unmap; // Disconnect all disconnect; } // End of function f_cf_3CxDown_HSS /** * @desc Deletes test configuration of CF_1Cx1Gm - CSCF is the SUT, with one HSS and one UE simulated * @param v_diameterCx_cscf Component instance for HSS IUT role Loading Loading @@ -334,44 +387,6 @@ module DiameterCxDx_TestConfiguration } } /* @desc Implements synchronization of client from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to client. * Waits for PX_TSYNC_TIME_LIMIT to let client * finish executing behavior until this * synchronization point. * @remark The use of this function requires prior connection of * the server sync ports! * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync1Client( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { var integer i, v_noOfSyncIds := lengthof(p_syncPointIds); for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { f_serverSyncClientsTimed(1,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT); } } /* @desc Implements synchronization of 3 clients from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients * finish executing their behavior until this * synchronization point. * @remark The use of this function requires prior connection of * the server sync ports! * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync3Clients( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { var integer i, v_noOfSyncIds := lengthof(p_syncPointIds); for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { f_serverSyncClientsTimed(3,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT); } } } //end group syncNoStop } // end module DiameterCx_TestConfiguration DiameterCxDx/ttcn/DiameterCxDx_TestSystem.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ module DiameterCxDx_TestSystem { ** @desc The test system interface */ type component TestAdapter { port DiameterPort HSS_Cx, CSCF_Cx, CSCF_Cx2, // Cx ports HSS_Dx, CSCF_Dx; // Dx ports port DiameterPort HSS_Cx, CSCF_Cx, CSCF_Cx2, CSCF_Cx3, // Cx ports SLF_Dx, CSCF_Dx, CSCF_Dx2; // Dx ports port SipPort UE_Gm; //global variables Loading Loading
DiameterCxDx/ttcn/DiameterCxDx_Dx_TCFunctions.ttcn3 +6 −6 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ module DiameterCxDx_Dx_TCFunctions { function f_TC_DX_SLF_UA_01() runs on DiameterCx { f_preamble_ICSCF(); f_preambleDx_ICSCF(); f_selfOrClientSyncAndVerdict( c_prDone, f_getVerdict() ); // sync - preamble done Loading @@ -58,7 +58,7 @@ module DiameterCxDx_Dx_TCFunctions { f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync - postamble done f_postamble_ICSCF(); f_postambleDx_ICSCF(); } // end function f_TC_DX_SLF_UA_01 } // group TP_SLFRole_UA Loading @@ -70,7 +70,7 @@ module DiameterCxDx_Dx_TCFunctions { function f_TC_DX_SLF_SA_01() runs on DiameterCx { f_preamble_SCSCF(); f_preambleDx_SCSCF(); f_selfOrClientSyncAndVerdict( c_prDone, f_getVerdict() ); // sync - preamble done Loading @@ -93,7 +93,7 @@ module DiameterCxDx_Dx_TCFunctions { f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync - postamble done f_postamble_SCSCF(); f_postambleDx_SCSCF(); } // end function f_TC_DX_SLF_SA_01 } // group TP_SLFRole_SA Loading @@ -105,7 +105,7 @@ module DiameterCxDx_Dx_TCFunctions { function f_TC_DX_SLF_LI_01() runs on DiameterCx { f_preamble_ICSCF(); f_preambleDx_ICSCF(); f_selfOrClientSyncAndVerdict( c_prDone, f_getVerdict() ); // sync - preamble done Loading @@ -125,7 +125,7 @@ module DiameterCxDx_Dx_TCFunctions { f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync - postamble done f_postamble_ICSCF(); f_postambleDx_ICSCF(); } // end function f_TC_DX_SLF_LI_01 } // group TP_SLFRole_LI Loading
DiameterCxDx/ttcn/DiameterCxDx_Steps.ttcn +109 −3 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ vc_send_hopid:=hex2int('00000100'H); vc_send_endid:=hex2int('01000000'H); } // end function f_DiameterCx_init } // end function f_DiameterCx_SCSCF_init /* * @desc This is a test step that init global variables Loading Loading @@ -105,6 +105,78 @@ } // end function f_DiameterCx_ICSCF_init /* * @desc This is a test step that init global variables * @param */ function f_DiameterDx_SCSCF_init() runs on DiameterCx { //Defaults vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation f_Diameter_Init_Component(); vc_ETS_address := PX_DIAMETER_CX_ETS_SCSCF_IPADDR; vc_ETS_port := PX_DIAMETER_CX_ETS_SCSCF_PORT; vc_SUT_address := PX_DIAMETER_CX_SUT_SLF_IPADDR; vc_SUT_port := PX_DIAMETER_CX_SUT_SLF_PORT; //TODO check following values/PIXITS if they should be different than in ICSCF_init function vc_sessionId := m_sessionId(PX_SessionID); vc_originHost := m_originHost(PX_OriginHost); vc_originRealm := m_originRealm(PX_OriginRealm); // realm of the originator (TS) vc_originHost_IUT := m_originHost(PX_DestinationHost); vc_originRealm_IUT := m_originRealm(PX_DestinationRealm); // realm of the originator (TS) vc_destinationHost := m_destinationHost(PX_DestinationHost); vc_destinationRealm := m_destinationRealm(PX_DestinationRealm); vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_CX_ETS_SCSCF_IPADDR)); vc_send_hopid:=hex2int('00000100'H); vc_send_endid:=hex2int('01000000'H); } // end function f_DiameterDx_SCSCF_init /* * @desc This is a test step that init global variables * @param */ function f_DiameterDx_ICSCF_init() runs on DiameterCx { //Defaults vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation f_Diameter_Init_Component(); vc_ETS_address := PX_DIAMETER_CX_ETS_ICSCF_IPADDR; vc_ETS_port := PX_DIAMETER_CX_ETS_ICSCF_PORT; vc_SUT_address := PX_DIAMETER_CX_SUT_SLF_IPADDR; vc_SUT_port := PX_DIAMETER_CX_SUT_SLF_PORT; vc_sessionId := m_sessionId(PX_SessionID); vc_originHost := m_originHost(PX_OriginHost); vc_originRealm := m_originRealm(PX_OriginRealm); // realm of the originator (TS) vc_originHost_IUT := m_originHost(PX_DestinationHost); vc_originRealm_IUT := m_originRealm(PX_DestinationRealm); // realm of the originator (TS) vc_destinationHost := m_destinationHost(PX_DestinationHost); vc_destinationRealm := m_destinationRealm(PX_DestinationRealm); vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_CX_ETS_ICSCF_IPADDR)); vc_send_hopid:=hex2int('00000100'H); vc_send_endid:=hex2int('01000000'H); } // end function f_DiameterDx_ICSCF_init } // end group GlobalSteps group Preambles{ Loading @@ -118,6 +190,15 @@ f_preambleDiameterBaseClient(c_applId3GPPCxDx); } function f_preambleDx_SCSCF () runs on DiameterCx { if(PX_DIAM_LLP_ENABLED) { f_preambleClient(); } f_DiameterDx_SCSCF_init(); f_preambleDiameterBaseClient(c_applId3GPPCxDx); } function f_preamble_ICSCF () runs on DiameterCx { if(PX_DIAM_LLP_ENABLED) { Loading @@ -127,16 +208,41 @@ f_preambleDiameterBaseClient(c_applId3GPPCxDx); } function f_preambleDx_ICSCF () runs on DiameterCx { if(PX_DIAM_LLP_ENABLED) { f_preambleClient(); } f_DiameterDx_ICSCF_init(); f_preambleDiameterBaseClient(c_applId3GPPCxDx); } }// end group Preambles group Postambles { function f_postamble_SCSCF () runs on DiameterCx { //TODO f_postambleDiameterBase(); if(PX_DIAM_LLP_ENABLED) { f_postambleDisconnect(); } // Deactivate defaults deactivate; } function f_postambleDx_SCSCF () runs on DiameterCx { f_postamble_SCSCF(); } function f_postamble_ICSCF () runs on DiameterCx { //TODO f_postamble_SCSCF(); } function f_postambleDx_ICSCF () runs on DiameterCx { f_postamble_ICSCF(); } }// end group Postambles Loading
DiameterCxDx/ttcn/DiameterCxDx_TestCases.ttcn +207 −47 Original line number Diff line number Diff line Loading @@ -13,6 +13,12 @@ module DiameterCxDx_TestCases //LibDiameter import from LibDiameter_Interface all; import from LibDiameter_TypesAndValues {const c_sync1;}; //LibSip import from LibSip_Interface all; import from LibSip_SIPTypesAndValues all; //LibIms import from LibIms_SIPTypesAndValues all; import from LibIms_Interface all; //AtsIms import from DiameterCxDx_TestConfiguration all; import from DiameterCxDx_TestSystem all; Loading @@ -24,6 +30,7 @@ module DiameterCxDx_TestCases import from DiameterCxDx_TestSystem all; group TP_Cx { //Cx Test cases group TP_HSSRole{ // §5.2.1.1 group TP_HSSRole_MS {//Cx Messages Loading @@ -34,24 +41,110 @@ module DiameterCxDx_TestCases runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_scscf; f_cf_1CxUp_HSS(v_diameterComponent_scscf); var DiameterCx v_diameterComponent_icscf; f_cf_1CxUp_HSS(v_diameterComponent_icscf); //Start v_diameterComponent_scscf.start(f_TC_CX_HSS_MS_01_I()); v_diameterComponent_icscf.start(f_TC_CX_HSS_MS_01_I()); // synchronize PTC on 3 sychronization points f_serverSync1Client({c_prDone, c_tbDone, c_poDone}); f_serverSyncNClients(1,{c_prDone, c_tbDone, c_poDone}); f_cf_1CxDown_HSS(v_diameterComponent_scscf); f_cf_1CxDown_HSS(v_diameterComponent_icscf); } // end TC_CX_HSS_MS_01 /* * @desc TC_CX_HSS_MS_02 */ testcase TC_CX_HSS_MS_02() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf; f_cf_1CxUp_HSS(v_diameterComponent_icscf); //Start //v_diameterComponent_icscf.start(f_TC_CX_HSS_MS_02_I()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(1,{c_prDone, c_tbDone, c_poDone}); f_cf_1CxDown_HSS(v_diameterComponent_icscf); } // end TC_CX_HSS_MS_02 } // group TP_HSSRole_MS group TP_HSSRole_UA {//Cx UA /* * @desc TC_CX_HSS_UA_01 */ testcase TC_CX_HSS_UA_01() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf; f_cf_1CxUp_HSS(v_diameterComponent_icscf); //Start //v_diameterComponent_icscf.start(f_TC_CX_HSS_UA_01_I()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(1,{c_prDone, c_tbDone, c_poDone}); f_cf_1CxDown_HSS(v_diameterComponent_icscf); } // end TC_CX_HSS_UA_01 /* * @desc TC_CX_HSS_UA_02 */ testcase TC_CX_HSS_UA_02() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf, v_diameterComponent_scscf; f_cf_2CxUp_HSS(v_diameterComponent_icscf, v_diameterComponent_scscf); //Start //v_diameterComponent_icscf.start(f_TC_CX_HSS_UA_02_I()); //v_diameterComponent_scscf.start(f_TC_CX_HSS_UA_02_S()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(2,{c_prDone, c_tbDone, c_poDone}); f_cf_2CxDown_HSS(v_diameterComponent_icscf, v_diameterComponent_scscf); } // end TC_CX_HSS_UA_02 } // group TP_HSSRole_UA group TP_HSSRole_SA {//Cx SA } // group TP_HSSRole_SA group TP_HSSRole_RT {//Cx RT /* * @desc TC_CX_HSS_RT_08 */ testcase TC_CX_HSS_RT_08() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf, v_diameterComponent_scscf,v_diameterComponent_scscf2; f_cf_3CxUp_HSS(v_diameterComponent_icscf, v_diameterComponent_scscf, v_diameterComponent_scscf2); //Start //v_diameterComponent_icscf.start(f_TC_CX_HSS_RT_08_I()); //v_diameterComponent_scscf.start(f_TC_CX_HSS_RT_08_S()); //v_diameterComponent_scscf.start(f_TC_CX_HSS_RT_08_S2()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(3,{c_prDone, c_tbDone, c_poDone}); f_cf_3CxDown_HSS(v_diameterComponent_icscf, v_diameterComponent_scscf, v_diameterComponent_scscf2); } // end TC_CX_HSS_RT_08 } // group TP_HSSRole_RT group TP_HSSRole_LI {//Cx LI } // group TP_HSSRole_LI Loading @@ -65,6 +158,29 @@ module DiameterCxDx_TestCases group TP_CSCFRole{ // §5.2.1.2 group TP_CSCFRole_MS {//Cx Messages /* * @desc TC_CX_CSCF_MS_01 */ testcase TC_CX_CSCF_MS_01() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_cscf; var ImsComponent v_imsComponent_ue1; f_cf_1Cx1GmUp_CSCF(v_diameterComponent_cscf, v_imsComponent_ue1); //Start //v_diameterComponent_cscf.start(f_TC_CX_CSCF_MS_01())); //v_imsComponent_ue1.start(f_TC_CX_CSCF_MS_01_UE())); // synchronize PTC on 3 sychronization points f_serverSyncNClients(f_NrofCompsCx(),{c_prDone, c_tbDone, c_poDone}); f_cf_1Cx1GmDown_CSCF(v_diameterComponent_cscf, v_imsComponent_ue1); } // end TC_CX_CSCF_MS_01 } // group TP_CSCFRole_MS group TP_CSCFRole_UA {//Cx UA } // group TP_CSCFRole_UA Loading @@ -77,6 +193,50 @@ module DiameterCxDx_TestCases group TP_CSCFRole_PP {//Cx PP } // group TP_CSCFRole_PP } // group TP_CSCFRole } // group TP_Cx group TP_Dx { //Dx Test Cases group TP_SLFRole{ // §5.2.2.1 group TP_SLFRole_UA {//Dx UA /* * @desc TC_DX_SLF_UA_01 */ testcase TC_DX_SLF_UA_01() runs on DiameterCx system TestAdapter { //Variables var DiameterCx v_diameterComponent_icscf; f_cf_1DxUp_SLF(v_diameterComponent_icscf); //Start v_diameterComponent_icscf.start(f_TC_DX_SLF_UA_01()); // synchronize PTC on 3 sychronization points f_serverSyncNClients(1,{c_prDone, c_tbDone, c_poDone}); f_cf_1DxDown_SLF(v_diameterComponent_icscf); } // end TC_DX_SLF_UA_01 } // group TP_SLFRole_UA group TP_SLFRole_SA {//Dx SA } // group TP_SLFRole_SA group TP_SLFRole_LI {//Dx LI } // group TP_SLFRole_LI group TP_SLFRole_MA {//Dx MA } // group TP_SLFRole_MA } // group TP_SLFRole group TP_CSCFRole{ // §5.2.1.2 group TP_CSCFRole_UA {//Dx UA } // group TP_CSCFRole_UA group TP_CSCFRole_SA {//Dx SA } // group TP_CSCFRole_SA group TP_CSCFRole_LI {//Dx LI } // group TP_CSCFRole_LI group TP_CSCFRole_MA {//Dx MA } // group TP_CSCFRole_LI } // group TP_CSCFRole } // group TP_Dx }// end module DiameterCx_TestCases No newline at end of file
DiameterCxDx/ttcn/DiameterCxDx_TestConfiguration.ttcn +53 −38 Original line number Diff line number Diff line Loading @@ -103,6 +103,39 @@ module DiameterCxDx_TestConfiguration f_setVerdict( e_success ); } // End of function f_cf_2CxUp_HSS /** * @desc Creates test configuration of CF_3Cx - HSS is the SUT, with three cscf simulated * @param v_diameterCx_scscf Component instance for HSS IUT role * @param v_diameterCx_scscf2 Component instance for HSS IUT role */ function f_cf_3CxUp_HSS ( out DiameterCx v_diameterCx_icscf, out DiameterCx v_diameterCx_scscf, out DiameterCx v_diameterCx_scscf2 ) runs on DiameterCx { // Create v_diameterCx_icscf := DiameterCx.create; v_diameterCx_scscf := DiameterCx.create; v_diameterCx_scscf2 := DiameterCx.create; // Connect client sync ports connect(v_diameterCx_icscf:syncPort, self:syncPort); connect(v_diameterCx_scscf:syncPort, self:syncPort); connect(v_diameterCx_scscf2:syncPort, self:syncPort); // Map port map( v_diameterCx_icscf:DIAMP, system:CSCF_Cx ); map( v_diameterCx_scscf:DIAMP, system:CSCF_Cx2 ); map( v_diameterCx_scscf2:DIAMP, system:CSCF_Cx3 ); // Activate sync default for MTC activate(a_mtc_shutdown()); f_setVerdict( e_success ); } // End of function f_cf_3CxUp_HSS /** * @desc Creates test configuration of CF_1Cx1Gm - CSCF is the SUT, with one HSS and one UE simulated * @param v_diameterCx_cscf Component instance for HSS IUT role Loading Loading @@ -233,6 +266,26 @@ module DiameterCxDx_TestConfiguration disconnect; } // End of function f_cf_2CxDown_HSS /** * @desc Deletes test configuration of CF_3Cx - HSS is the SUT, with three cscf simulated * @param v_diameterCx_icscf Component instance for HSS IUT role * @param v_diameterCx_scscf Component instance for HSS IUT role * @param v_diameterCx_scscf2 Component instance for HSS IUT role */ function f_cf_3CxDown_HSS ( out DiameterCx v_diameterCx_icscf, out DiameterCx v_diameterCx_scscf, out DiameterCx v_diameterCx_scscf2 ) runs on DiameterCx { // Deactivate all deactivate; // Unmap all unmap; // Disconnect all disconnect; } // End of function f_cf_3CxDown_HSS /** * @desc Deletes test configuration of CF_1Cx1Gm - CSCF is the SUT, with one HSS and one UE simulated * @param v_diameterCx_cscf Component instance for HSS IUT role Loading Loading @@ -334,44 +387,6 @@ module DiameterCxDx_TestConfiguration } } /* @desc Implements synchronization of client from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to client. * Waits for PX_TSYNC_TIME_LIMIT to let client * finish executing behavior until this * synchronization point. * @remark The use of this function requires prior connection of * the server sync ports! * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync1Client( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { var integer i, v_noOfSyncIds := lengthof(p_syncPointIds); for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { f_serverSyncClientsTimed(1,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT); } } /* @desc Implements synchronization of 3 clients from server side * on one or more synchronization points. * If problem occurs, then server sends STOP to all clients. * Waits for PX_TSYNC_TIME_LIMIT to let clients * finish executing their behavior until this * synchronization point. * @remark The use of this function requires prior connection of * the server sync ports! * @param p_syncPointIds list of synchronization point name/ids * @return execution status */ function f_serverSync3Clients( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { var integer i, v_noOfSyncIds := lengthof(p_syncPointIds); for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { f_serverSyncClientsTimed(3,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT); } } } //end group syncNoStop } // end module DiameterCx_TestConfiguration
DiameterCxDx/ttcn/DiameterCxDx_TestSystem.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ module DiameterCxDx_TestSystem { ** @desc The test system interface */ type component TestAdapter { port DiameterPort HSS_Cx, CSCF_Cx, CSCF_Cx2, // Cx ports HSS_Dx, CSCF_Dx; // Dx ports port DiameterPort HSS_Cx, CSCF_Cx, CSCF_Cx2, CSCF_Cx3, // Cx ports SLF_Dx, CSCF_Dx, CSCF_Dx2; // Dx ports port SipPort UE_Gm; //global variables Loading