Commit 449dd61e authored by garciay's avatar garciay
Browse files

STF490: Add new TCs for RO_OCF_MS & RO_TC

        Rebuild with both TTWB & TCT3 tools
parent 8552b760
Loading
Loading
Loading
Loading
+70 −9
Original line number Original line Diff line number Diff line
@@ -64,7 +64,7 @@
            
            
            vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_RF_ETS_IPADDR));
            vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_RF_ETS_IPADDR));
            
            
            vc_accountingRecordNumber := mw_accounting_Record_Number(3);
            vc_accountingRecordNumber := mw_accounting_Record_Number_AVP(3);
            
            
            vc_send_hopid:=hex2int('00000100'H);
            vc_send_hopid:=hex2int('00000100'H);
            vc_send_endid:=hex2int('01000000'H);
            vc_send_endid:=hex2int('01000000'H);
@@ -109,15 +109,16 @@
        //TODO check for 2nd Ro or Rf configuration!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        //TODO check for 2nd Ro or Rf configuration!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


        group RF{
        group RF{
            
            group TypeOfCharging{
            group TypeOfCharging{
                /**
                /**
                 * @desc Function used to send AC-Request and receive AC-Answer
                 * @desc Function used to send AC-Request and receive AC-Answer
                 * @param p_art        accounting record type - EVENT_E,START_E,INTERIM_E,STOP_E
                 * @param p_art        accounting record type - EVENT_E,START_E,INTERIM_E,STOP_E
                 *        p_acc_rec_nr acc record number
                 *        p_cC_Request_Number acc record number
                 *        p_ts         timestamp of event
                 *        p_ts         timestamp of event
                 * @verdict depend on receive message and its matching with template
                 * @verdict depend on receive message and its matching with template
                 */
                 */
                function f_sendACR_awaitACA_(in Acc_Record_Type p_art, in UInt32 p_acc_rec_nr, in UInt32 p_ts) runs on DiameterComponent
                function f_sendACR_awaitACA_(in Acc_Record_Type p_art, in UInt32 p_cC_Request_Number, in UInt32 p_ts) runs on DiameterComponent
                {
                {
                    f_send_ACR(
                    f_send_ACR(
                       md_aCR(
                       md_aCR(
@@ -129,7 +130,7 @@
                                   p_art
                                   p_art
                               ),
                               ),
                               m_accounting_Record_Number(    // containing an Accounting-Record-Number AVP
                               m_accounting_Record_Number(    // containing an Accounting-Record-Number AVP
                                   p_acc_rec_nr               //     indicating the value 
                                   p_cC_Request_Number               //     indicating the value 
                               ),
                               ),
                               m_event_timestamp(p_ts),
                               m_event_timestamp(p_ts),
                               m_Service_Information_RF_CDF_TC 
                               m_Service_Information_RF_CDF_TC 
@@ -146,19 +147,79 @@
                               ),
                               ),
                               vc_originHost,                  // containing an Origin-Host AVP
                               vc_originHost,                  // containing an Origin-Host AVP
                               vc_originRealm,                 // containing an Origin-Realm AVP
                               vc_originRealm,                 // containing an Origin-Realm AVP
                               mw_accounting_Record_Type(      // containing an Accounting-Record-Type AVP
                               mw_accounting_Record_Type_AVP(  // containing an Accounting-Record-Type AVP
                                   p_art
                                   p_art
                               ),
                               ),
                               mw_accounting_Record_Number(    // containing an Acct-Application-Id AVP
                               mw_accounting_Record_Number_AVP(// containing an Acct-Application-Id AVP
                                  p_acc_rec_nr                 //     indicating the value
                                  p_cC_Request_Number                 //     indicating the value
                               )
                               )
                       ))
                       ))
                   );
                   );
                }
                }


            }//End group TypeOfCharging
            } // End of group TypeOfCharging

        } // End of group RF

        group RO {
            
            group TypeOfCharging {
                
                /**
                 * @desc Function used to send CC-Request and receive CC-Answer
                 * @param CC_Request_Ty_Type accounting record type - EVENT_REQUEST
                 *        p_cC_Request_Number acc   record number
                 *        p_ts               timestamp of event
                 * @verdict depend on receive message and its matching with template
                 */
                function f_sendCCR_awaitCCA_(
                                             in CC_Request_Ty_Type p_cC_Request_Ty_Type, 
                                             in UInt32 p_cC_Request_Number
                ) runs on DiameterComponent {
                    f_send_CCR(
                        md_cCR(
                            vc_sessionId, 
                            md_ccrBodyAvps_TypeOfCharging(
                                vc_originHost,
                                vc_originRealm,
                                vc_destinationRealm,
                                md_cC_Request_Type_AVP(
                                    p_cC_Request_Ty_Type
                                ),
                                md_cC_Request_Number_AVP(
                                    p_cC_Request_Number
                                ),
                                m_service_Context_Id(
                                    "ContextId" // FIXME Use a PIXIT?
                                )
                           )
                       )
                   );
                   
                   f_awaiting_CCA(
                       mdw_cCA( 
                           vc_sessionId,
                           mdw_ccaBodyAvps(
                               mw_resultCode(
                                   DIAMETER_SUCCESS_E
                               ),
                               vc_originHost,
                               vc_originRealm,
                               mw_auth_Application_Id_AVP(4),
                               mw_cC_Request_Type_AVP(
                                   p_cC_Request_Ty_Type
                               ),
                               mw_accounting_Record_Number_AVP(
                                  p_cC_Request_Number
                               )
                           )
                       )
                   );
                }
                
            } // End of group TypeOfCharging
            
            
        }//End group RF
        } // End of group RO
        
        
    } // Endgroup GlobalSteps
    } // Endgroup GlobalSteps


+257 −58

File changed.

Preview size limit exceeded, changes collapsed.

+268 −74

File changed.

Preview size limit exceeded, changes collapsed.

+171 −0
Original line number Original line Diff line number Diff line
@@ -1027,6 +1027,177 @@ module DiameterRfRo_TestCases
                    
                    
                } // End of testcase TC_RO_OCF_TC_01
                } // End of testcase TC_RO_OCF_TC_01
                
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Event] with price enquiry due to Immediate Event Charging
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a Cost-Information AVP
                 *                    containing a Unit-Value AVP
                 *                        containing a Value-Digits AVP
                 *                    containing a Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI DTS/INT 00121-2 V0.0.7 (2015-09) TP_RO_OCF_TC_02
                 */
                testcase TC_RO_OCF_TC_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_02()); 
                    
                    // 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_TC_02
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Event] with check balance due to Immediate Event Charging
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating CHECK BALANCE
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a Remaining-Balance AVP
                 *                    containing a Unit-Value AVP
                 *                        containing a Value-Digits AVP
                 *                    containing a Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI DTS/INT 00121-2 V0.0.7 (2015-09) TP_RO_OCF_TC_03
                 */
                testcase TC_RO_OCF_TC_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_03()); 
                    
                    // 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_TC_03
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Event] with refund account due to Immediate Event Charging
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating REFUND ACCOUNT
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating refunded units
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI DTS/INT 00121-2 V0.0.7 (2015-09) TP_RO_OCF_TC_04
                 */
                testcase TC_RO_OCF_TC_04() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_04()); 
                    
                    // 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_TC_04
                
            } // End of group TP_RO_OCF_TC
            } // End of group TP_RO_OCF_TC
            // 5.2.3.1.4 Error Casses 
            // 5.2.3.1.4 Error Casses 
            group TP_RO_OCF_EC {
            group TP_RO_OCF_EC {
+12 −0
Original line number Original line Diff line number Diff line
@@ -40,6 +40,18 @@ module DiameterRfRo_TestControl {
            }
            }
        }
        }
        
        
        if (PICS_RO_OCF_IUT) {
            execute(TC_RO_OCF_MS_01());
            execute(TC_RO_OCF_MS_02());
            
            if (PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING) {
                execute(TC_RO_OCF_TC_01());
                execute(TC_RO_OCF_TC_02());
                execute(TC_RO_OCF_TC_03());
                execute(TC_RO_OCF_TC_04());
            }
        }
        
    } // End of 'Control' statement
    } // End of 'Control' statement


} // End of module DiameterRfRo_TestControl 
} // End of module DiameterRfRo_TestControl 
 No newline at end of file