diff --git a/ttcn/DiameterShDh_TCFunctions.ttcn3 b/ttcn/DiameterShDh_TCFunctions.ttcn3 index a4f9056ea277de4e56bec6a129d5d68a3a67b587..3fe161b74cab70d50ea523a07ead8be7652b538a 100644 --- a/ttcn/DiameterShDh_TCFunctions.ttcn3 +++ b/ttcn/DiameterShDh_TCFunctions.ttcn3 @@ -2482,10 +2482,31 @@ module DiameterShDh_TCFunctions { f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); - //TODO TestBody + f_awaiting_SNR( + mdw_sNR( + ?, // containing a Session-ID AVP + mdw_snrBodyAvps( + ?, + ?, + vc_originHost_IUT, // containing an Origin-Host AVP + vc_originRealm_IUT, // containing an Origin-Realm AVP + vc_destinationRealm_IUT , + ?, + ?, + ? + ))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); + f_send_SNA( + md_sNA( + vc_sessionId, // Set in f_awaiting_PUR + md_snaBodyAvps( + m_resultCode(DIAMETER_SUCCESS_E), + vc_originHost, + vc_originRealm + ))); + f_postamble_Sh_HSS(); f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); @@ -2588,7 +2609,7 @@ module DiameterShDh_TCFunctions { //TestBody f_send_PUR( - md_pUR( + md_pUR( vc_sessionId, md_purBodyAvps( m_auth_Session_State, @@ -2640,7 +2661,32 @@ module DiameterShDh_TCFunctions { f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); - //TODO TestBody + //TestBody + f_send_SNR( + md_sNR( + vc_sessionId, + md_snrBodyAvps( + vc_originHost, // containing an Origin-Host AVP + vc_originRealm, // containing an Origin-Realm AVP + vc_destinationRealm, // containing a Destination-Realm AVP + m_specific_user_Identity ( + m_public_user_identity(PX_PublicUserIdentity) + ), + -, + -, + m_userName(PX_Private_Identity) + ) + )); + + f_awaiting_SNA( + mdw_sNA( + ?, // containing a Session-ID AVP + mdw_snaBodyAvps_redirect_Host( + mw_redirect_host(PX_HSS_IDENTITY), + mw_resultCode(DIAMETER_REDIRECT_INDICATION_E) + ))); + + f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); @@ -2846,8 +2892,35 @@ module DiameterShDh_TCFunctions { f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); - //TODO TestBody + f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict()); + + f_awaiting_SNR( + mdw_sNR( + ?, // containing a Session-ID AVP + mdw_snrBodyAvps( + ?, + ?, + vc_originHost_IUT, // containing an Origin-Host AVP + vc_originRealm_IUT, // containing an Origin-Realm AVP + vc_destinationRealm_IUT , + ?, + ?, + ? + ))); + + f_send_SNA( + md_sNA( + vc_sessionId, + md_snaBodyAvps_redirect( + m_resultCode(DIAMETER_REDIRECT_INDICATION_E ), + vc_originHost, + vc_originRealm, + m_redirect_host( // containing a Redirect-Host AVP + PX_HSS_IDENTITY// indicating the HSS identity to be used + ) + ))); + f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); f_postamble_Dh_SLF(); diff --git a/ttcn/DiameterShDh_Templates.ttcn3 b/ttcn/DiameterShDh_Templates.ttcn3 index 5d5de6467f3caddc413cbfe492046021a054b55f..694b14a930097de6ac3868e4453e5c5c93f72d39 100644 --- a/ttcn/DiameterShDh_Templates.ttcn3 +++ b/ttcn/DiameterShDh_Templates.ttcn3 @@ -830,7 +830,21 @@ module DiameterShDh_Templates { origin_Host := p_originHost, origin_Realm := p_originRealm } // End of template md_snaBodyAvps - + + template (omit) SNA_Body_AVP md_snaBodyAvps_redirect( + in template (value) Result_Code_AVP p_resultCode, + in template (value) Origin_Host_AVP p_originHost, + in template (value) Origin_Realm_AVP p_originRealm, + in template (value) Redirect_Host_AVP p_redirect_host + ) modifies m_SNA_Body_dummy := { + vendor_Specific_Application_Id := m_vendor_Specific_Appl_Id_dummy,//required only in TS129 229 + auth_Session_State := m_auth_Session_State_dummy, + result_Code := p_resultCode, + origin_Host := p_originHost, + origin_Realm := p_originRealm, + redirect_Host := p_redirect_host + } // End of template md_puaBodyAvps + } // End of group sna_msg } // End of group Sh_answer_message_templates_send @@ -1048,6 +1062,14 @@ module DiameterShDh_Templates { experimental_Result := p_experimentalResult } // End of template mdw_snaBodyAvps_experimental_result + template (present) SNA_Body_AVP mdw_snaBodyAvps_redirect_Host( + template Redirect_Host_AVP p_redirect_Host, + template Result_Code_AVP p_resultCode + ) modifies mw_SNA_Body_dummy := { + result_Code := p_resultCode, + redirect_Host := p_redirect_Host + } // End of template mdw_snaBodyAvps_experimental_result + } // End of group sna_msg } // End of group Sh_answer_message_templates_receive diff --git a/ttcn/DiameterShDh_TestCases.ttcn3 b/ttcn/DiameterShDh_TestCases.ttcn3 index 5fa0a21089840f2b246d80bd434a286d337d08d6..328e740de79b9b03c87a7811bc48bfe2f52a42b4 100644 --- a/ttcn/DiameterShDh_TestCases.ttcn3 +++ b/ttcn/DiameterShDh_TestCases.ttcn3 @@ -3539,6 +3539,57 @@ module DiameterShDh_TestCases { } // End of group TP_ASRole_UserData group TP_ASRole_SubscriptionNotification{ + + /** + * @desc Verify that the IUT sends a SN-Request to subscribe to Notification. + *
+                 * Pics Selection: PICS_AS_AND_OSA_SCS_Role
+                 * Initial conditions: 
+                 *     with {
+                 *        
+                 *     }
+                 * Expected behaviour:
+                 *     Ensure that the IUT
+                 *         to indicate to subscribe to Notification
+                 *         sends an SN-Request
+                 *             containing a Session-ID AVP
+                 *             containing a Vendor-Specific-Application-Id AVP
+                 *             containing an Auth-Session-State AVP
+                 *             containing an Origin-Host AVP
+                 *             containing an Origin-Realm AVP
+                 *             containing a Destination-Realm AVP
+                 *             containing a User-Identity AVP
+                 *             containing a Subs-Req-Type AVP
+                 *             containing a Data-Reference AVP.
+
+                 * 
+ * + * @version 0.0.7 + * @see ETSI TS 103 571-2 TP_SH_AS_SN_01 + */ + testcase TP_SH_AS_SN_01() runs on DiameterShDh system TestAdapter { + // Local variables + var DiameterShDh v_diameterSh_as; + + // Test control + if (not PICS_AS_IUT) { + log("*** " & __SCOPE__ & ": ERROR: 'PICS_HSS_IUT' required for executing the TC. ***"); + stop; + } + + // Test component configuration + f_cf_1Sh_asUp(v_diameterSh_as); + + // Start + v_diameterSh_as.start(f_TC_SH_AS_SN_01()); + + // synchronize PTC on 1 sychronization points + f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone}); + + f_cf_1Sh_asDown(v_diameterSh_as); + + } // End of testcase TP_SH_AS_SN_01 + } // End of group TP_ASRole_SubscriptionNotification group TP_ASRole_PushNotification{ @@ -3690,6 +3741,68 @@ module DiameterShDh_TestCases { } // End of group TP_SLFRole_ProfileUpdate group TP_SLFRole_SubscriptionNotification{ + + /** + * @desc Verify that the IUT processes an SN-Request and sends the corresponding SN-Answer. + *
+                 * Pics Selection: PICS_SLF_Role
+                 * Initial conditions: 
+                 *     with {
+                 *        
+                 *     }
+                 * Expected behaviour:
+                 *     Ensure that the IUT
+	             *        on receipt of a SN-Request
+		         *           containing a Session-ID AVP
+		         *           containing a Vendor-Specific-Application-Id AVP
+		         *           containing an Auth-Session-State AVP
+		         *           containing an Origin-Host AVP
+		         *           containing an Origin-Realm AVP
+	 	         *           containing a Destination-Realm AVP
+		         *           containing a User-Identity AVP
+		         *           containing a Subs-Req-Type AVP
+		         *           containing a Data-Reference AVP
+	             *        sends a SN-Answer
+		         *           containing a Session-ID AVP
+		         *           containing a Vendor-Specific-Application-Id AVP
+		         *           containing an Auth-Session-State AVP
+		         *           containing an Origin-Host AVP
+		         *           containing an Origin-Realm AVP
+		         *           containing an Redirect-Host AVP
+			     *              indicating the HSS identity to be used
+		         *           not containing an Experimental-Result AVP
+		         *           containing a Result-Code AVP
+			     *              indicating DIAMETER_REDIRECT_INDICATION (3006).
+
+                 * 
+ * + * @version 0.0.7 + * @see ETSI TS 103 571-2 TP_DH_SLF_SN_01 + */ + testcase TP_DH_SLF_SN_01() runs on DiameterShDh system TestAdapter { + // Local variables + var DiameterShDh v_diameterSh_as; + + // Test control + if (not PICS_AS_IUT) { + log("*** " & __SCOPE__ & ": ERROR: 'PICS_HSS_IUT' required for executing the TC. ***"); + stop; + } + + // Test component configuration + f_cf_1Sh_asUp(v_diameterSh_as); + + // Start + v_diameterSh_as.start(f_TC_DH_SLF_SN_01()); + + // synchronize PTC on 1 sychronization points + f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone}); + + f_cf_1Sh_asDown(v_diameterSh_as); + + } // End of testcase TP_DH_SLF_SN_01 + + } // End of group TP_SLFRole_SubscriptionNotification } // End of group TP_SLF_Role @@ -3828,6 +3941,58 @@ module DiameterShDh_TestCases { } // End of group TP_ASRole_ProfileUpdate group TP_ASRole_SubscriptionNotification{ + /** + * @desc Verify that the IUT for user data update procedure sends an SN-Request to the SLF and after reception + * of an SN-Answer forwards the SN-Request to the HSS. + *
+                * Pics Selection: PICS_AS_AND_OSA__SCS_Role
+                * Initial conditions: 
+                *     with {
+                *        
+                *     }
+                * Expected behaviour:
+                *    Ensure that the IUT
+	            *        to indicate a subscription to notification procedure
+	            *        sends a SN-Request to the SLF
+	            *        on receipt of a SN-Answer from the SLF
+		        *           containing a Redirect-Host AVP
+			    *               indicating the HSS identity to be used
+		        *           not containing an Experimental-Result AVP
+		        *           containing a Result-Code AVP
+			    *               indicating DIAMETER_REDIRECT_INDICATION (3006)
+	            *        sends a SN-Request to the HSS
+		        *           containing a Destination-Host AVP
+		        *           containing a Destination-Realm AVP.
+
+
+                * 
+ * + * @version 0.0.7 + * @see ETSI TS 103 571-2 TP_DH_AS_SN_01 + */ + testcase TP_DH_AS_SN_01() runs on DiameterShDh system TestAdapter { + // Local variables + var DiameterShDh v_diameterSh_as; + + // Test control + if (not PICS_AS_IUT) { + log("*** " & __SCOPE__ & ": ERROR: 'PICS_HSS_IUT' required for executing the TC. ***"); + stop; + } + + // Test component configuration + f_cf_1Sh_asUp(v_diameterSh_as); + + // Start + v_diameterSh_as.start(f_TC_DH_AS_SN_01()); + + // synchronize PTC on 1 sychronization points + f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone}); + + f_cf_1Sh_asDown(v_diameterSh_as); + + } // End of testcase TP_DH_AS_SN_01 + } // End of group TP_ASRole_SubscriptionNotification } // End of group TP_AS_OSARole