Commit da08663a authored by garciay's avatar garciay
Browse files

STF490: Add RF/Ro AVPs (week #38)

Build on TTWB & TCT3
parent ca6fd4ee
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -24,6 +24,12 @@ module DiameterRfRo_PICS {
    
    
    group PICS_A3 { 
    group PICS_A3 { 
        
        
        /**
         * @desc Does the IUT support event based charging? 
         * @see  ETSI DTS/INT 00121-1 V0.0.6 (2015-07) A.3/1 
         */
        modulepar boolean PICS_EVENT_BASED_CHARGING := true;
        
    } // End of group PICS_A3
    } // End of group PICS_A3
    
    
} // End of module DiameterRfRo_PICS 
} // End of module DiameterRfRo_PICS 
 No newline at end of file
+141 −64
Original line number Original line Diff line number Diff line
@@ -23,8 +23,11 @@ module DiameterRfRo_TCFunctions {
    import from DiameterRfRo_PIXITS all;
    import from DiameterRfRo_PIXITS all;
    import from DiameterRfRo_TestSystem all;
    import from DiameterRfRo_TestSystem all;
    
    
    // 5.2.2.1. CDF Role
    group TP_RF_Role {
        
        // 5.2.2.1
        // 5.2.2.1
    group TP_CDFRole_MS { 
        group TP_RF_CDF_Role { 
            
            
            // 5.2.2.1.2 Message Syntax
            // 5.2.2.1.2 Message Syntax
            group messageSyntax {
            group messageSyntax {
@@ -97,6 +100,80 @@ module DiameterRfRo_TCFunctions {
                
                
            } // End of group messageSyntax
            } // End of group messageSyntax
            
            
    } // End of group TP_CDFRole_MS {  
            // 5.2.2.1.3 Type of Charging
            group TypeOfCharging {
                
                /**
                 * @desc    Verify that the IUT can successfully process an AC-Request [Event] where Event Based Charging is used
                 * @verdict pass on success, fail on error or inconc on timeout only 
                 */
                function f_TC_RF_CDF_TC_01() runs on DiameterComponent { 
                   // Local variables
                    
                    // Preamble
                    f_preamble_Rf_CDF();
                    f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                    log("*** " & __SCOPE__ & ": INFO: Preamblue done. ***");
                    
                    // Test Body
                    // Clause 'when': the IUT receives an AC-Request
                    f_triggerAcRequest(
                        md_aCR(
                            vc_sessionId, 
                            md_acrBodyAvps(
                                vc_originHost,                 // containing an Origin-Host AVP
                                vc_originRealm,                // containing an Origin-Realm AVP
                                m_accounting_Record_Type(      // containing an Accounting-Record-Type AVP
                                    EVENT_RECORD_E
                                ),
                                m_accounting_Record_Number(    // containing an Accounting-Record-Number AVP
                                    3                          //     indicating the value 3
                                ),
                                m_service_Information_AVP_dummy // FIXME To be continue by creating a m_service_Information template modifying m_service_Information_AVP_dummy 
                            )
                        )
                    );
                    
                    // Clause 'then': the IUT sends an AC-Response 
                    tc_wait.start;
                    alt {
                        [] DIAMP.receive(
                            mw_cdfAccountingResponse(
                                mdw_aCA( 
                                    vc_sessionId,                       // containing a Session-ID AVP
                                    mdw_acaBodyAvps(
                                        mw_resultCode(                  // containing a Result-Code AVP
                                            DIAMETER_SUCCESS_E          //     indicating DIAMETER_SUCCESS
                                        ),
                                        vc_originHost,                  // containing an Origin-Host AVP
                                        vc_originRealm,                 // containing an Origin-Realm AVP
                                        mw_accounting_Record_Type(      // containing an Accounting-Record-Type AVP
                                            EVENT_RECORD_E
                                        ),
                                        mw_accounting_Record_Number(    // containing an Acct-Application-Id AVP
                                            3                           //     indicating the value 3
                                        )
                        )))) {
                            f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                            log("*** " & __SCOPE__ & ": PASS: Expected was received. ***");
                        }
                        [] tc_wait.timeout {
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                            log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***");
                        }
                    } // End of 'altstep' statement
                    
                    // Postamble
                    f_postamble_CTF();
                    f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                    log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                    
                } // End of function f_TC_RF_CDF_TC_01 
                
            } // End of group TypeOfCharging
            
        } // End of group TP_RF_CDF_Role 
        
    }  // End of group TP_RF_Role 
    
    
} // End of module DiameterRfRo_Rf_TCFunctions
} // End of module DiameterRfRo_Rf_TCFunctions
 No newline at end of file
+838 −130

File changed.

Preview size limit exceeded, changes collapsed.

+76 −5
Original line number Original line Diff line number Diff line
@@ -25,12 +25,14 @@ module DiameterRfRo_TestCases
    import from DiameterRfRo_Steps all;
    import from DiameterRfRo_Steps all;
    import from DiameterRfRo_TestSystem all;
    import from DiameterRfRo_TestSystem all;
    
    
    // 5.2.2.1. CDF Role
    group TP_RF_Role {
    group TP_RF_Role {
        
        
        group TP_RF_CDF_Role_MS { //Rf message syntax
        // 5.2.2.1. CDF Role
        group TP_RF_CDF_Role { 
            
            
            // 5.2.2.1.2 Message Syntax
            // 5.2.2.1.2 Message Syntax
            group messageSyntax {
            group MessageSyntax {
                
                
                /**
                /**
                 * @desc    Verify that the IUT can successfully process all mandatory AVPs in an AC-Request received due to Charging Data Transfer
                 * @desc    Verify that the IUT can successfully process all mandatory AVPs in an AC-Request received due to Charging Data Transfer
@@ -95,9 +97,78 @@ module DiameterRfRo_TestCases
                    
                    
                } // End of testcase TC_RF_CDF_MS_01 
                } // End of testcase TC_RF_CDF_MS_01 
                
                
            } // End of group messageSyntax
            } // End of group MessageSyntax
            
            
        } // End of group group TP_RF_CDF_Role_MS
            // 5.2.2.1.3 Type of Charging
            group TypeOfCharging {
                
                /**
                 * @desc    Verify that the IUT can successfully process an AC-Request [Event] where Event Based Charging is used
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT and PICS_EVENT_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an AC-Request 
                 *                containing an Accounting-Record-Type AVP
                 *                    indicating EVENT_RECORD
                 *                containing an Event-Timestamp AVP 
                 *                may containing Service-Information AVP
                 *                    containing at least one Subscription-ID AVP
                 *                        indicating the identification of the user
                 *                    may contains IMS-Information AVP
                 *                        containing Node-Functionality AVP
                 *                            indicating the value 3
                 *                    may containing Service-Generic-Information AVP
                 *                        indicating the service specific parameters
                 *                may containing Service-Context-Id AVP
                 *        }
                 *        then {
                 *            the IUT sends a AC-Response 
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing an Accounting-Record-Type AVP
                 *                    indicating EVENT_RECORD
                 *                containing an Accounting-Record-Number AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.12
                 * @see        ETSI DTS/INT 00121-2 V0.0.12 (2015-07) TP_RF_CDF_TC_01
                 */
                testcase TC_RF_CDF_TC_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterComponent v_diameterRf_ctf; 
                    
                    // Test control
                    if (not (PICS_CDF_IUT and PICS_EVENT_BASED_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_CDF_IUT and PICS_EVENT_BASED_CHARGING' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_cdfUp(v_diameterRf_ctf);
                    
                    // Start
                    v_diameterRf_ctf.start(f_TC_RF_CDF_TC_01());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_cdfDown(v_diameterRf_ctf);
                    
                } // End of testcase TC_RF_CDF_TC_01 
                
            } // End of group TypeOfCharging
            
        } // End of group group TP_RF_CDF_Role
        
        
    } // End of group TP_RFRole
    } // End of group TP_RFRole
    
    
+4 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,10 @@ module DiameterRfRo_TestControl {
        
        
        if (PICS_CDF_IUT) {
        if (PICS_CDF_IUT) {
            execute(TC_RF_CDF_MS_01());
            execute(TC_RF_CDF_MS_01());
            
            if (PICS_EVENT_BASED_CHARGING) {
                execute(TC_RF_CDF_TC_01());
            }
        }
        }
        
        
    } // End of 'Control' statement
    } // End of 'Control' statement