Loading ttcn/DiameterShDh_TCFunctions.ttcn3 0 → 100644 +47 −0 Original line number Diff line number Diff line module DiameterShDh_TCFunctions { // LibCommon import from LibCommon_Sync all; import from LibCommon_VerdictControl all ; // LibDiameter import from LibDiameter_PIXITS all; import from LibDiameter_TypesAndValues all; import from LibDiameter_Types_Base_AVPs all; import from LibDiameter_Types_ShDh_AVPs all; import from LibDiameter_Templates all; import from LibDiameter_Interface all; import from LibDiameter_Steps all; //DiameterShDh import from DiameterShDh_Templates all; import from DiameterShDh_Steps all; import from DiameterShDh_PIXITS all; import from DiameterShDh_TestSystem all; // 5.2.2.1. CDF Role group TP_SH_Role { // 5.2.2.1 group TP_SH_HSS_Role { // 5.2.2.1.2 Message Syntax /** * * @desc 5.2.2.1.2 Message Syntax */ group TP_SH_HSS_MS { /** * @desc Verify that the IUT can successfully process all mandatory AVPs in an AC-Request received due to Charging Data Transfer * @verdict pass on success, fail on error or inconc on timeout only */ function f_TC_SH_HSS_M() runs on DiameterShDh { } // End of function f_TC_SH_HSS_M } } } } // End of module DiameterShDh_TCFunctions No newline at end of file ttcn/DiameterShDh_TestCases.ttcn3 +20 −7 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ module DiameterShDh_TestCases { //LibDiameter import from LibDiameter_Interface all; import from LibDiameter_TypesAndValues {const c_sync1;}; import from LibDiameter_TypesAndValues all; //LibSip import from LibSip_Interface all; Loading @@ -25,9 +25,7 @@ module DiameterShDh_TestCases { //AtsIms import from DiameterShDh_TestConfiguration all; import from DiameterShDh_TestSystem all; // import from DiameterShDh_Sh_TCFunctions all; // import from DiameterShDh_Dh_TCFunctions all; // import from DiameterShDh_SIP_TCFunctions all; import from DiameterShDh_TCFunctions all; import from DiameterShDh_PICS all; import from DiameterShDh_PIXITS all; import from DiameterShDh_Steps all; Loading Loading @@ -78,9 +76,24 @@ module DiameterShDh_TestCases { * @version 0.0.6 * @see ETSI TS 103 571-2 TP_SH_HSS_MS_01 */ //testcase TC_CX_HSS_M testcase TC_CX_HSS_M() runs on DiameterShDh system TestAdapter { // Local variables var DiameterShDh v_diameterSh_hss; // Test control // Test component configuration f_cf_1Sh_hssUp(v_diameterSh_hss); // Start v_diameterSh_hss.start(f_TC_SH_HSS_M()); // synchronize PTC on 1 sychronization points f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone}); f_cf_1Sh_hssDown(v_diameterSh_hss); } // End of testcase TC_CX_HSS_M } // End of group TP_HSSRole_MS Loading ttcn/DiameterShDh_TestConfiguration.ttcn3 0 → 100644 +94 −0 Original line number Diff line number Diff line module DiameterShDh_TestConfiguration { // LibCommon import from LibCommon_Sync all; import from LibCommon_VerdictControl all; import from LibCommon_BasicTypesAndValues all; // LibDiameter import from LibDiameter_Interface all; // AtsIms import from DiameterShDh_TestSystem all; /* * @desc f_NrofComps returns the number of test components */ function f_NrofComps() runs on DiameterShDh return UInt { return vc_noOfComp; } // End of function f_NrofComps group cfUp { /** * * @desc Creates test configuration of f_cf_1Sh_hssUp - HSS is SUT * @param p_diameterComponent_hss hss component */ function f_cf_1Sh_hssUp( out DiameterShDh p_diameterComponent_hss ) runs on DiameterShDh { //Variables var FncRetCode v_ret := e_success; vc_noOfComp := 1; //Create p_diameterComponent_hss := DiameterShDh.create ; // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hss:syncPort, self:syncPort) ; //Map map(p_diameterComponent_hss:DIAMP, system:CTF_Rf); // Diameter Init test Configuration activate(a_mtc_shutdown()); f_setVerdict(v_ret); } // End of f_cf_1Rf_hssUp } // End of group cfUp group cfDown { /** * * @desc Creates test configuration of f_cf_1Sh_hssDown - HSS is SUT * @param p_diameterComponent_hss hss component */ function f_cf_1Sh_hssDown( out DiameterShDh p_diameterComponent_hss ) runs on DiameterShDh { //Variables var FncRetCode v_ret := e_success; deactivate; // Disconnect mtc sync port disconnect(self:syncPort, self:syncPort); // Disconnect client sync port disconnect(p_diameterComponent_hss:syncPort, self:syncPort) ; // Unmap unmap(p_diameterComponent_hss:DIAMP, system:CTF_Rf); f_setVerdict(v_ret); } // End of f_cf_1Rf_hssDown } // End of group cfDown group shutDownAltsteps { altstep a_mtc_shutdown() runs on SelfSyncComp { [] syncSendPort.receive(m_syncServerStop){ tc_sync.stop ; log("**** a_mtc_shutdown: MTC component received STOP signal **** "); } } } // Endgroup shutDownAltsteps } // End of module DiameterShDh_TestConfiguration No newline at end of file ttcn/DiameterShDh_TestSystem.ttcn3 +33 −1 Original line number Diff line number Diff line module DiameterShDh_TestSystem { // LibCommon import from LibCommon_Sync all; // LibDiameter import from LibDiameter_TypesAndValues all; import from LibDiameter_Interface all; group SystemConfiguration { group TestComponents { group TestSystemInterfaces { /* ** @desc The test system interface */ type component TestAdapter { port DiameterPort UDR_Sh; // Sh ports // Global variables } } // End of group TestSystemInterfaces type component DiameterShDh extends ServerSyncComp, DiameterComponent { var integer vc_noOfComp := 1; //Number of components } // End of component DiameterShDh } // End of group TestComponents } // End of group SystemConfiguration } // End of module Diameter_TestSystem No newline at end of file Loading
ttcn/DiameterShDh_TCFunctions.ttcn3 0 → 100644 +47 −0 Original line number Diff line number Diff line module DiameterShDh_TCFunctions { // LibCommon import from LibCommon_Sync all; import from LibCommon_VerdictControl all ; // LibDiameter import from LibDiameter_PIXITS all; import from LibDiameter_TypesAndValues all; import from LibDiameter_Types_Base_AVPs all; import from LibDiameter_Types_ShDh_AVPs all; import from LibDiameter_Templates all; import from LibDiameter_Interface all; import from LibDiameter_Steps all; //DiameterShDh import from DiameterShDh_Templates all; import from DiameterShDh_Steps all; import from DiameterShDh_PIXITS all; import from DiameterShDh_TestSystem all; // 5.2.2.1. CDF Role group TP_SH_Role { // 5.2.2.1 group TP_SH_HSS_Role { // 5.2.2.1.2 Message Syntax /** * * @desc 5.2.2.1.2 Message Syntax */ group TP_SH_HSS_MS { /** * @desc Verify that the IUT can successfully process all mandatory AVPs in an AC-Request received due to Charging Data Transfer * @verdict pass on success, fail on error or inconc on timeout only */ function f_TC_SH_HSS_M() runs on DiameterShDh { } // End of function f_TC_SH_HSS_M } } } } // End of module DiameterShDh_TCFunctions No newline at end of file
ttcn/DiameterShDh_TestCases.ttcn3 +20 −7 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ module DiameterShDh_TestCases { //LibDiameter import from LibDiameter_Interface all; import from LibDiameter_TypesAndValues {const c_sync1;}; import from LibDiameter_TypesAndValues all; //LibSip import from LibSip_Interface all; Loading @@ -25,9 +25,7 @@ module DiameterShDh_TestCases { //AtsIms import from DiameterShDh_TestConfiguration all; import from DiameterShDh_TestSystem all; // import from DiameterShDh_Sh_TCFunctions all; // import from DiameterShDh_Dh_TCFunctions all; // import from DiameterShDh_SIP_TCFunctions all; import from DiameterShDh_TCFunctions all; import from DiameterShDh_PICS all; import from DiameterShDh_PIXITS all; import from DiameterShDh_Steps all; Loading Loading @@ -78,9 +76,24 @@ module DiameterShDh_TestCases { * @version 0.0.6 * @see ETSI TS 103 571-2 TP_SH_HSS_MS_01 */ //testcase TC_CX_HSS_M testcase TC_CX_HSS_M() runs on DiameterShDh system TestAdapter { // Local variables var DiameterShDh v_diameterSh_hss; // Test control // Test component configuration f_cf_1Sh_hssUp(v_diameterSh_hss); // Start v_diameterSh_hss.start(f_TC_SH_HSS_M()); // synchronize PTC on 1 sychronization points f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone}); f_cf_1Sh_hssDown(v_diameterSh_hss); } // End of testcase TC_CX_HSS_M } // End of group TP_HSSRole_MS Loading
ttcn/DiameterShDh_TestConfiguration.ttcn3 0 → 100644 +94 −0 Original line number Diff line number Diff line module DiameterShDh_TestConfiguration { // LibCommon import from LibCommon_Sync all; import from LibCommon_VerdictControl all; import from LibCommon_BasicTypesAndValues all; // LibDiameter import from LibDiameter_Interface all; // AtsIms import from DiameterShDh_TestSystem all; /* * @desc f_NrofComps returns the number of test components */ function f_NrofComps() runs on DiameterShDh return UInt { return vc_noOfComp; } // End of function f_NrofComps group cfUp { /** * * @desc Creates test configuration of f_cf_1Sh_hssUp - HSS is SUT * @param p_diameterComponent_hss hss component */ function f_cf_1Sh_hssUp( out DiameterShDh p_diameterComponent_hss ) runs on DiameterShDh { //Variables var FncRetCode v_ret := e_success; vc_noOfComp := 1; //Create p_diameterComponent_hss := DiameterShDh.create ; // Connect mtc sync port connect(self:syncPort, self:syncPort); // Connect client sync port connect(p_diameterComponent_hss:syncPort, self:syncPort) ; //Map map(p_diameterComponent_hss:DIAMP, system:CTF_Rf); // Diameter Init test Configuration activate(a_mtc_shutdown()); f_setVerdict(v_ret); } // End of f_cf_1Rf_hssUp } // End of group cfUp group cfDown { /** * * @desc Creates test configuration of f_cf_1Sh_hssDown - HSS is SUT * @param p_diameterComponent_hss hss component */ function f_cf_1Sh_hssDown( out DiameterShDh p_diameterComponent_hss ) runs on DiameterShDh { //Variables var FncRetCode v_ret := e_success; deactivate; // Disconnect mtc sync port disconnect(self:syncPort, self:syncPort); // Disconnect client sync port disconnect(p_diameterComponent_hss:syncPort, self:syncPort) ; // Unmap unmap(p_diameterComponent_hss:DIAMP, system:CTF_Rf); f_setVerdict(v_ret); } // End of f_cf_1Rf_hssDown } // End of group cfDown group shutDownAltsteps { altstep a_mtc_shutdown() runs on SelfSyncComp { [] syncSendPort.receive(m_syncServerStop){ tc_sync.stop ; log("**** a_mtc_shutdown: MTC component received STOP signal **** "); } } } // Endgroup shutDownAltsteps } // End of module DiameterShDh_TestConfiguration No newline at end of file
ttcn/DiameterShDh_TestSystem.ttcn3 +33 −1 Original line number Diff line number Diff line module DiameterShDh_TestSystem { // LibCommon import from LibCommon_Sync all; // LibDiameter import from LibDiameter_TypesAndValues all; import from LibDiameter_Interface all; group SystemConfiguration { group TestComponents { group TestSystemInterfaces { /* ** @desc The test system interface */ type component TestAdapter { port DiameterPort UDR_Sh; // Sh ports // Global variables } } // End of group TestSystemInterfaces type component DiameterShDh extends ServerSyncComp, DiameterComponent { var integer vc_noOfComp := 1; //Number of components } // End of component DiameterShDh } // End of group TestComponents } // End of group SystemConfiguration } // End of module Diameter_TestSystem No newline at end of file