From 626ff5a15156e51f7c0d99ef40f0ba51247f4df8 Mon Sep 17 00:00:00 2001 From: Steven Ulrich Date: Thu, 21 Feb 2019 10:46:21 +0100 Subject: [PATCH 1/4] added TC TP_SH_AS_SN_01 --- ttcn/DiameterShDh_TestCases.ttcn3 | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/ttcn/DiameterShDh_TestCases.ttcn3 b/ttcn/DiameterShDh_TestCases.ttcn3 index 5fa0a21..1dba746 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_HSS_IUT
+                 * 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_TP_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{ -- GitLab From 5170a3d3772868230a361010dbd8ecc72ac49f01 Mon Sep 17 00:00:00 2001 From: Steven Ulrich Date: Thu, 21 Feb 2019 11:41:19 +0100 Subject: [PATCH 2/4] added TC TP_DH_AS_SN_01 --- ttcn/DiameterShDh_TestCases.ttcn3 | 120 +++++++++++++++++++++++++++++- 1 file changed, 117 insertions(+), 3 deletions(-) diff --git a/ttcn/DiameterShDh_TestCases.ttcn3 b/ttcn/DiameterShDh_TestCases.ttcn3 index 1dba746..328e740 100644 --- a/ttcn/DiameterShDh_TestCases.ttcn3 +++ b/ttcn/DiameterShDh_TestCases.ttcn3 @@ -3543,7 +3543,7 @@ module DiameterShDh_TestCases { /** * @desc Verify that the IUT sends a SN-Request to subscribe to Notification. *
-                 * Pics Selection: PICS_HSS_IUT
+                 * Pics Selection: PICS_AS_AND_OSA_SCS_Role
                  * Initial conditions: 
                  *     with {
                  *        
@@ -3580,8 +3580,8 @@ module DiameterShDh_TestCases {
                     // Test component configuration
                     f_cf_1Sh_asUp(v_diameterSh_as);
         
-                    // Start
-                    v_diameterSh_as.start(f_TP_SH_AS_SN_01()); 
+                    // 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});
@@ -3741,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 @@ -3879,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 -- GitLab From a01aad1623cf1581f7e476e1d7f1900d2413b0a8 Mon Sep 17 00:00:00 2001 From: Steven Ulrich Date: Thu, 21 Feb 2019 11:56:52 +0100 Subject: [PATCH 3/4] Implementation of TC C_SH_AS_SN_01 finalized --- ttcn/DiameterShDh_TCFunctions.ttcn3 | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ttcn/DiameterShDh_TCFunctions.ttcn3 b/ttcn/DiameterShDh_TCFunctions.ttcn3 index a4f9056..0a1a9cb 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 , // indicating RepositoryData (0) + ?, + ?, + ? + ))); 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. ***"); -- GitLab From d65d120fea7174a374533d2f6d6595e5254166d4 Mon Sep 17 00:00:00 2001 From: Steven Ulrich Date: Thu, 21 Feb 2019 13:54:53 +0100 Subject: [PATCH 4/4] Implementation of TC TC_DH_AS_SN_01 and TC_DH_SLF_SN_01 finalized --- ttcn/DiameterShDh_TCFunctions.ttcn3 | 60 +++++++++++++++++++++++++++-- ttcn/DiameterShDh_Templates.ttcn3 | 24 +++++++++++- 2 files changed, 79 insertions(+), 5 deletions(-) diff --git a/ttcn/DiameterShDh_TCFunctions.ttcn3 b/ttcn/DiameterShDh_TCFunctions.ttcn3 index 0a1a9cb..3fe161b 100644 --- a/ttcn/DiameterShDh_TCFunctions.ttcn3 +++ b/ttcn/DiameterShDh_TCFunctions.ttcn3 @@ -2490,7 +2490,7 @@ module DiameterShDh_TCFunctions { ?, vc_originHost_IUT, // containing an Origin-Host AVP vc_originRealm_IUT, // containing an Origin-Realm AVP - vc_destinationRealm_IUT , // indicating RepositoryData (0) + vc_destinationRealm_IUT , ?, ?, ? @@ -2609,7 +2609,7 @@ module DiameterShDh_TCFunctions { //TestBody f_send_PUR( - md_pUR( + md_pUR( vc_sessionId, md_purBodyAvps( m_auth_Session_State, @@ -2661,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()); @@ -2867,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 5d5de64..694b14a 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 -- GitLab