Commit 9a7b5841 authored by pintar's avatar pintar
Browse files

Preambles and pixits were made for first test case.

Corrections were done in test configuartion.
parent a586a5a3
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
/**
 *  @author     STF 480
 *  @version    $Id: $
 *  @version    $Id$
 *  @desc       This module provides Cx test functions used by the test cases
 *              for IMS-DIAMETER tests.
 */
@@ -29,13 +29,13 @@ module DiameterCxDx_Cx_TCFunctions {
            group TP_HSSRole_MS {//Cx Messages

            /*
            *  @desc	This is the test case function TC_CX_HSS_MS_01
            *  @desc	This is the test case function TC_CX_HSS_MS_01_I
            *  @param
            */
            function f_TC_CX_HSS_MS_01()
            function f_TC_CX_HSS_MS_01_I()
            runs on DiameterCx {
    
                f_preamble_CSCF();
                f_preamble_ICSCF();
    
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync - preamble done
    
@@ -53,9 +53,9 @@ module DiameterCxDx_Cx_TCFunctions {
    
                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync - postamble done
    
                f_postamble_CSCF();
                f_postamble_ICSCF();
    
            } // end function f_TC_CX_HSS_MS_01
            } // end function f_TC_CX_HSS_MS_01_S

            } // group TP_HSSRole_MS
            group TP_HSSRole_UA {//Cx UA
@@ -64,10 +64,10 @@ module DiameterCxDx_Cx_TCFunctions {
            *  @desc    This is the test case function TC_CX_HSS_UA_01
            *  @param
            */
            function f_TC_CX_HSS_UA_01()
            function f_TC_CX_HSS_UA_01_I()
            runs on DiameterCx {

                f_preamble_CSCF();
                f_preamble_ICSCF();

                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync - preamble done

@@ -85,7 +85,7 @@ module DiameterCxDx_Cx_TCFunctions {

                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync - postamble done

                f_postamble_CSCF();
                f_postamble_ICSCF();

            } // end function f_TC_CX_HSS_UA_01
            
+103 −10
Original line number Diff line number Diff line
/**
 *	@author 	STF 480
 *  @version    $Id: $
 *  @version    $Id$
 *	@desc		This module provides the PIXIT used for the Cx DIAMETER tests.
 */

@@ -15,28 +15,121 @@ module DiameterCxDx_PIXITS
    import from LibDiameter_TypesAndValues all;

    group Port_and_addresses{
        group Cx_Port_and_addresses{
        group CxDx_Port_and_addresses{
            
            /** @desc	charstring, PIXIT item A-7/1
            /** @desc	charstring, PIXIT item A-7/11
             * IP address of the test system
             */
            modulepar charstring PX_DIAMETER_CX_ETS_IPADDR := "1.1.1.1";
            modulepar charstring PX_DIAMETER_CX_ETS_ICSCF_IPADDR := "1.1.1.10";

            /** @desc	charstring,  PIXIT item A-7/2
            /** @desc	charstring, PIXIT item A-7/12
             * IP address of the test system
             */
            modulepar charstring PX_DIAMETER_CX_ETS_SCSCF_IPADDR := "1.1.1.11";

            /** @desc	charstring, PIXIT item A-7/13
             * IP address of the test system
             */
            modulepar charstring PX_DIAMETER_CX_ETS_SCSCF2_IPADDR := "1.1.1.21";

            /** @desc	charstring, PIXIT item A-7/15
             * IP address of the test system
             */
            modulepar charstring PX_DIAMETER_CX_ETS_HSS_IPADDR := "1.1.1.15";

            /** @desc	charstring, PIXIT item A-7/16
             * IP address of the test system
             */
            modulepar charstring PX_DIAMETER_CX_ETS_SLF_IPADDR := "1.1.1.16";
    
            /** @desc	charstring,  PIXIT item A-7/21
             * IP address of the system under test
             */
            modulepar charstring PX_DIAMETER_CX_SUT_ICSCF_IPADDR := "1.1.1.50";
            
            /** @desc	charstring,  PIXIT item A-7/22
             * IP address of the system under test
             */
            modulepar charstring PX_DIAMETER_CX_SUT_SCSCF_IPADDR := "1.1.1.51";

            /** @desc	charstring,  PIXIT item A-7/24
             * IP address of the system under test
             */
            modulepar charstring PX_DIAMETER_CX_SUT_HSS_IPADDR := "1.1.1.51";
            
            /** @desc	charstring,  PIXIT item A-7/25
             * IP address of the system under test
             */
            modulepar charstring PX_DIAMETER_CX_SUT_IPADDR := "1.1.1.2";
            modulepar charstring PX_DIAMETER_CX_SUT_SLF_IPADDR := "1.1.1.51";
    
            /** @desc	charstring, PIXIT item A-7/3
            /** @desc	charstring, PIXIT item A-7/31
             * Port number of the test system
             */
            modulepar integer PX_DIAMETER_CX_ETS_PORT := 3868;
            modulepar integer PX_DIAMETER_CX_ETS_ICSCF_PORT := 3868;
    
            /** @desc	charstring, PIXIT item A-7/4
            /** @desc	charstring, PIXIT item A-7/32
             * Port number of the test system
             */
            modulepar integer PX_DIAMETER_CX_ETS_SCSCF_PORT := 3868;

            /** @desc	charstring, PIXIT item A-7/33
             * Port number of the test system
             */
            modulepar integer PX_DIAMETER_CX_ETS_SCSCF2_PORT := 3868;

            /** @desc	charstring, PIXIT item A-7/35
             * Port number of the test system
             */
            modulepar integer PX_DIAMETER_CX_ETS_HSS_PORT := 3868;

            /** @desc	charstring, PIXIT item A-7/36
             * Port number of the test system
             */
            modulepar integer PX_DIAMETER_CX_ETS_SLF_PORT := 3868;
    
            /** @desc	charstring, PIXIT item A-7/41
             * Port number of the system under test
             */
            modulepar integer PX_DIAMETER_CX_SUT_ICSCF_PORT := 3868;
    
            /** @desc	charstring, PIXIT item A-7/42
             * Port number of the system under test
             */
            modulepar integer PX_DIAMETER_CX_SUT_SCSCF_PORT := 3868;

            /** @desc	charstring, PIXIT item A-7/44
             * Port number of the system under test
             */
            modulepar integer PX_DIAMETER_CX_SUT_HSS_PORT := 3868;
    
            /** @desc	charstring, PIXIT item A-7/45
             * Port number of the system under test
             */
            modulepar integer PX_DIAMETER_CX_SUT_PORT := 3868;
            modulepar integer PX_DIAMETER_CX_SUT_SLF_PORT := 3868;
        }
        group Gm_Port_and_addresses{

            /** @desc	charstring, PIXIT item A-7/14
             * IP address of the test system
             */
            modulepar charstring PX_DIAMETER_GM_ETS_UE_IPADDR := "1.1.1.100";

            /** @desc	charstring,  PIXIT item A-7/23
             * IP address of the system under test
             */
            modulepar charstring PX_DIAMETER_GM_SUT_PCSCF_IPADDR := "1.1.1.52";

            /** @desc	charstring, PIXIT item A-7/34
             * Port number of the test system
             */
            modulepar integer PX_DIAMETER_GM_ETS_UE_PORT := 3868;

            /** @desc	charstring, PIXIT item A-7/43
             * Port number of the system under test
             */
            modulepar integer PX_DIAMETER_GM_SUT_PCSCF_PORT := 3868;
        
        }//end group Gm_Port_and_addresses{
    }

// SUT specific implementation variants 
+94 −4
Original line number Diff line number Diff line
/**
 *  @author     STF 480
 *  @version    $Id: $
 *  @version    $Id$
 *  @desc       This module provides ATS specific steps used by the test cases
 *              for IMS-DIAMETER Cx tests.
 */
@@ -28,19 +28,109 @@

    group GlobalSteps {

        /*
        *  @desc    This is a test step that init global variables
        *  @param   
        */
        function f_DiameterCx_SCSCF_init()
        runs on DiameterCx {

            //Defaults
            vc_default_diameter := activate (a_diameter_default());

            //Base LibDiameter init function if there will be any base initialisation
            f_Diameter_Init_Component();

            vc_ETS_address := PX_DIAMETER_CX_ETS_SCSCF_IPADDR;
            vc_ETS_port    := PX_DIAMETER_CX_ETS_SCSCF_PORT;
            vc_SUT_address := PX_DIAMETER_CX_SUT_HSS_IPADDR;
            vc_SUT_port    := PX_DIAMETER_CX_SUT_HSS_PORT;
            //TODO check following values/PIXITS if they should be different than in ICSCF_init function
            vc_sessionId := m_sessionId(PX_SessionID);

            vc_originHost := m_originHost(PX_OriginHost);
            vc_originRealm := m_originRealm(PX_OriginRealm); // realm of the originator (TS)

            vc_originHost_IUT := m_originHost(PX_DestinationHost);
            vc_originRealm_IUT := m_originRealm(PX_DestinationRealm); // realm of the originator (TS)

            vc_destinationHost := m_destinationHost(PX_DestinationHost);
            vc_destinationRealm := m_destinationRealm(PX_DestinationRealm);

            vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_CX_ETS_SCSCF_IPADDR));

            vc_send_hopid:=hex2int('00000100'H);
            vc_send_endid:=hex2int('01000000'H);

        } // end function f_DiameterCx_init

        /*
        *  @desc    This is a test step that init global variables
        *  @param   
        */
        function f_DiameterCx_ICSCF_init()
        runs on DiameterCx {

            //Defaults
            vc_default_diameter := activate (a_diameter_default());

            //Base LibDiameter init function if there will be any base initialisation
            f_Diameter_Init_Component();

            vc_ETS_address := PX_DIAMETER_CX_ETS_ICSCF_IPADDR;
            vc_ETS_port    := PX_DIAMETER_CX_ETS_ICSCF_PORT;
            vc_SUT_address := PX_DIAMETER_CX_SUT_HSS_IPADDR;
            vc_SUT_port    := PX_DIAMETER_CX_SUT_HSS_PORT;

            vc_sessionId := m_sessionId(PX_SessionID);

            vc_originHost := m_originHost(PX_OriginHost);
            vc_originRealm := m_originRealm(PX_OriginRealm); // realm of the originator (TS)

            vc_originHost_IUT := m_originHost(PX_DestinationHost);
            vc_originRealm_IUT := m_originRealm(PX_DestinationRealm); // realm of the originator (TS)

            vc_destinationHost := m_destinationHost(PX_DestinationHost);
            vc_destinationRealm := m_destinationRealm(PX_DestinationRealm);

            vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_CX_ETS_ICSCF_IPADDR));

            vc_send_hopid:=hex2int('00000100'H);
            vc_send_endid:=hex2int('01000000'H);

        } // end function f_DiameterCx_ICSCF_init

    } // end group GlobalSteps

    group Preambles{
        
        function f_preamble_CSCF () runs on DiameterCx {
            //TODO
        function f_preamble_SCSCF () runs on DiameterCx {
            if(PX_DIAM_LLP_ENABLED)
            {
                f_preambleClient();
            }
            f_DiameterCx_SCSCF_init();
            f_preambleDiameterBaseClient(c_applId3GPPCxDx);
        }
        
        function f_preamble_ICSCF () runs on DiameterCx {
            if(PX_DIAM_LLP_ENABLED)
            {
                f_preambleClient();
            }
            f_DiameterCx_ICSCF_init();
            f_preambleDiameterBaseClient(c_applId3GPPCxDx);
        }
    
    }// end group Preambles

    group Postambles {
        
        function f_postamble_CSCF () runs on DiameterCx {
        function f_postamble_SCSCF () runs on DiameterCx {
            //TODO
        }
        
        function f_postamble_ICSCF () runs on DiameterCx {
            //TODO
        }
        
+18 −0
Original line number Diff line number Diff line
@@ -37,6 +37,24 @@ module DiameterCxDx_Templates {
        } //end group DummyAVPHeaders
        group SpecificAVPHeaders {
          	group sendingTemplatesForAVPs{
                template Destination_Host_AVP m_destinationHost(charstring p_avpData) :=
                {
                    aVP_Header := m_aVP_HeaderVid_Mbit1(c_destination_Host_AVP_Code, lengthof(p_avpData), omit),
                    aVP_Data := p_avpData
                }

                template Destination_Realm_AVP m_destinationRealm(charstring p_avpData) :=
                {
                    aVP_Header := m_aVP_HeaderVid_Mbit1(c_destination_Realm_AVP_Code, lengthof(p_avpData), omit),
                    aVP_Data := p_avpData
                }

                template Session_Id_AVP m_sessionId(UTF8String p_avpData) :=
                {
                    aVP_Header := m_aVP_HeaderVid_Mbit1(c_session_Id_AVP_Code, lengthof(p_avpData), omit),
                    aVP_Data := p_avpData
                }
                
                template Vendor_Specific_Appl_Id_AVP m_vendor_Specific_Appl_Id_Cx 
                  modifies m_vendor_Specific_Appl_Id_dummy := {
                    aVP_Header := m_aVP_Header_Mbit1(c_vendor_Specific_Appl_Id_AVP_Code),
+21 −2
Original line number Diff line number Diff line
/**
 *    @author     STF 480
 *    @version    $Id: $
 *    @version    $Id$
 *    @desc       This module provides test cases
 *                for SIP-CxDx-DIAMETER tests.
 */
@@ -26,7 +26,26 @@ module DiameterCxDx_TestCases

    group TP_HSSRole{ // §5.2.1.1
        group TP_HSSRole_MS {//Cx Messages
            //TODO all TC Functions

            /*
            * @desc TC_CX_HSS_MS_01
            */
            testcase TC_CX_HSS_MS_01()
            runs on DiameterCx
            system TestAdapter {
                //Variables
                var DiameterCx v_diameterComponent_scscf;
                f_cf_1CxUp_HSS(v_diameterComponent_scscf);

                //Start
                v_diameterComponent_scscf.start(f_TC_CX_HSS_MS_01_I());

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

                f_cf_1CxDown_HSS(v_diameterComponent_scscf);
            } // end TC_CX_HSS_MS_01

        } // group TP_HSSRole_MS
        group TP_HSSRole_UA {//Cx UA
        } // group TP_HSSRole_UA
Loading