Loading DiameterS9/ttcn/DiameterS9_Steps.ttcn3 +22 −13 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import from DiameterS9_Templates all; import from DiameterS9_Gxx_Templates all; import from DiameterS9_TestConfiguration all; import from DiameterS9_TestSystem all; group GlobalSteps { Loading @@ -36,7 +37,6 @@ runs on DiameterComponent { //Defaults vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop()); vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation Loading Loading @@ -73,7 +73,6 @@ runs on DiameterComponent { //Defaults vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop()); vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation Loading Loading @@ -110,7 +109,6 @@ runs on DiameterComponent { //Defaults vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop()); vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation Loading Loading @@ -147,7 +145,6 @@ runs on DiameterComponent { //Defaults vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop()); vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation Loading Loading @@ -188,6 +185,7 @@ { f_preambleClient(); } f_DiameterS9_init(); f_preambleDiameterBaseClient(c_applIdS9); } Loading @@ -198,6 +196,7 @@ { f_preambleServer(); } f_DiameterS9_init(); f_preambleDiameterBaseServer(c_applIdS9); } Loading @@ -208,6 +207,7 @@ { f_preambleClient(); } f_DiameterGxx1_init(); f_preambleDiameterBaseClient(c_applIdGxx); } Loading @@ -228,6 +228,7 @@ { f_preambleClient(); } f_DiameterGx_init(); f_preambleDiameterBaseClient(c_applIdGx); } Loading Loading @@ -318,6 +319,8 @@ f_postambleDisconnect(); } // Deactivate defaults deactivate; } function f_postamble_HPCRF() runs on DiameterComponent Loading @@ -330,6 +333,8 @@ f_postambleDisconnect(); } // Deactivate defaults deactivate; } function f_postamble_BBERF() runs on DiameterComponent Loading @@ -340,6 +345,8 @@ if(PX_DIAM_LLP_ENABLED) { f_postambleDisconnect(); // Deactivate defaults deactivate; } } Loading @@ -354,6 +361,8 @@ f_postambleDisconnect(); } // Deactivate defaults deactivate; } /** Loading Loading @@ -408,16 +417,16 @@ function f_ConfigRun_HPCRF_PCEF(DiameterComponent p_diameterComponent_hpcrf, DiameterComponent p_diameterComponent_pcef, in SyncPointList p_syncPointIds ) runs on ServerSyncComp in SyncPointList p_syncPointIds ) runs on DiameterS9 { if (PX_Gxsupport) { // synchronize PTCs on 3 sychronization points f_serverSync2Clients(p_syncPointIds); f_serverSync2ClientsAndStop(p_syncPointIds); f_cf_1S9_1Gx_hpcrfDown(p_diameterComponent_hpcrf, p_diameterComponent_pcef); } else { // synchronize single PTC on 3 sychronization points f_serverSync1Client(p_syncPointIds); f_serverSyncNClientsAndStop(f_NrofComps(), p_syncPointIds); f_cf_1S9_hpcrfDown(p_diameterComponent_hpcrf); } } Loading Loading @@ -455,16 +464,16 @@ function f_ConfigRun_HPCRF_BBERF(DiameterComponent p_diameterComponent_hpcrf, DiameterComponent p_diameterComponent_bberf, in SyncPointList p_syncPointIds ) runs on ServerSyncComp in SyncPointList p_syncPointIds ) runs on DiameterS9 { if (PX_Gxxsupport) { // synchronize PTCs on 3 sychronization points f_serverSync2Clients(p_syncPointIds ); f_serverSync2ClientsAndStop(p_syncPointIds ); f_cf_1S9_1Gxx_hpcrfDown(p_diameterComponent_hpcrf, p_diameterComponent_bberf); } else { // synchronize single PTC on 3 sychronization points f_serverSync1Client(p_syncPointIds ); f_serverSyncNClientsAndStop(f_NrofComps(), p_syncPointIds ); f_cf_1S9_hpcrfDown(p_diameterComponent_hpcrf); } } Loading @@ -472,17 +481,17 @@ function f_ConfigRun_HPCRF_2BBERF(DiameterComponent p_diameterComponent_hpcrf, DiameterComponent p_diameterComponent_bberf1, DiameterComponent p_diameterComponent_bberf2, in SyncPointList p_syncPointIds ) runs on ServerSyncComp in SyncPointList p_syncPointIds ) runs on DiameterS9 { if (PX_Gxxsupport) { // synchronize PTCs on 3 sychronization points f_serverSync3Clients(p_syncPointIds); f_serverSync3ClientsAndStop(p_syncPointIds); f_cf_1S9_2Gxx_hpcrfDown(p_diameterComponent_hpcrf, p_diameterComponent_bberf1, p_diameterComponent_bberf2); } else { // synchronize single PTC on 3 sychronization points f_serverSync1Client(p_syncPointIds); f_serverSyncNClientsAndStop(f_NrofComps(), p_syncPointIds); f_cf_1S9_hpcrfDown(p_diameterComponent_hpcrf); } } Loading DiameterS9/ttcn/DiameterS9_TestCases.ttcn +120 −119 File changed.Preview size limit exceeded, changes collapsed. Show changes DiameterS9/ttcn/DiameterS9_TestConfiguration.ttcn +117 −178 Original line number Diff line number Diff line Loading @@ -8,11 +8,10 @@ module DiameterS9_TestConfiguration { //LibCommon import from LibCommon_Sync {type ServerSyncComp,SyncPointList; modulepar PX_TSYNC_TIME_LIMIT; function f_serverWaitForAllClientsToStop, f_serverSyncClientsTimed;} ; import from LibCommon_Sync all; import from LibCommon_VerdictControl {type FncRetCode; function f_setVerdict;} import from LibCommon_BasicTypesAndValues { type UInt }; //LibDiameter import from LibDiameter_Interface all; Loading @@ -25,7 +24,7 @@ module DiameterS9_TestConfiguration ** @desc f_NrofComps returns the number of test components ** based on the PIXIT value PX_Rxsupportt */ function f_NrofComps() return integer function f_NrofComps() return UInt { if (PX_Gxsupport or PX_Gxxsupport) { return 2 } else Loading @@ -41,7 +40,7 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_vpcrf v-pcrf component */ function f_cf_1S9_vpcrfUp(out DiameterComponent p_diameterComponent_vpcrf) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; Loading @@ -49,7 +48,9 @@ module DiameterS9_TestConfiguration //Create p_diameterComponent_vpcrf := DiameterComponent.create ; //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_vpcrf:syncPort, self:syncPort) ; //Map map(p_diameterComponent_vpcrf:DIAMP, system:V_PCRF_S9);// Diameter Init test Configuration Loading @@ -57,6 +58,8 @@ module DiameterS9_TestConfiguration map(p_diameterComponent_vpcrf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_vpcrfUp Loading @@ -66,7 +69,7 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_hpcrf h-pcrf component */ function f_cf_1S9_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; Loading @@ -74,15 +77,18 @@ module DiameterS9_TestConfiguration //Create p_diameterComponent_hpcrf := DiameterComponent.create ; //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; //Map map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration if (PX_DIAM_LLP_ENABLED){ map(p_diameterComponent_hpcrf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_hpcrfUp Loading @@ -93,7 +99,7 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_pcef pcef component */ function f_cf_1S9_1Gx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_pcef) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; Loading @@ -103,7 +109,9 @@ module DiameterS9_TestConfiguration if (PX_Gxsupport) { p_diameterComponent_pcef := DiameterComponent.create ; } //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; if (PX_Gxsupport) { connect(p_diameterComponent_pcef:syncPort, self:syncPort) ; Loading @@ -118,6 +126,8 @@ module DiameterS9_TestConfiguration map(p_diameterComponent_pcef:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_1Gx_hpcrfUp Loading @@ -128,17 +138,18 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_bberf bberf component */ function f_cf_1S9_1Gxx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_bberf) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; //Create p_diameterComponent_hpcrf := DiameterComponent.create ; if (PX_Gxxsupport) { p_diameterComponent_bberf := DiameterComponent.create ; } //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; if (PX_Gxxsupport) { connect(p_diameterComponent_bberf:syncPort, self:syncPort) ; Loading @@ -153,6 +164,8 @@ module DiameterS9_TestConfiguration map(p_diameterComponent_bberf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_1Gxx_hpcrfUp Loading @@ -164,7 +177,7 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_bberf2 bberf2 represents new bberf component */ function f_cf_1S9_2Gxx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_bberf1, out DiameterComponent p_diameterComponent_bberf2) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; Loading @@ -175,7 +188,9 @@ module DiameterS9_TestConfiguration p_diameterComponent_bberf1 := DiameterComponent.create ; p_diameterComponent_bberf2 := DiameterComponent.create ; } //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; if (PX_Gxxsupport) { connect(p_diameterComponent_bberf1:syncPort, self:syncPort) ; Loading @@ -193,6 +208,8 @@ module DiameterS9_TestConfiguration map(p_diameterComponent_bberf2:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_2Gxx_hpcrfUp Loading @@ -206,9 +223,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_vpcrf diameter component */ function f_cf_1S9_vpcrfDown(in DiameterComponent p_diameterComponent_vpcrf) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_vpcrf:syncPort, self:syncPort); Loading @@ -225,9 +242,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_hpcrf diameter component */ function f_cf_1S9_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); Loading @@ -237,6 +254,7 @@ module DiameterS9_TestConfiguration if (PX_DIAM_LLP_ENABLED){ unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS); } }//end f_cf_1S9_hpcrfDown /** Loading @@ -246,9 +264,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_pcef diameter component */ function f_cf_1S9_1Gx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_pcef) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); Loading @@ -264,6 +282,7 @@ module DiameterS9_TestConfiguration unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS); unmap(p_diameterComponent_pcef:LLPP, system:LLIMS); } }//end f_cf_1S9_1Gx_hpcrfDown /** Loading @@ -273,9 +292,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_bberf diameter component */ function f_cf_1S9_1Gxx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_bberf) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); Loading @@ -291,6 +310,7 @@ module DiameterS9_TestConfiguration unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS); unmap(p_diameterComponent_bberf:LLPP, system:LLIMS); } }//end f_cf_1S9_1Gxx_hpcrfDown /** Loading @@ -300,9 +320,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_bberf diameter component */ function f_cf_1S9_2Gxx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_bberf1, in DiameterComponent p_diameterComponent_bberf2) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); Loading @@ -321,102 +341,21 @@ module DiameterS9_TestConfiguration unmap(p_diameterComponent_bberf1:LLPP, system:LLIMS); unmap(p_diameterComponent_bberf2:LLPP, system:LLIMS); } }//end f_cf_1S9_2Gxx_hpcrfDown } //end group cfDown group syncNoStop // Same functions as in LibCommon but without call of f_serverWaitForAllClientsToStop() { /** * @desc Implements synchronization of N 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. After passing all synchronization * points successfuly the server waits for all clients * to stop. * See f_serverSyncClientsTimed for overwriting this * the timing constraint! * This function sets the server component verdict. * @remark The use of this function requires prior connection of * the server sync ports! * @see LibCommon_Sync.f_connect4SelfOrClientSync * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT * @see LibCommon_Sync.f_serverSyncClientsTimed * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_numClients number of synchronization clients * @param p_syncPointIds list of synchronization point name/ids */ function f_serverSyncNClients ( in integer p_numClients, 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 ( p_numClients, p_syncPointIds[i], PX_TSYNC_TIME_LIMIT ); } } /* @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); } } group shutDownAltsteps { /* @desc Implements synchronization of 2 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_serverSync2Clients( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { var integer i, v_noOfSyncIds := sizeof(p_syncPointIds); for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { f_serverSyncClientsTimed(2,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT); altstep a_mtc_shutdown() runs on SelfSyncComp { [] syncSendPort.receive(m_syncServerStop){ tc_sync.stop ; log("**** a_mtc_shutdown: MTC component received STOP signal **** "); } } /* @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 := sizeof(p_syncPointIds); for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { f_serverSyncClientsTimed(3,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT); } } } // end group shutDownAltsteps } //end group syncNoStop } // end module DiameterS9_TestConfiguration DiameterS9/ttcn/DiameterS9_TestSystem.ttcn +7 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,9 @@ module DiameterS9_TestSystem { // LibCommon import from LibCommon_Sync all; //LibDiameter import from LibDiameter_Interface {type DiameterPort;}; Loading @@ -25,6 +28,10 @@ module DiameterS9_TestSystem { } } // end Group TestSystemInterfaces type component DiameterS9 extends ServerSyncComp, SelfSyncComp { } // End of component DiameterS9 }// end group TestComponents } //end group SystemConfiguration } // end module DiameterS9_TestSystem Loading
DiameterS9/ttcn/DiameterS9_Steps.ttcn3 +22 −13 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import from DiameterS9_Templates all; import from DiameterS9_Gxx_Templates all; import from DiameterS9_TestConfiguration all; import from DiameterS9_TestSystem all; group GlobalSteps { Loading @@ -36,7 +37,6 @@ runs on DiameterComponent { //Defaults vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop()); vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation Loading Loading @@ -73,7 +73,6 @@ runs on DiameterComponent { //Defaults vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop()); vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation Loading Loading @@ -110,7 +109,6 @@ runs on DiameterComponent { //Defaults vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop()); vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation Loading Loading @@ -147,7 +145,6 @@ runs on DiameterComponent { //Defaults vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop()); vc_default_diameter := activate (a_diameter_default()); //Base LibDiameter init function if there will be any base initialisation Loading Loading @@ -188,6 +185,7 @@ { f_preambleClient(); } f_DiameterS9_init(); f_preambleDiameterBaseClient(c_applIdS9); } Loading @@ -198,6 +196,7 @@ { f_preambleServer(); } f_DiameterS9_init(); f_preambleDiameterBaseServer(c_applIdS9); } Loading @@ -208,6 +207,7 @@ { f_preambleClient(); } f_DiameterGxx1_init(); f_preambleDiameterBaseClient(c_applIdGxx); } Loading @@ -228,6 +228,7 @@ { f_preambleClient(); } f_DiameterGx_init(); f_preambleDiameterBaseClient(c_applIdGx); } Loading Loading @@ -318,6 +319,8 @@ f_postambleDisconnect(); } // Deactivate defaults deactivate; } function f_postamble_HPCRF() runs on DiameterComponent Loading @@ -330,6 +333,8 @@ f_postambleDisconnect(); } // Deactivate defaults deactivate; } function f_postamble_BBERF() runs on DiameterComponent Loading @@ -340,6 +345,8 @@ if(PX_DIAM_LLP_ENABLED) { f_postambleDisconnect(); // Deactivate defaults deactivate; } } Loading @@ -354,6 +361,8 @@ f_postambleDisconnect(); } // Deactivate defaults deactivate; } /** Loading Loading @@ -408,16 +417,16 @@ function f_ConfigRun_HPCRF_PCEF(DiameterComponent p_diameterComponent_hpcrf, DiameterComponent p_diameterComponent_pcef, in SyncPointList p_syncPointIds ) runs on ServerSyncComp in SyncPointList p_syncPointIds ) runs on DiameterS9 { if (PX_Gxsupport) { // synchronize PTCs on 3 sychronization points f_serverSync2Clients(p_syncPointIds); f_serverSync2ClientsAndStop(p_syncPointIds); f_cf_1S9_1Gx_hpcrfDown(p_diameterComponent_hpcrf, p_diameterComponent_pcef); } else { // synchronize single PTC on 3 sychronization points f_serverSync1Client(p_syncPointIds); f_serverSyncNClientsAndStop(f_NrofComps(), p_syncPointIds); f_cf_1S9_hpcrfDown(p_diameterComponent_hpcrf); } } Loading Loading @@ -455,16 +464,16 @@ function f_ConfigRun_HPCRF_BBERF(DiameterComponent p_diameterComponent_hpcrf, DiameterComponent p_diameterComponent_bberf, in SyncPointList p_syncPointIds ) runs on ServerSyncComp in SyncPointList p_syncPointIds ) runs on DiameterS9 { if (PX_Gxxsupport) { // synchronize PTCs on 3 sychronization points f_serverSync2Clients(p_syncPointIds ); f_serverSync2ClientsAndStop(p_syncPointIds ); f_cf_1S9_1Gxx_hpcrfDown(p_diameterComponent_hpcrf, p_diameterComponent_bberf); } else { // synchronize single PTC on 3 sychronization points f_serverSync1Client(p_syncPointIds ); f_serverSyncNClientsAndStop(f_NrofComps(), p_syncPointIds ); f_cf_1S9_hpcrfDown(p_diameterComponent_hpcrf); } } Loading @@ -472,17 +481,17 @@ function f_ConfigRun_HPCRF_2BBERF(DiameterComponent p_diameterComponent_hpcrf, DiameterComponent p_diameterComponent_bberf1, DiameterComponent p_diameterComponent_bberf2, in SyncPointList p_syncPointIds ) runs on ServerSyncComp in SyncPointList p_syncPointIds ) runs on DiameterS9 { if (PX_Gxxsupport) { // synchronize PTCs on 3 sychronization points f_serverSync3Clients(p_syncPointIds); f_serverSync3ClientsAndStop(p_syncPointIds); f_cf_1S9_2Gxx_hpcrfDown(p_diameterComponent_hpcrf, p_diameterComponent_bberf1, p_diameterComponent_bberf2); } else { // synchronize single PTC on 3 sychronization points f_serverSync1Client(p_syncPointIds); f_serverSyncNClientsAndStop(f_NrofComps(), p_syncPointIds); f_cf_1S9_hpcrfDown(p_diameterComponent_hpcrf); } } Loading
DiameterS9/ttcn/DiameterS9_TestCases.ttcn +120 −119 File changed.Preview size limit exceeded, changes collapsed. Show changes
DiameterS9/ttcn/DiameterS9_TestConfiguration.ttcn +117 −178 Original line number Diff line number Diff line Loading @@ -8,11 +8,10 @@ module DiameterS9_TestConfiguration { //LibCommon import from LibCommon_Sync {type ServerSyncComp,SyncPointList; modulepar PX_TSYNC_TIME_LIMIT; function f_serverWaitForAllClientsToStop, f_serverSyncClientsTimed;} ; import from LibCommon_Sync all; import from LibCommon_VerdictControl {type FncRetCode; function f_setVerdict;} import from LibCommon_BasicTypesAndValues { type UInt }; //LibDiameter import from LibDiameter_Interface all; Loading @@ -25,7 +24,7 @@ module DiameterS9_TestConfiguration ** @desc f_NrofComps returns the number of test components ** based on the PIXIT value PX_Rxsupportt */ function f_NrofComps() return integer function f_NrofComps() return UInt { if (PX_Gxsupport or PX_Gxxsupport) { return 2 } else Loading @@ -41,7 +40,7 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_vpcrf v-pcrf component */ function f_cf_1S9_vpcrfUp(out DiameterComponent p_diameterComponent_vpcrf) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; Loading @@ -49,7 +48,9 @@ module DiameterS9_TestConfiguration //Create p_diameterComponent_vpcrf := DiameterComponent.create ; //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_vpcrf:syncPort, self:syncPort) ; //Map map(p_diameterComponent_vpcrf:DIAMP, system:V_PCRF_S9);// Diameter Init test Configuration Loading @@ -57,6 +58,8 @@ module DiameterS9_TestConfiguration map(p_diameterComponent_vpcrf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_vpcrfUp Loading @@ -66,7 +69,7 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_hpcrf h-pcrf component */ function f_cf_1S9_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; Loading @@ -74,15 +77,18 @@ module DiameterS9_TestConfiguration //Create p_diameterComponent_hpcrf := DiameterComponent.create ; //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; //Map map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration if (PX_DIAM_LLP_ENABLED){ map(p_diameterComponent_hpcrf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_hpcrfUp Loading @@ -93,7 +99,7 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_pcef pcef component */ function f_cf_1S9_1Gx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_pcef) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; Loading @@ -103,7 +109,9 @@ module DiameterS9_TestConfiguration if (PX_Gxsupport) { p_diameterComponent_pcef := DiameterComponent.create ; } //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; if (PX_Gxsupport) { connect(p_diameterComponent_pcef:syncPort, self:syncPort) ; Loading @@ -118,6 +126,8 @@ module DiameterS9_TestConfiguration map(p_diameterComponent_pcef:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_1Gx_hpcrfUp Loading @@ -128,17 +138,18 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_bberf bberf component */ function f_cf_1S9_1Gxx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_bberf) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; //Create p_diameterComponent_hpcrf := DiameterComponent.create ; if (PX_Gxxsupport) { p_diameterComponent_bberf := DiameterComponent.create ; } //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; if (PX_Gxxsupport) { connect(p_diameterComponent_bberf:syncPort, self:syncPort) ; Loading @@ -153,6 +164,8 @@ module DiameterS9_TestConfiguration map(p_diameterComponent_bberf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_1Gxx_hpcrfUp Loading @@ -164,7 +177,7 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_bberf2 bberf2 represents new bberf component */ function f_cf_1S9_2Gxx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_bberf1, out DiameterComponent p_diameterComponent_bberf2) runs on ServerSyncComp runs on DiameterS9 { //Variables var FncRetCode v_ret := e_success; Loading @@ -175,7 +188,9 @@ module DiameterS9_TestConfiguration p_diameterComponent_bberf1 := DiameterComponent.create ; p_diameterComponent_bberf2 := DiameterComponent.create ; } //Connect // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; if (PX_Gxxsupport) { connect(p_diameterComponent_bberf1:syncPort, self:syncPort) ; Loading @@ -193,6 +208,8 @@ module DiameterS9_TestConfiguration map(p_diameterComponent_bberf2:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration } activate(a_mtc_shutdown()); f_setVerdict(v_ret); }//end f_cf_1S9_2Gxx_hpcrfUp Loading @@ -206,9 +223,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_vpcrf diameter component */ function f_cf_1S9_vpcrfDown(in DiameterComponent p_diameterComponent_vpcrf) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_vpcrf:syncPort, self:syncPort); Loading @@ -225,9 +242,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_hpcrf diameter component */ function f_cf_1S9_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); Loading @@ -237,6 +254,7 @@ module DiameterS9_TestConfiguration if (PX_DIAM_LLP_ENABLED){ unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS); } }//end f_cf_1S9_hpcrfDown /** Loading @@ -246,9 +264,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_pcef diameter component */ function f_cf_1S9_1Gx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_pcef) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); Loading @@ -264,6 +282,7 @@ module DiameterS9_TestConfiguration unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS); unmap(p_diameterComponent_pcef:LLPP, system:LLIMS); } }//end f_cf_1S9_1Gx_hpcrfDown /** Loading @@ -273,9 +292,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_bberf diameter component */ function f_cf_1S9_1Gxx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_bberf) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); Loading @@ -291,6 +310,7 @@ module DiameterS9_TestConfiguration unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS); unmap(p_diameterComponent_bberf:LLPP, system:LLIMS); } }//end f_cf_1S9_1Gxx_hpcrfDown /** Loading @@ -300,9 +320,9 @@ module DiameterS9_TestConfiguration * @param p_diameterComponent_bberf diameter component */ function f_cf_1S9_2Gxx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_bberf1, in DiameterComponent p_diameterComponent_bberf2) runs on ServerSyncComp runs on DiameterS9 { f_serverWaitForAllClientsToStop(); deactivate; //Disconnect disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); Loading @@ -321,102 +341,21 @@ module DiameterS9_TestConfiguration unmap(p_diameterComponent_bberf1:LLPP, system:LLIMS); unmap(p_diameterComponent_bberf2:LLPP, system:LLIMS); } }//end f_cf_1S9_2Gxx_hpcrfDown } //end group cfDown group syncNoStop // Same functions as in LibCommon but without call of f_serverWaitForAllClientsToStop() { /** * @desc Implements synchronization of N 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. After passing all synchronization * points successfuly the server waits for all clients * to stop. * See f_serverSyncClientsTimed for overwriting this * the timing constraint! * This function sets the server component verdict. * @remark The use of this function requires prior connection of * the server sync ports! * @see LibCommon_Sync.f_connect4SelfOrClientSync * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT * @see LibCommon_Sync.f_serverSyncClientsTimed * @see LibCommon_Sync.f_serverWaitForAllClientsToStop * @param p_numClients number of synchronization clients * @param p_syncPointIds list of synchronization point name/ids */ function f_serverSyncNClients ( in integer p_numClients, 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 ( p_numClients, p_syncPointIds[i], PX_TSYNC_TIME_LIMIT ); } } /* @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); } } group shutDownAltsteps { /* @desc Implements synchronization of 2 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_serverSync2Clients( in SyncPointList p_syncPointIds ) runs on ServerSyncComp { var integer i, v_noOfSyncIds := sizeof(p_syncPointIds); for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { f_serverSyncClientsTimed(2,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT); altstep a_mtc_shutdown() runs on SelfSyncComp { [] syncSendPort.receive(m_syncServerStop){ tc_sync.stop ; log("**** a_mtc_shutdown: MTC component received STOP signal **** "); } } /* @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 := sizeof(p_syncPointIds); for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { f_serverSyncClientsTimed(3,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT); } } } // end group shutDownAltsteps } //end group syncNoStop } // end module DiameterS9_TestConfiguration
DiameterS9/ttcn/DiameterS9_TestSystem.ttcn +7 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,9 @@ module DiameterS9_TestSystem { // LibCommon import from LibCommon_Sync all; //LibDiameter import from LibDiameter_Interface {type DiameterPort;}; Loading @@ -25,6 +28,10 @@ module DiameterS9_TestSystem { } } // end Group TestSystemInterfaces type component DiameterS9 extends ServerSyncComp, SelfSyncComp { } // End of component DiameterS9 }// end group TestComponents } //end group SystemConfiguration } // end module DiameterS9_TestSystem