Loading DiameterS6a/ttcn/DiameterS6a_HSS_TCFunctions.ttcn3 +101 −51 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ module DiameterS6a_HSS_TCFunctions { import from DiameterS6a_Steps { function f_preamble_HSS, f_postamble_HSS, f_triggerUlrMessage; f_triggerUlrMessage, f_triggerClaMessage; altstep a_hss_default }; import from DiameterS6a_TestSystem { Loading Loading @@ -410,7 +410,7 @@ module DiameterS6a_HSS_TCFunctions { mw_mmeUpdateLocationAnswer( mdw_ULA_TCs( ?, mdw_ulaBodyAvps_TC_05( mdw_ulaBodyAvps_TC_06( mw_experimentalResult( // containing an Experimental-Result AVP mw_experimentalResultCode( // containing an Experimental-Result-Code AVP DIAMETER_ERROR_RAT_NOT_ALLOWED_E // indicating DIAMETER_ERROR_RAT_NOT_ALLOWED Loading Loading @@ -485,7 +485,7 @@ module DiameterS6a_HSS_TCFunctions { mw_mmeUpdateLocationAnswer( mdw_ULA_TCs( ?, mdw_ulaBodyAvps_TC_05( mdw_ulaBodyAvps_TC_07( mw_experimentalResult( // containing an Experimental-Result AVP mw_experimentalResultCode( // containing an Experimental-Result-Code AVP DIAMETER_ERROR_ROAMING_NOT_ALLOWED_E // indicating DIAMETER_ERROR_ROAMING_NOT_ALLOWED Loading Loading @@ -527,8 +527,7 @@ module DiameterS6a_HSS_TCFunctions { // Local variables var integer v_recvSteps := 0; // Initial state : await for first CL-Answer message // Next state : the IUT receives a CL-Answer from previous MIME // Next state : the IUT sends a UL-Answer to new MME // Final state : the IUT sends a UL-Answer to new MME var DIAMETER_MSG v_result; // Preamble Loading @@ -549,58 +548,45 @@ module DiameterS6a_HSS_TCFunctions { m_user_Name(PX_USR_NAME), m_rAT_Type(PX_RAT_TYPE), m_ulr_Flags_AVP(PX_ULR_FLAGS_S6a_IND_SET), md_visitedPLMNId( md_visitedPLMNId( // from new MME PX_OTHER_VISITED_PLMN_ID ) ) // End of md_ulrBodyAvps_TC_01 ) // End of md_ULR_TCs ); // Clause 'then': the IUT sends a CL-Answer to previous MME // Clause 'then': tc_ac.start; alt { // [v_recvSteps == 0] MME_S6a.receive( // mw_mmeUpdateLocationAnswer( // mdw_ULA_TCs( // ?, // mdw_ulaBodyAvps_TC_08( // mw_cancellation( // containing a Cancellation-Type AVP // MME_UPDATE_PROCEDURE // indicating MME_UPDATE_PROCEDURE // ), // mw_errorDiagnostic(?) // containing an Error-Diagnostic AVP // )))) -> value v_result { // Expected CL-Answer message // log("*** " & __SCOPE__ & ": INFO: Expected CL-Answer was received. ***"); // v_recvSteps := v_recvSteps + 1; // repeat // } // [v_recvSteps == 1] MME_S6a.receive( // the IUT receives a CL-Answer from previous MIME // mw_mmeUpdateLocationAnswer( // mdw_ULA_TCs( // ?, // mdw_ulaBodyAvps_TC_08( // mw_cancellation( // containing a Cancellation-Type AVP // MME_UPDATE_PROCEDURE // indicating MME_UPDATE_PROCEDURE // ), // mw_errorDiagnostic(?) // containing an Error-Diagnostic AVP // )))) -> value v_result { // Expected CL-Answer message // log("*** " & __SCOPE__ & ": INFO: Expected CL-Answer was received. ***"); // v_recvSteps := v_recvSteps + 1; // repeat; // } // [v_recvSteps == 2] MME_S6a.receive( // the IUT sends a UL-Answer to new MME // mw_mmeUpdateLocationAnswer( // mdw_ULA_TCs( // ?, // mdw_ulaBodyAvps_TC_08( // mw_cancellation( // containing a Cancellation-Type AVP // MME_UPDATE_PROCEDURE // indicating MME_UPDATE_PROCEDURE // ), // mw_errorDiagnostic(?) // containing an Error-Diagnostic AVP // )))) -> value v_result { // Expected CL-Answer message // log("*** " & __SCOPE__ & ": INFO: Expected CL-Answer was received. ***"); // v_recvSteps := v_recvSteps + 1; // repeat; // } [v_recvSteps == 0] MME_S6a.receive( // the IUT sends a CL-Request to previous MME mw_mmeCancelLocationRequest( mdw_CLR_TCs( ?, mdw_clrBodyAvps_TC_08( mw_cancellationType_dummy // containing a Cancellation-Type AVP // indicating MME_UPDATE_PROCEDURE )))) -> value v_result { // Expected CL-Request message log("*** " & __SCOPE__ & ": INFO: Expected CL-Request was received. ***"); v_recvSteps := v_recvSteps + 1; // and, the IUT receives a CL-Answer from previous MME log("*** " & __SCOPE__ & ": INFO: Trigger CL-Answer. ***"); f_triggerClaMessage( md_CLA_TCs( vc_sessionId, md_claBodyAvps_TC_08 ) // End of md_CLA_TCs ); repeat } [v_recvSteps == 1] MME_S6a.receive( // and, the IUT sends a UL-Answer to new MME mw_mmeUpdateLocationAnswer( mdw_ULA_TCs( ?, mdw_ulaBodyAvps_TC_08 ))) -> value v_result { // Expected UL-Answer message f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: Expected UL-Answer was received. ***"); } [] MME_S6a.receive { // Unxpected message f_selfOrClientSyncAndVerdict(c_tbDone, e_error); log("*** " & __SCOPE__ & ": INCONC: Unxpected message received. ***"); Loading @@ -618,9 +604,15 @@ module DiameterS6a_HSS_TCFunctions { } // End of TC function f_TC_HSS_UL_08 /** * @desc Verify that the IUT when UL Request is received over S6a shall send CL Request to the previous old SGSN */ function f_TC_HSS_UL_09() runs on TestAdapter { // Local variables var integer v_recvSteps := 0; // Initial state : await for first CL-Answer message // Final state : the IUT sends a UL-Answer to new MME var DIAMETER_MSG v_result; // Preamble f_preamble_HSS(); Loading @@ -628,9 +620,67 @@ module DiameterS6a_HSS_TCFunctions { log("*** " & __SCOPE__ & ": INFO: Preamblue done. ***"); // Test Body // Clause 'when' // Clause 'when': the IUT receives a UL-Request f_triggerUlrMessage( md_ULR_TCs( vc_sessionId, md_ulrBodyAvps_TC_01( m_auth_Session_State_noStateMaintained, vc_originHost, vc_originRealm, vc_destinationRealm, m_user_Name(PX_USR_NAME), m_rAT_Type(PX_RAT_TYPE), m_ulr_Flags_AVP(PX_ULR_FLAGS_S6a_IND_SET), // containing a ULR-Flags AVP // with Single-Registration-Indication bit set md_visitedPLMNId( PX_OTHER_VISITED_PLMN_ID // from new MME ) ) // End of md_ulrBodyAvps_TC_01 ) // End of md_ULR_TCs ); // Clause 'then' tc_ac.start; alt { [v_recvSteps == 0] MME_S6a.receive( // the IUT sends a CL-Request to previous MME mw_mmeCancelLocationRequest( mdw_CLR_TCs( ?, mdw_clrBodyAvps_TC_08( mw_cancellationType( // containing a Cancellation-Type AVP SGSN_UPDATE_PROCEDURE_E // indicating SGSN_UPDATE_PROCEDURE ))))) -> value v_result { // Expected CL-Request message log("*** " & __SCOPE__ & ": INFO: Expected CL-Request was received. ***"); v_recvSteps := v_recvSteps + 1; // and, the IUT receives a CL-Answer from previous SGSN log("*** " & __SCOPE__ & ": INFO: Trigger CL-Answer. ***"); f_triggerClaMessage( md_CLA_TCs( vc_sessionId, md_claBodyAvps_TC_08 ) // End of md_CLA_TCs ); repeat } [v_recvSteps == 1] MME_S6a.receive( // and, the IUT sends a UL-Answer to new MME mw_mmeUpdateLocationAnswer( mdw_ULA_TCs( ?, mdw_ulaBodyAvps_TC_08 ))) -> value v_result { // Expected UL-Answer message f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: Expected UL-Answer was received. ***"); } [] MME_S6a.receive { // Unxpected message f_selfOrClientSyncAndVerdict(c_tbDone, e_error); log("*** " & __SCOPE__ & ": INCONC: Unxpected message received. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_HSS(); Loading DiameterS6a/ttcn/DiameterS6a_Steps.ttcn3 +10 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,8 @@ type DIAMETER_MSG }; import from LibDiameter_Types_S6a_AVPs { type ULR_MSG type ULR_MSG, CLA_MSG }; // DiameterS6a Loading Loading @@ -167,7 +168,14 @@ MME_S6a.send( DIAMETER_MSG : { uLR_MSG := p_ulrMSG } ); } // End of function f_awaiting_ULR } // End of function f_triggerUlrMessage function f_triggerClaMessage ( template (value) CLA_MSG p_claMSG ) runs on TestAdapter { MME_S6a.send( DIAMETER_MSG : { cLA_MSG := p_claMSG } ); } // End of function f_triggerClaMessage } // End of group SendMessage Loading DiameterS6a/ttcn/DiameterS6a_Templates.ttcn +140 −11 Original line number Diff line number Diff line Loading @@ -1190,7 +1190,7 @@ module DiameterS6a_Templates { /** * @desc Main receive template for MME_S6a port * @param p_s6a_CCA_MSG UL-Answer receive template message * @param p_uLR_MSG UL-Answer receive template message */ template (present) DIAMETER_MSG mw_hssUpdateLocationRequest(in template (present) ULR_MSG p_uLR_MSG) := { uLR_MSG := p_uLR_MSG Loading @@ -1198,12 +1198,28 @@ module DiameterS6a_Templates { /** * @desc Main receive template for MME_S6a port * @param p_s6a_CCA_MSG UL-Answer receive template message * @param p_uLA_MSG UL-Answer receive template message */ template (present) DIAMETER_MSG mw_mmeUpdateLocationAnswer(in template (present) ULA_MSG p_uLA_MSG) := { uLA_MSG := p_uLA_MSG } // End of tempate mw_mmeUpdateLocationAnswer /** * @desc Main receive template for MME_S6a port * @param p_cLR_MSG CL-Request receive template message */ template (present) DIAMETER_MSG mw_mmeCancelLocationRequest(in template (present) CLR_MSG p_cLR_MSG) := { cLR_MSG := p_cLR_MSG } // End of tempate mw_mmeCancelLocationRequest /** * @desc Main receive template for MME_S6a port * @param p_cLA_MSG CL-Answer receive template message */ template (present) DIAMETER_MSG mw_mmeCancelLocationAnswer(in template (present) CLA_MSG p_cLA_MSG) := { cLA_MSG := p_cLA_MSG } // End of tempate mw_mmeCancelLocationAnswer } // End of group S6basic_request_templates_receive group S6aBasic_answer_templates_send { Loading Loading @@ -1234,6 +1250,21 @@ module DiameterS6a_Templates { aVP_Data := p_aVP_Data } // End of tempate mw_ula_Flags_AVP template (value) Cancellation_Type_AVP mw_cancellationType_dummy := { aVP_Header := m_aVP_HeaderVid_Mbit1 ( c_cancellation_Type_AVP_Code, 4, c_vendId3gpp ), cancellation_Type := PX_CANCELLATION_TYPE } // End of template mw_cancellationType_dummy template (value) Cancellation_Type_AVP mw_cancellationType( in template (value) Cancellation_Type_Code p_cancellation_Type ) modifies mw_cancellationType_dummy := { cancellation_Type := p_cancellation_Type } // End of template mw_cancellationType } // End of group S6aBasic_answer_templates_receive } // End of group S6aBase_templates Loading @@ -1255,6 +1286,19 @@ module DiameterS6a_Templates { uLR_Body := p_ulrBody } // End of tempate md_ULR_TCs /** * @desc Receive template for CLA * @param p_sessionId Session identifier * @param p_claBody CLA message body */ template (value) CLA_MSG md_CLA_TCs( in template (value) Session_Id_AVP p_sessionId, in template (value) CLA_Body_AVP p_claBody ) modifies m_S6a_CLA_dummy := { session_Id := p_sessionId, cLA_Body := p_claBody } // End of template md_CLA_TCs /** * @desc Send emplates for TC_HSS_UL_01 */ Loading Loading @@ -1375,7 +1419,7 @@ module DiameterS6a_Templates { } // End of group t_TC_HSS_UL_04 /** * @desc Send templates for TC_HSS_UL_04 * @desc Send templates for TC_HSS_UL_05 */ group t_TC_HSS_UL_05 { Loading @@ -1391,7 +1435,7 @@ module DiameterS6a_Templates { } // End of group t_TC_HSS_UL_05 /** * @desc Send templates for TC_HSS_UL_04 * @desc Send templates for TC_HSS_UL_06 */ group t_TC_HSS_UL_06 { Loading @@ -1411,6 +1455,24 @@ module DiameterS6a_Templates { } // End of group t_TC_HSS_UL_06 /** * @desc Send templates for TC_HSS_UL_08 */ group t_TC_HSS_UL_08 { /** * @desc Send template for CLR message body with specific Cancellation AVPs * @param p_cancellation_Type Expected cancellation type value */ template (value) CLA_Body_AVP md_claBodyAvps_TC_08 modifies m_S6a_CLA_Body_dummy := { origin_Host := valueof(m_originHost(PX_ORIGIN_HOST)), origin_Realm := valueof(m_originRealm(PX_ORIGIN_REALM)) } // End of template md_claBodyAvps_TC_08 } // End of group t_TC_HSS_UL_08 } // End of group S6aModified_request_templates_send group S6aModified_request_templates_receive { Loading Loading @@ -1471,6 +1533,19 @@ module DiameterS6a_Templates { uLA_Body := p_ulaBody } // End of template mdw_ULA_TCs /** * @desc Receive template for CLR * @param p_sessionId Session identifier * @param p_clrBody CLR message body */ template (present) CLR_MSG mdw_CLR_TCs( in template (present) Session_Id_AVP p_sessionId, in template (present) CLR_Body_AVP p_clrBody ) modifies mw_S6a_CLR_dummy := { session_Id := p_sessionId, cLR_Body := p_clrBody } // End of template mdw_CLR_TCs /** * @desc Receive templates for TC_HSS_UL_01 */ Loading Loading @@ -1578,7 +1653,7 @@ module DiameterS6a_Templates { template (present) ULA_Body_AVP mdw_ulaBodyAvps_TC_04( in template (present) Experimental_Result_AVP p_experimental_Result ) := mdw_ulaBodyAvps_TC_03(p_experimental_Result); // End of template mdw_ulrBodyAvps_TC_04 mdw_ulaBodyAvps_TC_03(p_experimental_Result); // End of template mdw_ulaBodyAvps_TC_04 } // End of group t_TC_HSS_UL_04 Loading @@ -1598,10 +1673,64 @@ module DiameterS6a_Templates { in template (present) Error_Diagnostic_AVP p_error_Diagnostic ) modifies mdw_ulaBodyAvps_TC_04 := { error_Diagnostic := p_error_Diagnostic } // End of template mdw_ulrBodyAvps_TC_05 } // End of template mdw_ulaBodyAvps_TC_05 } // End of group t_TC_HSS_UL_05 /** * @desc Receive templates for TC_HSS_UL_06 */ group t_TC_HSS_UL_06 { /** * @desc Receive template for ULA message body with specific Expected Experimantal Result and Error Diagnostic AVPs * @param p_experimental_Result Expected Experimantal Result Code value * @param p_error_Diagnostic Expected error diagnostic value */ template (present) ULA_Body_AVP mdw_ulaBodyAvps_TC_06( in template (present) Experimental_Result_AVP p_experimental_Result, in template (present) Error_Diagnostic_AVP p_error_Diagnostic ) modifies mdw_ulaBodyAvps_TC_04 := mdw_ulaBodyAvps_TC_05(p_experimental_Result, p_error_Diagnostic); // End of template mdw_ulaBodyAvps_TC_06 } // End of group t_TC_HSS_UL_06 /** * @desc Receive templates for TC_HSS_UL_07 */ group t_TC_HSS_UL_07 { /** * @desc Receive template for ULA message body with specific Expected Experimantal Result and Error Diagnostic AVPs * @param p_experimental_Result Expected Experimantal Result Code value * @param p_error_Diagnostic Expected error diagnostic value */ template (present) ULA_Body_AVP mdw_ulaBodyAvps_TC_07( in template (present) Experimental_Result_AVP p_experimental_Result, in template (present) Error_Diagnostic_AVP p_error_Diagnostic ) := mdw_ulaBodyAvps_TC_05(p_experimental_Result, p_error_Diagnostic); // End of template mdw_ulaBodyAvps_TC_07 } // End of group t_TC_HSS_UL_07 /** * @desc Receive templates for TC_HSS_UL_08 */ group t_TC_HSS_UL_08 { /** * @desc Receive template for CLA message body with TODO * @param p_cancellation_Type Cancellation type code value */ template (present) CLR_Body_AVP mdw_clrBodyAvps_TC_08( in template (present) Cancellation_Type_AVP p_cancellation_Type ) modifies mw_S6a_CLR_Body_dummy := { cancellation_Type := p_cancellation_Type } // End of template mdw_clrBodyAvps_TC_08 // FIXME To be continued template (present) ULA_Body_AVP mdw_ulaBodyAvps_TC_08 := mw_S6a_ULA_Body_dummy; // End of template mdw_ulaBodyAvps_TC_08 } // End of group t_TC_HSS_UL_08 } // End of group S6aModified_answer_templates_receive } // End of group S6aModified_templates Loading DiameterS6a/ttcn/DiameterS6a_TestCases.ttcn3 +67 −4 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
DiameterS6a/ttcn/DiameterS6a_HSS_TCFunctions.ttcn3 +101 −51 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ module DiameterS6a_HSS_TCFunctions { import from DiameterS6a_Steps { function f_preamble_HSS, f_postamble_HSS, f_triggerUlrMessage; f_triggerUlrMessage, f_triggerClaMessage; altstep a_hss_default }; import from DiameterS6a_TestSystem { Loading Loading @@ -410,7 +410,7 @@ module DiameterS6a_HSS_TCFunctions { mw_mmeUpdateLocationAnswer( mdw_ULA_TCs( ?, mdw_ulaBodyAvps_TC_05( mdw_ulaBodyAvps_TC_06( mw_experimentalResult( // containing an Experimental-Result AVP mw_experimentalResultCode( // containing an Experimental-Result-Code AVP DIAMETER_ERROR_RAT_NOT_ALLOWED_E // indicating DIAMETER_ERROR_RAT_NOT_ALLOWED Loading Loading @@ -485,7 +485,7 @@ module DiameterS6a_HSS_TCFunctions { mw_mmeUpdateLocationAnswer( mdw_ULA_TCs( ?, mdw_ulaBodyAvps_TC_05( mdw_ulaBodyAvps_TC_07( mw_experimentalResult( // containing an Experimental-Result AVP mw_experimentalResultCode( // containing an Experimental-Result-Code AVP DIAMETER_ERROR_ROAMING_NOT_ALLOWED_E // indicating DIAMETER_ERROR_ROAMING_NOT_ALLOWED Loading Loading @@ -527,8 +527,7 @@ module DiameterS6a_HSS_TCFunctions { // Local variables var integer v_recvSteps := 0; // Initial state : await for first CL-Answer message // Next state : the IUT receives a CL-Answer from previous MIME // Next state : the IUT sends a UL-Answer to new MME // Final state : the IUT sends a UL-Answer to new MME var DIAMETER_MSG v_result; // Preamble Loading @@ -549,58 +548,45 @@ module DiameterS6a_HSS_TCFunctions { m_user_Name(PX_USR_NAME), m_rAT_Type(PX_RAT_TYPE), m_ulr_Flags_AVP(PX_ULR_FLAGS_S6a_IND_SET), md_visitedPLMNId( md_visitedPLMNId( // from new MME PX_OTHER_VISITED_PLMN_ID ) ) // End of md_ulrBodyAvps_TC_01 ) // End of md_ULR_TCs ); // Clause 'then': the IUT sends a CL-Answer to previous MME // Clause 'then': tc_ac.start; alt { // [v_recvSteps == 0] MME_S6a.receive( // mw_mmeUpdateLocationAnswer( // mdw_ULA_TCs( // ?, // mdw_ulaBodyAvps_TC_08( // mw_cancellation( // containing a Cancellation-Type AVP // MME_UPDATE_PROCEDURE // indicating MME_UPDATE_PROCEDURE // ), // mw_errorDiagnostic(?) // containing an Error-Diagnostic AVP // )))) -> value v_result { // Expected CL-Answer message // log("*** " & __SCOPE__ & ": INFO: Expected CL-Answer was received. ***"); // v_recvSteps := v_recvSteps + 1; // repeat // } // [v_recvSteps == 1] MME_S6a.receive( // the IUT receives a CL-Answer from previous MIME // mw_mmeUpdateLocationAnswer( // mdw_ULA_TCs( // ?, // mdw_ulaBodyAvps_TC_08( // mw_cancellation( // containing a Cancellation-Type AVP // MME_UPDATE_PROCEDURE // indicating MME_UPDATE_PROCEDURE // ), // mw_errorDiagnostic(?) // containing an Error-Diagnostic AVP // )))) -> value v_result { // Expected CL-Answer message // log("*** " & __SCOPE__ & ": INFO: Expected CL-Answer was received. ***"); // v_recvSteps := v_recvSteps + 1; // repeat; // } // [v_recvSteps == 2] MME_S6a.receive( // the IUT sends a UL-Answer to new MME // mw_mmeUpdateLocationAnswer( // mdw_ULA_TCs( // ?, // mdw_ulaBodyAvps_TC_08( // mw_cancellation( // containing a Cancellation-Type AVP // MME_UPDATE_PROCEDURE // indicating MME_UPDATE_PROCEDURE // ), // mw_errorDiagnostic(?) // containing an Error-Diagnostic AVP // )))) -> value v_result { // Expected CL-Answer message // log("*** " & __SCOPE__ & ": INFO: Expected CL-Answer was received. ***"); // v_recvSteps := v_recvSteps + 1; // repeat; // } [v_recvSteps == 0] MME_S6a.receive( // the IUT sends a CL-Request to previous MME mw_mmeCancelLocationRequest( mdw_CLR_TCs( ?, mdw_clrBodyAvps_TC_08( mw_cancellationType_dummy // containing a Cancellation-Type AVP // indicating MME_UPDATE_PROCEDURE )))) -> value v_result { // Expected CL-Request message log("*** " & __SCOPE__ & ": INFO: Expected CL-Request was received. ***"); v_recvSteps := v_recvSteps + 1; // and, the IUT receives a CL-Answer from previous MME log("*** " & __SCOPE__ & ": INFO: Trigger CL-Answer. ***"); f_triggerClaMessage( md_CLA_TCs( vc_sessionId, md_claBodyAvps_TC_08 ) // End of md_CLA_TCs ); repeat } [v_recvSteps == 1] MME_S6a.receive( // and, the IUT sends a UL-Answer to new MME mw_mmeUpdateLocationAnswer( mdw_ULA_TCs( ?, mdw_ulaBodyAvps_TC_08 ))) -> value v_result { // Expected UL-Answer message f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: Expected UL-Answer was received. ***"); } [] MME_S6a.receive { // Unxpected message f_selfOrClientSyncAndVerdict(c_tbDone, e_error); log("*** " & __SCOPE__ & ": INCONC: Unxpected message received. ***"); Loading @@ -618,9 +604,15 @@ module DiameterS6a_HSS_TCFunctions { } // End of TC function f_TC_HSS_UL_08 /** * @desc Verify that the IUT when UL Request is received over S6a shall send CL Request to the previous old SGSN */ function f_TC_HSS_UL_09() runs on TestAdapter { // Local variables var integer v_recvSteps := 0; // Initial state : await for first CL-Answer message // Final state : the IUT sends a UL-Answer to new MME var DIAMETER_MSG v_result; // Preamble f_preamble_HSS(); Loading @@ -628,9 +620,67 @@ module DiameterS6a_HSS_TCFunctions { log("*** " & __SCOPE__ & ": INFO: Preamblue done. ***"); // Test Body // Clause 'when' // Clause 'when': the IUT receives a UL-Request f_triggerUlrMessage( md_ULR_TCs( vc_sessionId, md_ulrBodyAvps_TC_01( m_auth_Session_State_noStateMaintained, vc_originHost, vc_originRealm, vc_destinationRealm, m_user_Name(PX_USR_NAME), m_rAT_Type(PX_RAT_TYPE), m_ulr_Flags_AVP(PX_ULR_FLAGS_S6a_IND_SET), // containing a ULR-Flags AVP // with Single-Registration-Indication bit set md_visitedPLMNId( PX_OTHER_VISITED_PLMN_ID // from new MME ) ) // End of md_ulrBodyAvps_TC_01 ) // End of md_ULR_TCs ); // Clause 'then' tc_ac.start; alt { [v_recvSteps == 0] MME_S6a.receive( // the IUT sends a CL-Request to previous MME mw_mmeCancelLocationRequest( mdw_CLR_TCs( ?, mdw_clrBodyAvps_TC_08( mw_cancellationType( // containing a Cancellation-Type AVP SGSN_UPDATE_PROCEDURE_E // indicating SGSN_UPDATE_PROCEDURE ))))) -> value v_result { // Expected CL-Request message log("*** " & __SCOPE__ & ": INFO: Expected CL-Request was received. ***"); v_recvSteps := v_recvSteps + 1; // and, the IUT receives a CL-Answer from previous SGSN log("*** " & __SCOPE__ & ": INFO: Trigger CL-Answer. ***"); f_triggerClaMessage( md_CLA_TCs( vc_sessionId, md_claBodyAvps_TC_08 ) // End of md_CLA_TCs ); repeat } [v_recvSteps == 1] MME_S6a.receive( // and, the IUT sends a UL-Answer to new MME mw_mmeUpdateLocationAnswer( mdw_ULA_TCs( ?, mdw_ulaBodyAvps_TC_08 ))) -> value v_result { // Expected UL-Answer message f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: Expected UL-Answer was received. ***"); } [] MME_S6a.receive { // Unxpected message f_selfOrClientSyncAndVerdict(c_tbDone, e_error); log("*** " & __SCOPE__ & ": INCONC: Unxpected message received. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_HSS(); Loading
DiameterS6a/ttcn/DiameterS6a_Steps.ttcn3 +10 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,8 @@ type DIAMETER_MSG }; import from LibDiameter_Types_S6a_AVPs { type ULR_MSG type ULR_MSG, CLA_MSG }; // DiameterS6a Loading Loading @@ -167,7 +168,14 @@ MME_S6a.send( DIAMETER_MSG : { uLR_MSG := p_ulrMSG } ); } // End of function f_awaiting_ULR } // End of function f_triggerUlrMessage function f_triggerClaMessage ( template (value) CLA_MSG p_claMSG ) runs on TestAdapter { MME_S6a.send( DIAMETER_MSG : { cLA_MSG := p_claMSG } ); } // End of function f_triggerClaMessage } // End of group SendMessage Loading
DiameterS6a/ttcn/DiameterS6a_Templates.ttcn +140 −11 Original line number Diff line number Diff line Loading @@ -1190,7 +1190,7 @@ module DiameterS6a_Templates { /** * @desc Main receive template for MME_S6a port * @param p_s6a_CCA_MSG UL-Answer receive template message * @param p_uLR_MSG UL-Answer receive template message */ template (present) DIAMETER_MSG mw_hssUpdateLocationRequest(in template (present) ULR_MSG p_uLR_MSG) := { uLR_MSG := p_uLR_MSG Loading @@ -1198,12 +1198,28 @@ module DiameterS6a_Templates { /** * @desc Main receive template for MME_S6a port * @param p_s6a_CCA_MSG UL-Answer receive template message * @param p_uLA_MSG UL-Answer receive template message */ template (present) DIAMETER_MSG mw_mmeUpdateLocationAnswer(in template (present) ULA_MSG p_uLA_MSG) := { uLA_MSG := p_uLA_MSG } // End of tempate mw_mmeUpdateLocationAnswer /** * @desc Main receive template for MME_S6a port * @param p_cLR_MSG CL-Request receive template message */ template (present) DIAMETER_MSG mw_mmeCancelLocationRequest(in template (present) CLR_MSG p_cLR_MSG) := { cLR_MSG := p_cLR_MSG } // End of tempate mw_mmeCancelLocationRequest /** * @desc Main receive template for MME_S6a port * @param p_cLA_MSG CL-Answer receive template message */ template (present) DIAMETER_MSG mw_mmeCancelLocationAnswer(in template (present) CLA_MSG p_cLA_MSG) := { cLA_MSG := p_cLA_MSG } // End of tempate mw_mmeCancelLocationAnswer } // End of group S6basic_request_templates_receive group S6aBasic_answer_templates_send { Loading Loading @@ -1234,6 +1250,21 @@ module DiameterS6a_Templates { aVP_Data := p_aVP_Data } // End of tempate mw_ula_Flags_AVP template (value) Cancellation_Type_AVP mw_cancellationType_dummy := { aVP_Header := m_aVP_HeaderVid_Mbit1 ( c_cancellation_Type_AVP_Code, 4, c_vendId3gpp ), cancellation_Type := PX_CANCELLATION_TYPE } // End of template mw_cancellationType_dummy template (value) Cancellation_Type_AVP mw_cancellationType( in template (value) Cancellation_Type_Code p_cancellation_Type ) modifies mw_cancellationType_dummy := { cancellation_Type := p_cancellation_Type } // End of template mw_cancellationType } // End of group S6aBasic_answer_templates_receive } // End of group S6aBase_templates Loading @@ -1255,6 +1286,19 @@ module DiameterS6a_Templates { uLR_Body := p_ulrBody } // End of tempate md_ULR_TCs /** * @desc Receive template for CLA * @param p_sessionId Session identifier * @param p_claBody CLA message body */ template (value) CLA_MSG md_CLA_TCs( in template (value) Session_Id_AVP p_sessionId, in template (value) CLA_Body_AVP p_claBody ) modifies m_S6a_CLA_dummy := { session_Id := p_sessionId, cLA_Body := p_claBody } // End of template md_CLA_TCs /** * @desc Send emplates for TC_HSS_UL_01 */ Loading Loading @@ -1375,7 +1419,7 @@ module DiameterS6a_Templates { } // End of group t_TC_HSS_UL_04 /** * @desc Send templates for TC_HSS_UL_04 * @desc Send templates for TC_HSS_UL_05 */ group t_TC_HSS_UL_05 { Loading @@ -1391,7 +1435,7 @@ module DiameterS6a_Templates { } // End of group t_TC_HSS_UL_05 /** * @desc Send templates for TC_HSS_UL_04 * @desc Send templates for TC_HSS_UL_06 */ group t_TC_HSS_UL_06 { Loading @@ -1411,6 +1455,24 @@ module DiameterS6a_Templates { } // End of group t_TC_HSS_UL_06 /** * @desc Send templates for TC_HSS_UL_08 */ group t_TC_HSS_UL_08 { /** * @desc Send template for CLR message body with specific Cancellation AVPs * @param p_cancellation_Type Expected cancellation type value */ template (value) CLA_Body_AVP md_claBodyAvps_TC_08 modifies m_S6a_CLA_Body_dummy := { origin_Host := valueof(m_originHost(PX_ORIGIN_HOST)), origin_Realm := valueof(m_originRealm(PX_ORIGIN_REALM)) } // End of template md_claBodyAvps_TC_08 } // End of group t_TC_HSS_UL_08 } // End of group S6aModified_request_templates_send group S6aModified_request_templates_receive { Loading Loading @@ -1471,6 +1533,19 @@ module DiameterS6a_Templates { uLA_Body := p_ulaBody } // End of template mdw_ULA_TCs /** * @desc Receive template for CLR * @param p_sessionId Session identifier * @param p_clrBody CLR message body */ template (present) CLR_MSG mdw_CLR_TCs( in template (present) Session_Id_AVP p_sessionId, in template (present) CLR_Body_AVP p_clrBody ) modifies mw_S6a_CLR_dummy := { session_Id := p_sessionId, cLR_Body := p_clrBody } // End of template mdw_CLR_TCs /** * @desc Receive templates for TC_HSS_UL_01 */ Loading Loading @@ -1578,7 +1653,7 @@ module DiameterS6a_Templates { template (present) ULA_Body_AVP mdw_ulaBodyAvps_TC_04( in template (present) Experimental_Result_AVP p_experimental_Result ) := mdw_ulaBodyAvps_TC_03(p_experimental_Result); // End of template mdw_ulrBodyAvps_TC_04 mdw_ulaBodyAvps_TC_03(p_experimental_Result); // End of template mdw_ulaBodyAvps_TC_04 } // End of group t_TC_HSS_UL_04 Loading @@ -1598,10 +1673,64 @@ module DiameterS6a_Templates { in template (present) Error_Diagnostic_AVP p_error_Diagnostic ) modifies mdw_ulaBodyAvps_TC_04 := { error_Diagnostic := p_error_Diagnostic } // End of template mdw_ulrBodyAvps_TC_05 } // End of template mdw_ulaBodyAvps_TC_05 } // End of group t_TC_HSS_UL_05 /** * @desc Receive templates for TC_HSS_UL_06 */ group t_TC_HSS_UL_06 { /** * @desc Receive template for ULA message body with specific Expected Experimantal Result and Error Diagnostic AVPs * @param p_experimental_Result Expected Experimantal Result Code value * @param p_error_Diagnostic Expected error diagnostic value */ template (present) ULA_Body_AVP mdw_ulaBodyAvps_TC_06( in template (present) Experimental_Result_AVP p_experimental_Result, in template (present) Error_Diagnostic_AVP p_error_Diagnostic ) modifies mdw_ulaBodyAvps_TC_04 := mdw_ulaBodyAvps_TC_05(p_experimental_Result, p_error_Diagnostic); // End of template mdw_ulaBodyAvps_TC_06 } // End of group t_TC_HSS_UL_06 /** * @desc Receive templates for TC_HSS_UL_07 */ group t_TC_HSS_UL_07 { /** * @desc Receive template for ULA message body with specific Expected Experimantal Result and Error Diagnostic AVPs * @param p_experimental_Result Expected Experimantal Result Code value * @param p_error_Diagnostic Expected error diagnostic value */ template (present) ULA_Body_AVP mdw_ulaBodyAvps_TC_07( in template (present) Experimental_Result_AVP p_experimental_Result, in template (present) Error_Diagnostic_AVP p_error_Diagnostic ) := mdw_ulaBodyAvps_TC_05(p_experimental_Result, p_error_Diagnostic); // End of template mdw_ulaBodyAvps_TC_07 } // End of group t_TC_HSS_UL_07 /** * @desc Receive templates for TC_HSS_UL_08 */ group t_TC_HSS_UL_08 { /** * @desc Receive template for CLA message body with TODO * @param p_cancellation_Type Cancellation type code value */ template (present) CLR_Body_AVP mdw_clrBodyAvps_TC_08( in template (present) Cancellation_Type_AVP p_cancellation_Type ) modifies mw_S6a_CLR_Body_dummy := { cancellation_Type := p_cancellation_Type } // End of template mdw_clrBodyAvps_TC_08 // FIXME To be continued template (present) ULA_Body_AVP mdw_ulaBodyAvps_TC_08 := mw_S6a_ULA_Body_dummy; // End of template mdw_ulaBodyAvps_TC_08 } // End of group t_TC_HSS_UL_08 } // End of group S6aModified_answer_templates_receive } // End of group S6aModified_templates Loading
DiameterS6a/ttcn/DiameterS6a_TestCases.ttcn3 +67 −4 File changed.Preview size limit exceeded, changes collapsed. Show changes