Commit 53442fb0 authored by rennoch's avatar rennoch
Browse files

Gx/PCEF tests:

- MSI06-08 moved to IPS_03-05
- new ST_01/02
parent 0eca6a47
Loading
Loading
Loading
Loading
+190 −14
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ module DiameterGx_Gx_TCFunctions {
	import from DiameterGx_PIXITS all;
	import from DiameterGx_Templates all;
	import from DiameterGx_Steps all;
	//DiameterRx
	import from DiameterRx_Templates all;
    // GPRS tunneling protocol 
    import from LibGtp_TypesAndValues all;
    import from LibGtp_Templates all;
@@ -308,7 +310,7 @@ module DiameterGx_Gx_TCFunctions {
                
                //session modification
				f_send_CCR(m_CCR_UpdateRequest_Invalid(vc_sessionId, vc_originHost, vc_originRealm, vc_destinationRealm));
                f_awaiting_CCA(mw_CCA_ExperimentalResult(vc_sessionId, vc_originHost, vc_originRealm, mw_experimentalResult(DIAMETER_ERROR_TRAFFIC_MAPPING_INFO_REJECTED_E)));
                f_awaiting_CCA(mw_CCA_ExperimentalResult(vc_sessionId, vc_originHost, vc_originRealm, mw_experimentalResult(mw_expResultCode(DIAMETER_ERROR_TRAFFIC_MAPPING_INFO_REJECTED_E))));
		
                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); //     sync
                
@@ -331,7 +333,7 @@ module DiameterGx_Gx_TCFunctions {
				
				//establishement of the session
                f_send_CCR(m_CCR_InitialRequest_Invalid(vc_sessionId, vc_originHost, vc_originRealm, vc_destinationRealm, f_framedIpAddress4_send(),f_framedIpAddress6_send()));
                f_awaiting_CCA(mw_CCA_ExperimentalResult(vc_sessionId, vc_originHost, vc_originRealm, mw_experimentalResult(DIAMETER_ERROR_TRAFFIC_MAPPING_INFO_REJECTED_E)));
                f_awaiting_CCA(mw_CCA_ExperimentalResult(vc_sessionId, vc_originHost, vc_originRealm, mw_experimentalResult(mw_expResultCode(DIAMETER_ERROR_TRAFFIC_MAPPING_INFO_REJECTED_E))));
		
                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); //     sync
                
@@ -1095,7 +1097,100 @@ module DiameterGx_Gx_TCFunctions {

            } // end function f_TC_PCEF_IPS_02
            
            /*
            *  @desc	This is the test case function TC_PCEF_IPS_03
            *  @param	
            */
            function f_TC_PCEF_IPS_03()
            runs on DiameterComponent {

               f_preamble_PCRF();
                
               f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
                
               f_awaiting_CCR(mw_CCR_Request(vc_sessionId, 
                									vc_originHost, 
                									vc_originRealm, 
                									vc_destinationRealm,
                									mw_cC_Request_Type(INITIAL_REQUEST_E),
                									*, *, *));

                f_send_CCA(m_CCA_Result(vc_sessionId, vc_originHost, vc_originRealm, 
                	m_experimentalResult(m_vendorId_dummy,m_expResultCode(DIAMETER_ERROR_INITIAL_PARAMETERS_E))));

				//note: verdict depends on oberservation of IP-CAN traffic (cp. v_gtpComponent_2 test component)

                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); //     sync
    
                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

                f_postamble_PCRF();

            } // end function TC_PCEF_IPS_03            

            
            /*
            *  @desc	This is the test case function TC_PCEF_IPS_04
            *  @param	
            */
            function f_TC_PCEF_IPS_04()
            runs on DiameterComponent {

               f_preamble_PCRF();
                
               f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
                
               f_awaiting_CCR(mw_CCR_Request(vc_sessionId, 
                									vc_originHost, 
                									vc_originRealm, 
                									vc_destinationRealm,
                									mw_cC_Request_Type(INITIAL_REQUEST_E),
                									*, *, *));

                f_send_CCA(m_CCA_Result(vc_sessionId, vc_originHost, vc_originRealm, 
                	m_experimentalResult(m_vendorId_dummy,m_expResultCode(DIAMETER_ERROR_CONFLICTING_REQUEST_E))));

				//note: verdict depends on oberservation of IP-CAN traffic (cp. v_gtpComponent_2 test component)

                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); //     sync
    
                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

                f_postamble_PCRF();

            } // end function TC_PCEF_IPS_04  
            
                        
            /*
            *  @desc	This is the test case function TC_PCEF_IPS_05
            *  @param	
            */
            function f_TC_PCEF_IPS_05()
            runs on DiameterComponent {

               f_preamble_PCRF();
                
               f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
                
               f_awaiting_CCR(mw_CCR_Request(vc_sessionId, 
                									vc_originHost, 
                									vc_originRealm, 
                									vc_destinationRealm,
                									mw_cC_Request_Type(INITIAL_REQUEST_E),
                									*, *, *));

                f_send_CCA(m_CCA_Result(vc_sessionId, vc_originHost, vc_originRealm, 
                	m_experimentalResult(m_vendorId_dummy,m_expResultCode(DIAMETER_ERROR_TRAFFIC_MAPPING_INFO_REJECTED_E))));

				//note: verdict depends on oberservation of IP-CAN traffic (cp. v_gtpComponent_2 test component)

                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); //     sync
    
                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

                f_postamble_PCRF();

            } // end function TC_PCEF_IPS_05  
            
        }//end group TP_PCEFRole_IPS
        
@@ -1305,17 +1400,61 @@ module DiameterGx_Gx_TCFunctions {

            } // end function f_TC_PCEF_MSI_05

            
        }//end group  TP_PCEFRole_MSI
        
        group TP_PCEFRole_INV {	//Invalid Behaviour 
        }//end group TP_PCEFRole_INV
        group TP_PCEFRole_ST {	//Session Termination
        
            /*
            *  @desc	This is the test case function TC_PCEF_MSI_06
            *  @desc	This is the test case function TC_PCEF_ST_01
            *  @param	
            */
            function f_TC_PCEF_MSI_06()
            function f_TC_PCEF_ST_01()
            runs on DiameterComponent {

               f_preamble_PCRF();
                
               f_awaiting_CCR(mw_CCR_Request(vc_sessionId, 
                									vc_originHost, 
                									vc_originRealm, 
                									vc_destinationRealm,
                									mw_cC_Request_Type(INITIAL_REQUEST_E),
                									*, *, *));

                f_send_CCA(m_CCA_basic(vc_sessionId, vc_originHost, vc_originRealm));
                
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
                
                action("Trigger for Session Termination");

                f_awaiting_CCR(mw_CCR_basic(vc_sessionId, 
                									vc_originHost, 
                									vc_originRealm, 
                									vc_destinationRealm,
                									mw_cC_Request_Type(TERMINATION_REQUEST_E)
                									));

                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); //     sync

                f_send_CCA(m_CCA_basic(vc_sessionId, vc_originHost, vc_originRealm));
    
                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

                f_postamble_PCRF();

            } // end function f_TC_PCEF_ST_01
            
                        /*
            *  @desc	This is the test case function TC_PCEF_ST_02
            *  @param	
            */
            function f_TC_PCEF_ST_02()
            runs on DiameterComponent {

               f_preamble_PCRF();
                
               f_awaiting_CCR(mw_CCR_Request(vc_sessionId, 
                									vc_originHost, 
                									vc_originRealm, 
@@ -1323,24 +1462,37 @@ module DiameterGx_Gx_TCFunctions {
                									mw_cC_Request_Type(INITIAL_REQUEST_E),
                									*, *, *));

                f_send_CCA(m_CCA_Result(vc_sessionId, vc_originHost, vc_originRealm, 
                	m_experimentalResult(m_vendorId_dummy,m_expResultCode(DIAMETER_ERROR_INITIAL_PARAMETERS_E))));
                f_send_CCA(m_CCA_basic(vc_sessionId, vc_originHost, vc_originRealm));
                
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
                
				f_send_RAR(m_RAR_SessionRelease
						   (vc_sessionId, vc_originHost, vc_originRealm,
							vc_destinationRealm, vc_destinationHost,
							m_sessReleaseCause
							(UNSPECIFIED_REASON_E)));
                    
				//note: verdict need to be set due to oberservation of IP-CAN traffic (e.g. other test component)
                f_awaiting_RAA(mw_RAA_dummy); 

                f_awaiting_CCR(mw_CCR_basic(vc_sessionId, 
                									vc_originHost, 
                									vc_originRealm, 
                									vc_destinationRealm,
                									mw_cC_Request_Type(TERMINATION_REQUEST_E)
                									));

                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); //     sync

                f_send_CCA(m_CCA_basic(vc_sessionId, vc_originHost, vc_originRealm));
    
                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

                f_postamble_PCRF();

            } // end function f_TC_PCEF_MSI_06
            } // end function f_TC_PCEF_ST_02
        
        
        }//end group  TP_PCEFRole_MSI
        
        group TP_PCEFRole_INV {	//Invalid Behaviour 
        }//end group TP_PCEFRole_INV
        group TP_PCEFRole_ST {	//Session Termination
        }//end group  TP_PCEFRole_ST
        group TP_PCEFRole_PCC {	//PCC rules
        }//end group TP_PCEFRole_PCC
@@ -1399,6 +1551,30 @@ module DiameterGx_Gx_TCFunctions {

        } // end function f_TC_GTP_02
        
        /*
        *  @desc	This is the test case function for GTP component 2 to determine that PCEF blocks traffic for rejected session
        *  			
        *  @param	
        */
        function f_TC_GTP_02_neg()
        runs on GtpComponent {
                            
            activate(a_echoResponse());

            f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

            f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); //     sync

            tc_wait.start;
            alt{
            	[] GTP.receive (m_gtp_v1_dummy) {setverdict(fail);}
            	[] tc_wait.timeout {setverdict(pass);}
            };
    
            f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

        } // end function f_TC_GTP_02_neg
            
   }    
    
	
+9 −14
Original line number Diff line number Diff line
@@ -553,6 +553,13 @@ module DiameterGx_Templates {
                aVP_Data := p_avpData
            }
                                                    
            template Session_Release_Cause_AVP m_sessReleaseCause(template (present) Session_Release_Cause p_avpData) :=
            {
                aVP_Header := m_aVP_HeaderVid(c_vendIdSession_Release_Cause_AVP, 4, omit),
                aVP_Data := p_avpData
            }         
                           
            
     	  }//end group sendingTemplatesForAVPs
     	  group awaitingTemplatesForAVPs{
    
@@ -629,18 +636,6 @@ module DiameterGx_Templates {
                aVP_Type := *
            }      
                
            template Experimental_Result_AVP mw_experimentalResult(Experimental_Result_Type p_avpData) :=
            {
                aVP_Header := mw_aVP_Header_any,
                vendor_Id := ?,
                experimental_Result_Code := mw_expResultCode(p_avpData)
            }
                
            template Experimental_Result_Code_AVP mw_expResultCode(Experimental_Result_Type p_avpData) :=
            {
                aVP_Header := mw_aVP_Header_any,
                aVP_Data := p_avpData
            }
                
            template Session_Release_Cause_AVP mw_sessReleaseCause(template (present) Session_Release_Cause p_avpData) :=
            {
+194 −0
Original line number Diff line number Diff line
@@ -800,6 +800,89 @@ module DiameterGx_TestCases
		
            } // end TC_PCEF_IPS_02
            	
            /*
            * @desc TC_PCEF_IPS_03
            * @param p_cSeq_s Transaction Id
            * 
            *  Testconfiguration with GTP components
            */
            testcase TC_PCEF_IPS_03() 
            runs on ServerSyncComp
            system TestAdapter {
                //Variables
                var DiameterComponent v_diameterComponent_pcrf;
                var GtpComponent v_gtpComponent_1;
                var GtpComponent v_gtpComponent_2;
                f_cf_1Gx2GtpRUp(v_diameterComponent_pcrf,v_gtpComponent_1,v_gtpComponent_2);
		
                //Start
                v_diameterComponent_pcrf.start(f_TC_PCEF_IPS_03());
                v_gtpComponent_1.start(f_TC_GTP_01());
                v_gtpComponent_1.start(f_TC_GTP_02_neg());
                
                // synchronize PTC on 3 sychronization points
                f_serverSync3Clients({c_prDone, c_tbDone, c_poDone});
		
                f_cf_1Gx2GtpRDown(v_diameterComponent_pcrf,v_gtpComponent_1,v_gtpComponent_2);
		
            } // end TC_PCEF_IPS_03

            	
            /*
            * @desc TC_PCEF_IPS_04
            * @param p_cSeq_s Transaction Id
            * 
            *  Testconfiguration with GTP components
            */
            testcase TC_PCEF_IPS_04() 
            runs on ServerSyncComp
            system TestAdapter {
                //Variables
                var DiameterComponent v_diameterComponent_pcrf;
                var GtpComponent v_gtpComponent_1;
                var GtpComponent v_gtpComponent_2;
                f_cf_1Gx2GtpRUp(v_diameterComponent_pcrf,v_gtpComponent_1,v_gtpComponent_2);
		
                //Start
                v_diameterComponent_pcrf.start(f_TC_PCEF_IPS_04());
                v_gtpComponent_1.start(f_TC_GTP_01());
                v_gtpComponent_1.start(f_TC_GTP_02_neg());
                
                // synchronize PTC on 3 sychronization points
                f_serverSync3Clients({c_prDone, c_tbDone, c_poDone});
		
                f_cf_1Gx2GtpRDown(v_diameterComponent_pcrf,v_gtpComponent_1,v_gtpComponent_2);
		
            } // end TC_PCEF_IPS_04
            
                        	
            /*
            * @desc TC_PCEF_IPS_05
            * @param p_cSeq_s Transaction Id
            * 
            *  Testconfiguration with GTP components
            */
            testcase TC_PCEF_IPS_05() 
            runs on ServerSyncComp
            system TestAdapter {
                //Variables
                var DiameterComponent v_diameterComponent_pcrf;
                var GtpComponent v_gtpComponent_1;
                var GtpComponent v_gtpComponent_2;
                f_cf_1Gx2GtpRUp(v_diameterComponent_pcrf,v_gtpComponent_1,v_gtpComponent_2);
		
                //Start
                v_diameterComponent_pcrf.start(f_TC_PCEF_IPS_05());
                v_gtpComponent_1.start(f_TC_GTP_01());
                v_gtpComponent_1.start(f_TC_GTP_02_neg());
                
                // synchronize PTC on 3 sychronization points
                f_serverSync3Clients({c_prDone, c_tbDone, c_poDone});
		
                f_cf_1Gx2GtpRDown(v_diameterComponent_pcrf,v_gtpComponent_1,v_gtpComponent_2);
		
            } // end TC_PCEF_IPS_05

        }//end group TP_PCEFRole_IPS
        
        group TP_PCEFRole_MSI {	//Modification of Session Information
@@ -846,12 +929,123 @@ module DiameterGx_TestCases
		
            } // end TC_PCEF_MSI_02


            /*
            * @desc TC_PCEF_MSI_03
            * @param p_cSeq_s Transaction Id
            */
            testcase TC_PCEF_MSI_03() 
            runs on ServerSyncComp
            system TestAdapter {
                //Variables
                var DiameterComponent v_diameterComponent_pcrf;
                f_cf_1GxRUp(v_diameterComponent_pcrf);
		
                //Start
                v_diameterComponent_pcrf.start(f_TC_PCEF_MSI_03());
                
                // synchronize PTC on 3 sychronization points
                f_serverSync1Client({c_prDone, c_tbDone, c_poDone});
		
                f_cf_1GxRDown(v_diameterComponent_pcrf);
		
            } // end TC_PCEF_MSI_03
            
            
            /*
            * @desc TC_PCEF_MSI_04
            * @param p_cSeq_s Transaction Id
            */
            testcase TC_PCEF_MSI_04() 
            runs on ServerSyncComp
            system TestAdapter {
                //Variables
                var DiameterComponent v_diameterComponent_pcrf;
                f_cf_1GxRUp(v_diameterComponent_pcrf);
		
                //Start
                v_diameterComponent_pcrf.start(f_TC_PCEF_MSI_04());
                
                // synchronize PTC on 3 sychronization points
                f_serverSync1Client({c_prDone, c_tbDone, c_poDone});
		
                f_cf_1GxRDown(v_diameterComponent_pcrf);
		
            } // end TC_PCEF_MSI_04
            
            
            /*
            * @desc TC_PCEF_MSI_05
            * @param p_cSeq_s Transaction Id
            */
            testcase TC_PCEF_MSI_05() 
            runs on ServerSyncComp
            system TestAdapter {
                //Variables
                var DiameterComponent v_diameterComponent_pcrf;
                f_cf_1GxRUp(v_diameterComponent_pcrf);
		
                //Start
                v_diameterComponent_pcrf.start(f_TC_PCEF_MSI_05());
                
                // synchronize PTC on 3 sychronization points
                f_serverSync1Client({c_prDone, c_tbDone, c_poDone});
		
                f_cf_1GxRDown(v_diameterComponent_pcrf);
		
            } // end TC_PCEF_MSI_05
            

        
        }//end group  TP_PCEFRole_MSI
        
        group TP_PCEFRole_INV {	//Invalid Behaviour
        }//end group TP_PCEFRole_INV
        
        group TP_PCEFRole_ST {	//Session Termination
        
            /*
            * @desc TC_PCEF_ST_01
            * @param p_cSeq_s Transaction Id
            */
            testcase TC_PCEF_ST_01() 
            runs on ServerSyncComp
            system TestAdapter {
                //Variables
                var DiameterComponent v_diameterComponent_pcrf;
                f_cf_1GxRUp(v_diameterComponent_pcrf);
		
                //Start
                v_diameterComponent_pcrf.start(f_TC_PCEF_ST_01());
                
                // synchronize PTC on 3 sychronization points
                f_serverSync1Client({c_prDone, c_tbDone, c_poDone});
		
                f_cf_1GxRDown(v_diameterComponent_pcrf);
		
            } // end TC_PCEF_ST_01
        
            /*
            * @desc TC_PCEF_ST_02
            * @param p_cSeq_s Transaction Id
            */
            testcase TC_PCEF_ST_02() 
            runs on ServerSyncComp
            system TestAdapter {
                //Variables
                var DiameterComponent v_diameterComponent_pcrf;
                f_cf_1GxRUp(v_diameterComponent_pcrf);
		
                //Start
                v_diameterComponent_pcrf.start(f_TC_PCEF_ST_02());
                
                // synchronize PTC on 3 sychronization points
                f_serverSync1Client({c_prDone, c_tbDone, c_poDone});
		
                f_cf_1GxRDown(v_diameterComponent_pcrf);
		
            } // end TC_PCEF_ST_02
        
        }//end group  TP_PCEFRole_ST
        
        group TP_PCEFRole_PCC {	//PCC rules