Commit a42dc0ab authored by pintar's avatar pintar
Browse files

New required modules added and changes were done.

DiameterS9_TpesAndValues content was moved to LibDiameter
parent 36e10e5b
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -381,11 +381,16 @@ module DiameterS9_PIXITS
//        */
//        modulepar boolean PX_GTPsupport := false;           
//                                                
//        /** @desc	boolean indicator, PIXIT item A-7/53
//         * TRUE if the Rx interface is accessible to trigger Diameter events at the Gx interface
//        */
//        modulepar boolean PX_Rxsupport := false;           
//        
        /** @desc	boolean indicator, PIXIT item A-X/XX
         * TRUE if the Gx interface is accessible to trigger Diameter events at the S9 interface
        */
        modulepar boolean PX_Gxsupport := false;           
        
        /** @desc	boolean indicator, PIXIT item A-X/XX
         * TRUE if the Gxx interface is accessible to trigger Diameter events at the S9 interface
        */
        modulepar boolean PX_Gxxsupport := false;           
        
    } //end group DiameterCommonGxData

} // end module DiameterS9_PIXITS
 No newline at end of file
+15 −15
Original line number Diff line number Diff line
/**
 *  @author     STF 466
 *  @version    $Id: DiameterS9_TCFunctions.ttcn 661 2013-08-30 12:55:35Z schmitting $
 *  @version    $Id: DiameterS9_S9_TCFunctions.ttcn 661 2013-08-30 12:55:35Z schmitting $
 *  @desc       This module provides S9 test functions used by the test cases
 *              for IMS-DIAMETER tests.
 */
module DiameterS9_TCFunctions {
module DiameterS9_S9_TCFunctions {
    // LibCommon
    import from LibCommon_Sync {function f_selfOrClientSyncAndVerdict;
                                const c_prDone, c_tbDone, c_poDone;}
@@ -23,16 +23,16 @@ module DiameterS9_TCFunctions {


    group TP_HPCRFRole{ // §5.2.1
        group TP_HPCRFRole_HA {//S9 Messages
        group TP_HPCRFRole_MS {//S9 Messages

            /*
            *  @desc    This is the test case function TC_PCRF_HA_01
            *  @desc    This is the test case function TC_HPCRF_MS_01
            *  @param
            */
            function TC_PCRF_HA_01()
            function f_TC_HPCRF_MS_01()
            runs on DiameterComponent {

                //TODO: function have to be declared in S9_steps: f_preamble_PCEF();
                //TODO: function have to be declared in S9_steps: f_preamble_VPCRF();

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

@@ -50,13 +50,13 @@ module DiameterS9_TCFunctions {
                //session termination
                //TODO: function have to be declared in S9_steps: f_terminate_session_PCEF();

                //TODO: function have to be declared in S9_steps: f_postamble_PCEF();
                //TODO: function have to be declared in S9_steps: f_postamble_VPCRF();

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

            } // end function TC_PCRF_HA_01
            } // end function TC_H_PCRF_MS_01

        } // group TP_HPCRFRole_HA
        } // group TP_HPCRFRole_MS

        group TP_HPCRFRole_HSE {//S9 Session Establishment

@@ -64,10 +64,10 @@ module DiameterS9_TCFunctions {
            *  @desc    This is the test case function TC_PCRF_HA_01
            *  @param
            */
            function TC_PCRF_HSE_01()
            function f_TC_HPCRF_HSE_01()
            runs on DiameterComponent {

                //TODO: function have to be declared in S9_steps: f_preamble_PCEF();
                //TODO: function have to be declared in S9_steps: f_preamble_VPCRF();
                
                //f_initiate_session_HPCRF();

@@ -92,13 +92,13 @@ module DiameterS9_TCFunctions {
                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync

                //session termination
                //TODO: function have to be declared in S9_steps: f_terminate_session_PCEF();
                //TODO: function have to be declared in S9_steps: f_terminate_session_VPCRF();

                //TODO: function have to be declared in S9_steps: f_postamble_PCEF();
                //TODO: function have to be declared in S9_steps: f_postamble_VPCRF();

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

            } // end function TC_PCRF_HSE_01
            } // end function TC_HPCRF_HSE_01

        } // group TP_HPCRFRole_HSE

@@ -108,4 +108,4 @@ module DiameterS9_TCFunctions {
    
    } // group TP_VPCRFRole    
    
}
 No newline at end of file
}// end module DiameterS9_S9_TCFunctions
 No newline at end of file
+107 −0
Original line number Diff line number Diff line
/**
 *	@author 	STF 466
 *  @version    $Id: $
 *	@desc		This module provides test cases
 *              for SIP-IMS-S9-DIAMETER tests.
 */

module DiameterS9_TestCases
{
    //LibCommon
    import from LibCommon_Sync all ;
    import from LibCommon_VerdictControl all;
    //LibDiameter
    import from LibDiameter_Interface all;
    import from LibDiameter_TypesAndValues {const c_sync1;};
    //AtsIms
    import from DiameterS9_TestConfiguration all;
    import from DiameterS9_TestSystem all;
    //import from DiameterS9_Gx_TCFunctions all;
    //import from DiameterS9_Gxx_TCFunctions all;
    import from DiameterS9_S9_TCFunctions all;
    //import from DiameterS9_PICS all;
    import from DiameterS9_PIXITS all;
    import from DiameterS9_Steps all;

    group TP_HPCRFRole {
        group TP_HPCRFRole_MS { //S9 message syntax
            /*
            * @desc TC_HPCRF_MS_01
            */
            testcase TC_HPCRF_MS_01()
            runs on ServerSyncComp
            system TestAdapter {
                //Variables
                var DiameterComponent v_diameterComponent_vpcrf;
                f_cf_1Snine_vpcrfUp(v_diameterComponent_vpcrf);

                //Start
                v_diameterComponent_vpcrf.start(f_TC_HPCRF_MS_01());

                // synchronize PTC on 3 sychronization points
                f_serverSync1Client({c_prDone, c_tbDone, c_poDone});

                f_cf_1Snine_vpcrfDown(v_diameterComponent_vpcrf);
            } // end TC_VPCRF_MS_01

        }//end group TP_HPCRFRole_MS
    } //end group TP_HPCRFRole

    group TP_VPCRFRole {
        group TP_VPCRFRole_MS {	

            /*
            * @desc TC_VPCRF_MS_01
            * @param p_cSeq_s Transaction Id
            */
            testcase TC_VPCRF_MS_01()
            runs on ServerSyncComp
            system TestAdapter {

                // Initialize
                var DiameterComponent v_diameterComponent_hpcrf;

                f_cf_1Snine_hpcrfUp(v_diameterComponent_hpcrf);

                // Start
                
//TODO f_TC                v_diameterComponent_hpcrf.start(f_TC_VPCRF_MS_01());

                // synchronize PTC on 3 sychronization points
                f_serverSync1Client({c_prDone, c_tbDone, c_poDone});

                f_cf_1Snine_hpcrfDown(v_diameterComponent_hpcrf);

            } // end TC_VPCEF_MS_01

        }//end group TP_VPCRFRole_MS
        group TP_VPCRFRole_HSE {	

            /*
            * @desc TC_VPCRF_HSE_01
            * @param p_cSeq_s Transaction Id
            */
            testcase TC_VPCRF_HSE_01()
            runs on ServerSyncComp
            system TestAdapter {

                // Initialize
                var DiameterComponent v_diameterComponent_hpcrf;
                var DiameterComponent v_diameterComponent_pcef;

                f_cf_1Snine1Gx_hpcrfUp(v_diameterComponent_hpcrf, v_diameterComponent_pcef);

                // Start
                
//TODO                v_diameterComponent_hpcrf.start(f_TC_VPCRF_HSE_01());

                // Finish

//TODO function to handle more components                f_ConfigRun_PCRF(v_diameterComponent_hpcrf, v_diameterComponent_pcef);

            } // end TC_VPCEF_HSE_01

        }//end group TP_VPCRFRole_HSE

    }//end group TP_VPCRFRole
}// end module DiameterS9_TestCases
 No newline at end of file
+313 −0
Original line number Diff line number Diff line
/**
 *	@author 	STF 466
 *  @version    $Id: $
 *	@desc		This module provides test component configurations
 *              for DIAMETER tests.
 */

module DiameterS9_TestConfiguration
{
    //LibCommon
    import from LibCommon_Sync {type ServerSyncComp,SyncPointList;
                                modulepar PX_TSYNC_TIME_LIMIT;
                                function f_serverWaitForAllClientsToStop, f_serverSyncClientsTimed;} ;
    import from LibCommon_VerdictControl {type FncRetCode;
                                          function f_setVerdict;}

    //LibDiameter
    import from LibDiameter_Interface all;
    import from LibDiameter_PIXITS {modulepar PX_DIAM_LLP_ENABLED;};
	//AtsIms
	import from DiameterS9_TestSystem all;
	import from DiameterS9_PIXITS {modulepar PX_Gxsupport,PX_Gxxsupport;};

	/*
	** @desc f_NrofComps returns the number of test components
	** based on the PIXIT value PX_Rxsupportt
	*/
	function f_NrofComps() return integer
		{	if (PX_Gxsupport or PX_Gxxsupport)
			{ return 2 }
			else
			{ return 1 }
		};
	// end f_NrofComps

	group cfUp {

        /**
         *
         * @desc Creates test configuration of cf_1S9_vpcrf - H-PCRF is SUT
         * @param p_diameterComponent_vpcrf	v-pcrf component
         */
        function f_cf_1Snine_vpcrfUp(out DiameterComponent p_diameterComponent_vpcrf)
        runs on ServerSyncComp
        {
            //Variables
            var FncRetCode v_ret := e_success;

            //Create
            p_diameterComponent_vpcrf := DiameterComponent.create ;

            //Connect
            connect(p_diameterComponent_vpcrf:syncPort, self:syncPort) ;
            //Map
            map(p_diameterComponent_vpcrf:DIAMP, system:V_PCRF_S9);// Diameter Init test Configuration
            if (PX_DIAM_LLP_ENABLED){
            	map(p_diameterComponent_vpcrf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration
            }

            f_setVerdict(v_ret);
        }//end f_cf_1Snine_vpcrfUp

        /**
         *
         * @desc Creates test configuration of CF_1Snine - V-PCRF is SUT
         * @param p_diameterComponent_hpcrf	h-pcrf component
         */
        function f_cf_1Snine_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf)
        runs on ServerSyncComp
        {
            //Variables
            var FncRetCode v_ret := e_success;

            //Create
            p_diameterComponent_hpcrf := DiameterComponent.create ;

            //Connect
            connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ;

            //Map
            map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration
            if (PX_DIAM_LLP_ENABLED){
            	map(p_diameterComponent_hpcrf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration
            }

            f_setVerdict(v_ret);
        }//end f_cf_1Snine_hpcrfUp

        /**
         *
         * @desc Creates test configuration of CF_1Snine1Gx - V-PCRF is SUT
         * @param p_diameterComponent_hpcrf	h-pcef component
         * @param p_diameterComponent_pcef	pcef component
         */
        function f_cf_1Snine1Gx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_pcef)
        runs on ServerSyncComp
        {
            //Variables
            var FncRetCode v_ret := e_success;

            //Create
            p_diameterComponent_hpcrf := DiameterComponent.create ;
            if (PX_Gxsupport) {
	            p_diameterComponent_pcef := DiameterComponent.create ;
            }
            //Connect
            connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ;
            if (PX_Gxsupport) {
	            connect(p_diameterComponent_pcef:syncPort, self:syncPort) ;
            }
            //Map
            map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration
            if (PX_Gxsupport) {
	            map(p_diameterComponent_pcef:DIAMP, system:PCEF_Gx);// Diameter Init test Configuration
            }
            if (PX_DIAM_LLP_ENABLED){
            	map(p_diameterComponent_hpcrf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration
            	map(p_diameterComponent_pcef:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration
            }

            f_setVerdict(v_ret);
        }//end f_cf_1Snine1Gx_hpcrfUp

        /**
         *
         * @desc Creates test configuration of CF_1Snine1Gxx - V-PCRF is SUT
         * @param p_diameterComponent_hpcrf h-pcrf component
         * @param p_diameterComponent_bberf bberf component
         */
        function f_cf_1Snine1Gxx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_bberf)
        runs on ServerSyncComp
        {
            //Variables
            var FncRetCode v_ret := e_success;

            //Create
            p_diameterComponent_hpcrf := DiameterComponent.create ;
            if (PX_Gxxsupport) {
                p_diameterComponent_bberf := DiameterComponent.create ;
            }
            //Connect
            connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ;
            if (PX_Gxxsupport) {
	            connect(p_diameterComponent_bberf:syncPort, self:syncPort) ;
            }
            //Map
            map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration
            if (PX_Gxxsupport) {
	            map(p_diameterComponent_bberf:DIAMP, system:BBERF_Gxx);// Diameter Init test Configuration
            }
            if (PX_DIAM_LLP_ENABLED){
            	map(p_diameterComponent_hpcrf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration
            	map(p_diameterComponent_bberf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration
            }

            f_setVerdict(v_ret);
        }//end f_cf_1Snine1Gxx_hpcrfUp

	}//end group cfUp

	group cfDown {

        /**
        *
        * @desc Deletes configuration of cf_1S9_vpcrf - H-PCRF is SUT
        * @param p_diameterComponent_vpcrf diameter component
        */
        function f_cf_1Snine_vpcrfDown(in DiameterComponent p_diameterComponent_vpcrf)
        runs on ServerSyncComp
        {
            f_serverWaitForAllClientsToStop();

            //Disconnect
            disconnect(p_diameterComponent_vpcrf:syncPort, self:syncPort);
            //Unmap
            unmap(p_diameterComponent_vpcrf:DIAMP, system:V_PCRF_S9);
            if (PX_DIAM_LLP_ENABLED){
            	unmap(p_diameterComponent_vpcrf:LLPP, system:LLIMS);
            }
        }//end f_cf_1Snine_vpcrfDown

        /**
        *
        * @desc Deletes configuration of CF_1Snine - V-PCRF is SUT
        * @param p_diameterComponent_hpcrf diameter component
        */
        function f_cf_1Snine_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf)
        runs on ServerSyncComp
        {
            f_serverWaitForAllClientsToStop();

            //Disconnect
            disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort);

            //Unmap
            unmap(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);
            if (PX_DIAM_LLP_ENABLED){
            	unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS);
            }
        }//end f_cf_1Snine_hpcrfDown

        /**
        *
        * @desc Deletes configuration of CF_1Snine1GxE - V-PCRF is SUT
        * @param p_diameterComponent_hpcrf diameter component
        * @param p_diameterComponent_pcef diameter component
        */
        function f_cf_1Snine1Gx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_pcef)
        runs on ServerSyncComp
        {
            f_serverWaitForAllClientsToStop();

            //Disconnect
            disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort);
            if (PX_Gxsupport) {
	            disconnect(p_diameterComponent_pcef:syncPort, self:syncPort);
            }
            //Unmap
            unmap(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);
            if (PX_Gxsupport) {
	            unmap(p_diameterComponent_pcef:DIAMP, system:PCEF_Gx);
            }
            if (PX_DIAM_LLP_ENABLED){
            	unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS);
            	unmap(p_diameterComponent_pcef:LLPP, system:LLIMS);
            }
        }//end f_cf_1Snine1Gx_hpcrfDown

        /**
        *
        * @desc Deletes configuration of CF_1Snine1GxxE - V-PCRF is SUT
        * @param p_diameterComponent_hpcrf diameter component
        * @param p_diameterComponent_bberf diameter component
        */
        function f_cf_1Snine1Gxx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_bberf)
        runs on ServerSyncComp
        {
            f_serverWaitForAllClientsToStop();

            //Disconnect
            disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort);
            if (PX_Gxxsupport) {
	            disconnect(p_diameterComponent_bberf:syncPort, self:syncPort);
            }
            //Unmap
            unmap(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);
            if (PX_Gxxsupport) {
	            unmap(p_diameterComponent_bberf:DIAMP, system:BBERF_Gxx);
            }
            if (PX_DIAM_LLP_ENABLED){
            	unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS);
            	unmap(p_diameterComponent_bberf:LLPP, system:LLIMS);
            }
        }//end f_cf_1Snine1Gxx_hpcrfDown

	} //end group cfDown

	group syncNoStop // Same functions as in LibCommon but without call of f_serverWaitForAllClientsToStop()
	{
        /**
         * @desc   Implements synchronization of N clients from server side
         *         on one or more synchronization points.
         *         If problem occurs, then server sends STOP to all clients.
         *         Waits for PX_TSYNC_TIME_LIMIT to let clients
         *         finish executing their behavior until this
         *         synchronization point. After passing all synchronization
         *         points successfuly the server waits for all clients
         *         to stop.
         *         See f_serverSyncClientsTimed for overwriting this
         *         the timing constraint!
         *         This function sets the server component verdict.
         * @remark The use of this function requires prior connection  of
         *         the server sync ports!
         * @see    LibCommon_Sync.f_connect4SelfOrClientSync
         * @see    LibCommon_Sync.PX_TSYNC_TIME_LIMIT
         * @see    LibCommon_Sync.f_serverSyncClientsTimed
         * @see    LibCommon_Sync.f_serverWaitForAllClientsToStop
         * @param  p_numClients number of synchronization clients
         * @param  p_syncPointIds list of synchronization point name/ids
         */
        function f_serverSyncNClients (
          in integer p_numClients,
          in SyncPointList p_syncPointIds )
        runs on ServerSyncComp {
          var integer i, v_noOfSyncIds := lengthof(p_syncPointIds);
          for ( i := 0; i < v_noOfSyncIds; i := i+1 ) {
            f_serverSyncClientsTimed (
              p_numClients,
              p_syncPointIds[i],
              PX_TSYNC_TIME_LIMIT );
          }
        }

	/* @desc	Implements synchronization of client from server side
	 *          on one or more synchronization points.
	 *			If problem occurs, then server sends STOP to client.
	 *			Waits for PX_TSYNC_TIME_LIMIT to let client
	 *			finish executing behavior until this
	 *			synchronization point.
	 * @remark	The use of this function requires prior connection  of
	 *			the server sync ports!
	 * @param   p_syncPointIds list of synchronization point name/ids
	 * @return  execution status
	 */
	function f_serverSync1Client( in SyncPointList p_syncPointIds )
	runs on ServerSyncComp {
		var integer i, v_noOfSyncIds := lengthof(p_syncPointIds);
		for ( i := 0; i < v_noOfSyncIds; i := i+1 ) {
			f_serverSyncClientsTimed(1,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT);
		}
	}
	} //end group syncNoStop
} // end module DiameterS9_TestConfiguration
+19 −20
Original line number Diff line number Diff line
/**
 *	@author 	STF 466
 *  @version    $Id: DiameterS9_TestSystem.ttcn$
 *  @version    $Id: $
 *	@desc		This module provides the types and ports used by the test component 
 *              for SIP-IMS-DIAMETER tests.
 */

module DiameterS9_TestSystem {	

    import from DiameterS9_TypesAndValues all;
    //LibDiameter
    import from LibDiameter_Interface {type DiameterPort;};

    group SystemConfiguration {
	  group Ports {
		type port DiameterS9Port message { inout DIAMETER_S9_Message };
	  } // End Group Ports

      group TestComponents {
        group TestSystemInterfaces {
            /*
            ** @desc  The test system interface
            */
            type component TestAdapter {
                port DiameterS9Port V_PCRF_S9, H_PCRF_S9; 
                port DiameterPort V_PCRF_S9, H_PCRF_S9; 
                port DiameterPort PCEF_Gx, BBERF_Gxx; // Gx and  Gxx only
                //port DiameterPort AF_Rx; // Rx only if needed later on

                //global variables

Loading