Commit 2a9d504b authored by garciay's avatar garciay
Browse files

Implemented test case function f_TC_HSS_UL_01()

parent 82712e6b
Loading
Loading
Loading
Loading
+53 −4
Original line number Diff line number Diff line
@@ -16,14 +16,21 @@ module DiameterS6a_HSS_TCFunctions {
    //import from LibCommon_VerdictControl all;
    
    // LibDiameter 
    import from LibDiameter_Templates {
        template mw_resultCode
    };
    import from LibDiameter_Steps {
        function f_getVerdict
    };
    
    // DiameterS6a
    import from DiameterS6a_Templates all; 
    import from DiameterS6a_PIXITS all;
    import from DiameterS6a_Steps {
        function 
            f_preamble_HSS, f_postamble_HSS
            f_preamble_HSS, f_postamble_HSS, 
            f_awaiting_ULR; 
        altstep hss_default
    };
    import from DiameterS6a_TestSystem {
        type TestAdapter
@@ -32,19 +39,61 @@ module DiameterS6a_HSS_TCFunctions {
    // 5.2.2.1 Update Location
    group updateLocation {
        
        /**
         * @desc Verify that the IUT can successfully process all mandatory AVPs in a UL-Request.received due to Update Location procedure
         * @verdict pass on success, fail on error or inconc on timeout only 
         */
        function f_TC_HSS_UL_01() runs on TestAdapter {
            
            // Local variables
            
            // Preamble
            // Clause 'Initial conditions'
            f_preamble_HSS();
            f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
            log("*** " & __SCOPE__ & ": INFO: Preamblue done. ***");
            
            // Test Body
            // Clause 'when'
            
            // Clause 'then'
            // Clause 'when': the IUT receives a UL-Request
            f_awaiting_ULR(
                md_ULR_TC_01( 
                    vc_sessionId,                                   // containing a Session-ID AVP
                    md_ulrBodyAvps_TC_01(
                        m_auth_Session_State_noStateMaintained,     // containing an Auth-Session-State AVP indicating NO_STATE_MAINTAINED
                        vc_originHost,                              // containing an Origin-Host AVP
                        vc_originRealm,                             // containing an Origin-Realm AVP
                        vc_destinationRealm,                        // containing a Destination-Realm AVP
                        m_user_Name(PX_USR_NAME),                   // containing a User-Name AVP
                        m_rAT_Type(PX_RAT_TYPE),                    // containing a RAT-Type AVP
                        m_ulr_Flags_AVP(PX_ULR_FLAGS_S6a_IND_SET),  // containing a ULR-Flags AVP with S6a-indicator bit set
                        m_visitedPLMNId_dummy                       // containing a Visited-PLMN-ID AVP
                    ) // End of md_ulrBodyAvps_TC_01
                ) // // End of md_ULR_TC_01
            );
            
            // Clause 'then': the IUT sends a UL-Answer
            tc_ac.start;
            alt {
                [] MME_S6a.receive( 
				    m_mmeUpdateLocationRequest(
	                    mdw_ULA_TC_01( 
	                        vc_sessionId,                                       // containing a Session-ID AVP
	                        mdw_ulaBodyAvps_TC_01( 
	                            mw_resultCode(DIAMETER_SUCCESS_E),              // containing a Result-Code AVP indicating DIAMETER_SUCCESS
	                            m_auth_Session_State_noStateMaintained,         // containing an Auth-Session-State AVP indicating NO_STATE_MAINTAINED
	                            vc_originHost,                                  // containing an Origin-Host AVP
	                            vc_originRealm,                                 // containing an Origin-Realm AVP
	                            mw_ula_Flags_AVP(PX_ULA_FLAGS_SEP_IND_SET)     // containing a ULA-Flags AVP with Separation-indicator bit set
	                            // FIXME containing a Subscription-Data AVP
                )))) { // Unexpected ULR-Answer message 
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                    log("*** " & __SCOPE__ & ": PASS: Unexpected was received. ***");
                }
                [] tc_ac.timeout {
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***");
                }
            } // End of 'altstep' statement
            
            // Postamble
            f_postamble_HSS();
+44 −13
Original line number Diff line number Diff line
@@ -53,6 +53,19 @@ module DiameterS6a_PIXITS {
         */
        modulepar integer PX_DIAMETER_S6a_SUT_PORT := 1301;
        
        /**
         * @desc The Destination-Host identifying the endpoint to which the Diameter messages are destined
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.7/8 
         */
        modulepar Diameter_Identity PX_DESTINATION_HOST := "destination.etsi.org";
        
        /**
         * @desc The Destination-Realm identifying the Realm of the destination of any Diameter messages
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.7/9 
         */
        modulepar Diameter_Identity PX_DESTINATION_REALM := "myalupcrf.etsi.org";
        
        
    } // End of group ipSettings
    
    /**
@@ -64,31 +77,26 @@ module DiameterS6a_PIXITS {
         * @desc The Session-Id identifying a specific session
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.7/5 
         */
        modulepar UTF8String PX_SessionID := "sessionId";
        modulepar UTF8String PX_SESSION_ID := "sessionId";
        
        /**
         * @desc The Origin-Host identifying the endpoint that originates the Diameter messages
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.7/6 
         */
        modulepar Diameter_Identity PX_OriginHost := "orgHost";
        modulepar Diameter_Identity PX_ORIGIN_HOST := "orgHost";
        
        /**
         * @desc The Origin-Realm identifying the Realm of the originator of any Diameter messages
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.7/7 
         */
        modulepar Diameter_Identity PX_OriginRealm := "realm";
        modulepar Diameter_Identity PX_ORIGIN_REALM := "realm";
        
        /**
         * @desc The Destination-Host identifying the endpoint to which the Diameter messages are destined
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.7/8 
         * @desc The user name
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.x/x 
         */
        modulepar Diameter_Identity PX_DestinationHost := "destHost";
        modulepar charstring PX_USR_NAME := "userName";
        
        /**
         * @desc The Destination-Realm identifying the Realm of the destination of any Diameter messages
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.7/9 
         */
        modulepar Diameter_Identity PX_DestinationRealm := "destRealm";
        
    } // End of group group fieldValues
    
@@ -106,8 +114,31 @@ module DiameterS6a_PIXITS {
        modulepar RAT_Type PX_RAT_TYPE := GERAN_E;

        modulepar UInt32 PX_DSR_FLAGS := 0;
        
        /**
         * @desc Default ULR-Flags: all flags unset
         * @see ETSI TS 129 272 V10.8.0 (2013-07) Table 7.3.7/1: ULR-Flags
         */
        modulepar UInt32 PX_ULR_FLAGS := 0;
        
        /**
         * @desc ULR-Flags AVP with S6a-indicator bit set
         * @see ETSI TS 129 272 V10.8.0 (2013-07) Table 7.3.7/1: ULR-Flags
         */
        modulepar UInt32 PX_ULR_FLAGS_S6a_IND_SET := 1;
        
        /**
         * @desc Default ULA-Flags AVP: all flags unset
         * @see ETSI TS 129 272 V10.8.0 (2013-07) Table 7.3.7/1: ULR-Flags
         */
        modulepar UInt32 PX_ULA_FLAGS := 0;
        
        /**
         * @desc ULR-Flags AVP with S6a-indicator bit set
         * @see ETSI TS 129 272 V10.8.0 (2013-07) Table 7.3.7/1: ULR-Flags
         */
        modulepar UInt32 PX_ULA_FLAGS_SEP_IND_SET := 1;
        
        modulepar Oct3 PX_VISITED_PLMN_ID := '000000'O;
        
        modulepar Cancellation_Type_Code PX_CANCELLATION_TYPE := MME_UPDATE_PROCEDURE_E;
+44 −18
Original line number Diff line number Diff line
@@ -20,32 +20,50 @@
    // LibDiameter
    
    // DiameterS6a
//    import from DiameterGx_Templates all;
    import from DiameterS6a_PIXITS all;
//    import from DiameterGx_Gx_TCFunctions all;
//    import from DiameterGx_TestConfiguration all;
//    import from DiameterS6a_Templates {
//        template m_sessionId, m_originHost, m_originRealm, m_destinationHost, m_destinationRealm
//    };
    import from DiameterS6a_TypesAndValues {
        type 
            DIAMETER_S6a_MME_Initiated_Message, 
            ULR_MSG
    };
    import from DiameterS6a_PIXITS {
        group 
            ipSettings, fieldValues
    }; 
    import from DiameterS6a_Templates all;
    import from DiameterS6a_TestSystem {
        type TestAdapter
        type 
            TestAdapter 
    };

    // GPRS tunneling protocol
    // import from LibGtp_TypesAndValues all;
//    import from LibGtp_Interface all;

    group GlobalSteps {
        
        /*
        *  @desc    This is a test step that init global variables
        *  @param   
        *  @desc    Initialize component variables 
        */
        function f_DiameterS6a_init()
        runs on TestAdapter {
            
            // Initialize component variables 
            vc_sessionId := m_sessionId(PX_SESSION_ID);
            vc_originHost := m_originHost(PX_ORIGIN_HOST);
            vc_originRealm := m_originRealm(PX_ORIGIN_REALM); 
            vc_destinationHost := m_destinationHost(PX_DESTINATION_HOST);
            vc_destinationRealm := m_destinationRealm(PX_DESTINATION_REALM);
        } // End of function f_DiameterGx_init
        
        /**
         * @desc Default altstep activated during the preambule
         */
        altstep hss_default() runs on TestAdapter {
            [] MME_S6a.receive { // Received an unexpected message, process it as an error
                log("*** a_default: ERROR: Received an unexpected message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] tc_ac.timeout {
                log("*** a_default: ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
        } // End of altstep hss_default
        
    } // End of group GlobalSteps

    group Preambles{
@@ -53,7 +71,11 @@
        group hssRole {
            
            function f_preamble_HSS() runs on TestAdapter {
                // Initialilize the component's variables' 
                f_DiameterS6a_init();
                
                // Activate defaults
                activate( hss_default( ) );
            } // End of function f_preamble_HSS
        
        } // End of group hssRole
@@ -65,6 +87,7 @@
        group hssRole {
            
            function f_postamble_HSS() runs on TestAdapter {
                deactivate;
            } // End of function f_preamble_HSS
        
        } // End of group hssRole
@@ -79,9 +102,12 @@
    
    group SendMessage {
        
//    function f_awaiting_ULR (template (value) DIAMETER_MSG p_diameterMSG) runs on TestAdapter
//        {stop
//        }
        function f_awaiting_ULR ( template (value) ULR_MSG p_ulrMSG ) 
        runs on TestAdapter {
            MME_S6a.send(
                DIAMETER_S6a_MME_Initiated_Message: { s6a_ULR_MSG := p_ulrMSG } 
            );
        } // End of function f_awaiting_ULR
        
    } // End of group SendMessage

+320 −138

File changed.

Preview size limit exceeded, changes collapsed.

+290 −290

File changed.

Preview size limit exceeded, changes collapsed.

Loading