Commit c807205f authored by garciay's avatar garciay
Browse files

STF490: Add OCF_OP_01

        Update PICs (shall align TSS&TPs)
parent b83dc67e
Loading
Loading
Loading
Loading
+80 −0
Original line number Original line Diff line number Diff line
@@ -2713,6 +2713,86 @@ module DiameterRfRo_TCFunctions {
            // 5.2.3.1.10 Other Procedures
            // 5.2.3.1.10 Other Procedures
            group TP_RO_OCF_OP {
            group TP_RO_OCF_OP {
                
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Initial] to reserve units due to Event Charging with Unit Reservation
                 * @verdict pass on success, fail on error or inconc on timeout only 
                 */
                function f_TC_RO_OCF_OP_01() runs on DiameterRfRo { 
                    // Local variables
                    
                    // Preamble
                    f_preamble_Ro_CTF();
                    f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
                    log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

                    f_send_CCR(
                        md_cCR(
                            vc_sessionId,
                            md_ccrBodyAvps_TypeOfCharging(
                                vc_originHost,
                                vc_originRealm,
                                vc_destinationRealm,
                                md_cC_Request_Type_AVP(                     // containing a CC-Request-Type AVP 
                                    INITIAL_REQUEST_E                       //     indicating INITIAL_REQUEST
                                ),
                                m_cC_Request_Number_dummy,
                                -,
                                -,
                                m_multiple_Services_Credit_Control_AVP(     // containing a Multiple-Services-Credit-Control AVP
                                    m_requested_Service_Unit_cC_Time_AVP(   //     containing a Requested-Service-Unit AVP
                                        m_cC_Time_AVP(32)
                                    )
                                )
                            )
                        )
                    );

                    f_awaiting_CCA(
                        mdw_cCA(
                            vc_sessionId,
                            mdw_ccaBodyAvps_xxx(
                                mw_resultCode(                          // containing a Result-Code AVP
                                    DIAMETER_SUCCESS_E                  //     indicating DIAMETER_SUCCESS
                                ),
                                vc_originHost,
                                vc_originRealm,
                                mw_cC_Request_Type_AVP(                  // containing a CC-Request-Type AVP 
                                    INITIAL_REQUEST_E                    //     indicating INITIAL_REQUEST
                                ),
                                mw_cC_Request_Number_AVP,
                                mdw_multiple_Services_Credit_Control_granted_Service_Unit( 
                                                                         // containing a Multiple-Services-Credit-Control AVP
                                    mdw_granted_Service_Unit_Time(       // containing a Granted-Service-Unit AVP
                                        mw_cC_Time                       //     indicating reserved units
                                    )
                                ),
                                mw_cost_Information_AVP(                 // optionally containing a Cost-Information AVP
                                    mw_unit_Value_AVP(                   //     containing a Unit-Value AVP
                                        mw_value_Digits_AVP              //         containing a Value-Digits AVP
                                    ),
                                    mw_currency_Code_AVP                 //     containing a Currency-Code AVP
                                ),
                                mw_remaining_Balance_AVP(                // optionally containing a Remaining-Balance AVP
                                    mw_unit_Value_AVP(                   //     containing a Unit-Value AVP
                                        mw_value_Digits_AVP              //         containing a Value-Digits AVP
                                    ),
                                    mw_currency_Code_AVP                 //     containing a Currency-Code AVP
                                )
                            )
                        )
                    );
                    f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync

                    f_sendCCR_awaitCCA_(
                                        TERMINATION_REQUEST_E, 
                                        3
                                        );
                    f_postamble_Ro_CTF();
                    f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
                    log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                    
                } // End of function f_TC_RO_OCF_OP_01
                
            } // End of group TP_RO_OCF_OP
            } // End of group TP_RO_OCF_OP
            
            
        }//End of group TP_RO_OCF_Role
        }//End of group TP_RO_OCF_Role
+74 −9
Original line number Original line Diff line number Diff line
@@ -2243,7 +2243,7 @@ module DiameterRfRo_TestCases
                /**
                /**
                 * @desc    Verify that the IUT can successfully transmit CC-Session-Failover AVP
                 * @desc    Verify that the IUT can successfully transmit CC-Session-Failover AVP
                 * <pre>
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER
                 * Initial conditions: 
                 * Initial conditions: 
                 *     with {
                 *     with {
                 *        
                 *        
@@ -2277,8 +2277,8 @@ module DiameterRfRo_TestCases
                    var DiameterRfRo v_diameterRo_ctf; 
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    
                    // Test control
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION)) {
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION' required for executing the TC. ***"); 
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER' required for executing the TC. ***"); 
                        stop;
                        stop;
                    }
                    }
                    
                    
@@ -2362,7 +2362,7 @@ module DiameterRfRo_TestCases
                /**
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Initial] to perform credit pooling due to Event Charging with Unit Reservation and then responds with a CC-Answer with related AVPs
                 * @desc    Verify that the IUT can successfully process a CC-Request [Initial] to perform credit pooling due to Event Charging with Unit Reservation and then responds with a CC-Answer with related AVPs
                 * <pre>
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING
                 * Initial conditions: 
                 * Initial conditions: 
                 *     with {
                 *     with {
                 *        
                 *        
@@ -2400,8 +2400,8 @@ module DiameterRfRo_TestCases
                    var DiameterRfRo v_diameterRo_ctf; 
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    
                    // Test control
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER)) {
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER' required for executing the TC. ***"); 
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING' required for executing the TC. ***"); 
                        stop;
                        stop;
                    }
                    }
                    
                    
@@ -2421,7 +2421,7 @@ module DiameterRfRo_TestCases
                /**
                /**
                 * @desc    Verify that the IUT supports credit pooling and it can successfully process a CC-Request [Initial] to reserve units due to Session Charging with Unit Reservation
                 * @desc    Verify that the IUT supports credit pooling and it can successfully process a CC-Request [Initial] to reserve units due to Session Charging with Unit Reservation
                 * <pre>
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING
                 * Initial conditions: 
                 * Initial conditions: 
                 *     with {
                 *     with {
                 *        
                 *        
@@ -2459,8 +2459,8 @@ module DiameterRfRo_TestCases
                    var DiameterRfRo v_diameterRo_ctf; 
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    
                    // Test control
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER)) {
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER' required for executing the TC. ***"); 
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING' required for executing the TC. ***"); 
                        stop;
                        stop;
                    }
                    }
                    
                    
@@ -2482,7 +2482,72 @@ module DiameterRfRo_TestCases
            // 5.2.3.1.10 Other Procedures
            // 5.2.3.1.10 Other Procedures
            group TP_RO_OCF_OP {
            group TP_RO_OCF_OP {
                
                
                /**
                 * @desc    Verify that the IUT can specify an idle timeout associated with a granted quota
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                optionally containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *                optionally containing a Remaining-Balance AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_OP_01
                 */
                testcase TC_RO_OCF_OP_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_01
                
            } // End of group TP_RO_OCF_OP
            } // End of group TP_RO_OCF_OP
            
        }//End of group TP_RO_OCF_Role
        }//End of group TP_RO_OCF_Role
        
        
        //5.2.3.2. CTF Role
        //5.2.3.2. CTF Role
+7 −7
Original line number Original line Diff line number Diff line
@@ -94,18 +94,18 @@ module DiameterRfRo_TestControl {
                }
                }
            }
            }
            
            
            if (PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION) {
            if (PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER) {
                execute(TC_RO_OCF_FA_01());
                execute(TC_RO_OCF_FA_01());
                if (PICS_RO_OCF_FAILOVER) {
                execute(TC_RO_OCF_FA_02());
                execute(TC_RO_OCF_FA_02());
            }
            }
            }
            
            
            if (PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER) {
            if (PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING) {
                execute(TC_RO_OCF_CP_01());
                execute(TC_RO_OCF_CP_01());
                execute(TC_RO_OCF_CP_02());
            }
            }
            if (PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER) {
            
                execute(TC_RO_OCF_CP_01());
            if (PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME) {
                execute(TC_RO_OCF_OP_01());
            }
            }
            
            
        }
        }