Commit 7addf1b9 authored by Steffen Ludtke's avatar Steffen Ludtke
Browse files

add new testcase, function and template for TC_NGAP_GNB_CMP_16 and TC_NGAP_GNB_CMP_17

parent 92eb0280
Loading
Loading
Loading
Loading
+77 −1
Original line number Original line Diff line number Diff line
@@ -1487,7 +1487,7 @@ module NGAP_TCFunctions {
                     	(
                     	(
                     		PX_AMF_UE_NGAP_ID,
                     		PX_AMF_UE_NGAP_ID,
                     		PX_RAN_UE_NGAP_ID,
                     		PX_RAN_UE_NGAP_ID,
                     		m_rRCState,
                     		mw_rRCState(inactive),
                     		?
                     		?
                     	) 
                     	) 
                     ));
                     ));
@@ -1561,9 +1561,85 @@ module NGAP_TCFunctions {
            } // End of group UE_Information_Transfer
            } // End of group UE_Information_Transfer
            //8.3.11
            //8.3.11
            group UE_Context_Suspend{
            group UE_Context_Suspend{
              
              /**
               * @desc Testcase function for f_TC_NGAP_GNB_CMP_16
               */
               function f_TC_NGAP_GNB_CMP_16() runs on aMFNGAPComponent {
                 
                   // Preamble
                   f_NGAP_amf_init();
                   f_NGAP_amf_UE_Register();
                   
                   // TODO: hasEstablishedInitialContext
                   
                   f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
                   
                   
                   // Body
          		   action("Trigger a UE context suspend request");
                		
                   f_recv_NGAP_PDU(
                     mw_ngap_initMsg(
                     	mw_n2_UEContextSuspendRequest_noPDUSession
                     	(                   		
                     		PX_AMF_UE_NGAP_ID,
                     		PX_RAN_UE_NGAP_ID
                     	) 
                     ));
                    
                   f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                   // Postamble
                   f_postamble_NGAP_gNB();
                   f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                   
               } // End of function f_TC_NGAP_GNB_CMP_16
               
            } // End of group UE_Context_Suspend
            } // End of group UE_Context_Suspend
            //8.3.12
            //8.3.12
            group UE_Context_Resume{
            group UE_Context_Resume{
              
              /**
               * @desc Testcase function for f_TC_NGAP_GNB_CMP_17
               */
               function f_TC_NGAP_GNB_CMP_17() runs on aMFNGAPComponent {
                 
                   // Preamble
                   f_NGAP_amf_init();
                   f_NGAP_amf_UE_Register();
                   
                   // TODO: hasSuspendedContext
                   
                   f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
                   
                   
                   // Body
          		   action("Trigger a UE context resume request");
                		
                   f_recv_NGAP_PDU(
                     mw_ngap_initMsg(
                     	mw_n2_UEContextResumeRequest
                     	(                   		
                     		PX_AMF_UE_NGAP_ID,
                     		PX_RAN_UE_NGAP_ID,
                     		?
                     	) 
                     ));
                    
                   f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                   // Postamble
                   f_postamble_NGAP_gNB();
                   f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                   
               } // End of function f_TC_NGAP_GNB_CMP_17
            } // End of group UE_Context_Resume
            } // End of group UE_Context_Resume
        } // End of group UE_Context_Management_Procedures
        } // End of group UE_Context_Management_Procedures
        //8.4
        //8.4
+55 −0
Original line number Original line Diff line number Diff line
@@ -703,9 +703,64 @@ module NGAP_TestCases {
            } // End of group UE_Information_Transfer
            } // End of group UE_Information_Transfer
            //8.3.11
            //8.3.11
            group UE_Context_Suspend{
            group UE_Context_Suspend{
              
               /**
                 * @desc Test objective "Verify that the IUT can send a UE CONTEXT SUSPEND REQUEST contains mandatory IEs"
                 */
                testcase TC_NGAP_GNB_CMP_16() runs on aMFNGAPComponent system TestAdapter {
                  
                  	// Local variables
                    var aMFNGAPComponent v_ngap_amf;

                    // Test control
                    if ((not PICS_NGAP_GNB_IUT) and (not PICS_A3_2_11)){
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_NGAP_GNB_IUT and PICS_A3_2_11' shall be set to true for executing the TC. ***");
                        stop;
                    }

                    // Test component configuration
                    f_cf_NGAP_aMF_Up(v_ngap_amf);

                    // Start
                    v_ngap_amf.start(f_TC_NGAP_GNB_CMP_16());

                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(1, {c_prDone, c_tbDone, c_poDone});

                    f_cf_Down/*gNBoraMF*/();
                  
                } // End of testcase TC_NGAP_GNB_CMP_16
            } // End of group UE_Context_Suspend
            } // End of group UE_Context_Suspend
            //8.3.12
            //8.3.12
            group UE_Context_Resume{
            group UE_Context_Resume{
              
              /**
                 * @desc Test objective "Verify that the IUT can send a UE CONTEXT RESUME REQUEST contains mandatory IEs"
                 */
                testcase TC_NGAP_GNB_CMP_17() runs on aMFNGAPComponent system TestAdapter {
                  
                  	// Local variables
                    var aMFNGAPComponent v_ngap_amf;

                    // Test control
                    if ((not PICS_NGAP_GNB_IUT) and (not PICS_A3_2_12){
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_NGAP_GNB_IUT and PICS_A3_2_12' shall be set to true for executing the TC. ***");
                        stop;
                    }

                    // Test component configuration
                    f_cf_NGAP_aMF_Up(v_ngap_amf);

                    // Start
                    v_ngap_amf.start(f_TC_NGAP_GNB_CMP_17());

                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(1, {c_prDone, c_tbDone, c_poDone});

                    f_cf_Down/*gNBoraMF*/();
                  
                } // End of testcase TC_NGAP_GNB_CMP_17
                
            } // End of group UE_Context_Resume
            } // End of group UE_Context_Resume
        } // End of group UE_Context_Management_Procedures
        } // End of group UE_Context_Management_Procedures
        //8.4
        //8.4
+27 −0
Original line number Original line Diff line number Diff line
@@ -2401,6 +2401,33 @@ module LibNGAP_Templates {
                                            }
                                            }
                        } // End of template mw_n2_UEContextSuspendRequest
                        } // End of template mw_n2_UEContextSuspendRequest
                        
                        
                         /**
                         * @see ETSI TS 138 413 V16.12.0 (2023-05) Clause 9.2.2.16 UE CONTEXT SUSPEND REQUEST
                         */
                        template (present) InitiatingMessage mw_n2_UEContextSuspendRequest_noPDUSession(
                                                                                           template (present) AMF_UE_NGAP_ID p_amfUeNgapID := ?,
                                                                                           template (present) RAN_UE_NGAP_ID p_ranUeNgapID := ?,
                                                                                           ) := {
                            procedureCode := id_UEContextSuspend,
                            criticality   := reject,
                            value_        := {
                                              UEContextSuspendRequest := {
                                                                          protocolIEs := {
                                                                                              {
                                                                                                  id := id_AMF_UE_NGAP_ID,
                                                                                                  criticality := reject,
                                                                                                  value_ := { AMF_UE_NGAP_ID := p_amfUeNgapID }
                                                                                              },
                                                                                              {
                                                                                                  id := id_RAN_UE_NGAP_ID,
                                                                                                  criticality := reject,
                                                                                                  value_ := { RAN_UE_NGAP_ID := p_ranUeNgapID }
                                                                                              }
                                                                                          }
                                                                         }
                                            }
                        } // End of template mw_n2_UEContextSuspendRequest_noPDUSession
                    } // End of group Receive
                    } // End of group Receive
                } // End of group UE_CONTEXT_SUSPEND_REQUEST
                } // End of group UE_CONTEXT_SUSPEND_REQUEST