Commit c615a5bb authored by Steffen Ludtke's avatar Steffen Ludtke
Browse files

new TC for TC_NGAP_GNB_CMP_10, TC_NGAP_GNB_CMP_11, TC_NGAP_GNB_CMP_12

parent 8dc54a25
Loading
Loading
Loading
Loading
+175 −0
Original line number Original line Diff line number Diff line
@@ -1272,6 +1272,181 @@ module NGAP_TCFunctions {
            } // End of group UE_Context_Release_AMF_initiated
            } // End of group UE_Context_Release_AMF_initiated
            //8.3.4
            //8.3.4
            group UE_Context_Modification{
            group UE_Context_Modification{
              
              
              /**
               * @desc Testcase function for f_TC_NGAP_GNB_CMP_10
               */
               function f_TC_NGAP_GNB_CMP_10() runs on aMFNGAPComponent {
                 
                   // Preamble
                   f_NGAP_amf_init();
                   f_NGAP_amf_UE_Register();
                   f_NGAP_amf_UE_NoLongerAvailable();
                   f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
                   
                   
                   // Body
                   f_send_NGAP_PDU(
                   	m_ngap_initMsg(
                   		m_n2_UEContextModificationRequest 
                   		(
                   			-,
                   			-	
                   		)));
                   		
                   		
                   f_recv_NGAP_PDU(
                     mw_ngap_unsuccMsg(
                     	mw_n2_UEContextModificationFailure
                     	(
                     		-,
                     		-,
                     		-
                     	)
                     ));
                     
                   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_10
              
              
              /**
               * @desc Testcase function for f_TC_NGAP_GNB_CMP_11
               */
               function f_TC_NGAP_GNB_CMP_11() runs on aMFNGAPComponent {
                 
                   // Preamble
                   
                   // TODO: alreadyPreparedHandover
                   
                   f_NGAP_amf_init();
                   f_NGAP_amf_UE_Register();
                   f_NGAP_amf_UE_PDU_ResourceSetup();
                   f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
                   
                   
                   // Body
                   f_send_NGAP_PDU(
                   	m_ngap_initMsg(
                   		m_n2_UEContextModificationRequest 
                   		(
                   			-,
                   			-	
                   		)));
                   		
                   		
                   f_recv_NGAP_PDU(
                     mw_ngap_succMsg(
                     	mw_n2_UEContexModificationResponse
                     ));
                     
                   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_11
              
              
              /**
               * @desc Testcase function for f_TC_NGAP_GNB_CMP_12
               */
               function f_TC_NGAP_GNB_CMP_12() runs on aMFNGAPComponent {
                 
                   // Preamble
                   
                   // TODO: hasEstablishedInitialContext
                   
                   f_NGAP_amf_init();
                   f_NGAP_amf_UE_Register();
                   f_NGAP_amf_UE_PDU_ResourceSetup();
                   f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
                   
                   
                   // Body
       				f_send_NGAP_PDU(
                   		m_ngap_initMsg(
                     		m_n2_UEContextModificationRequest_optional1 
                     		(
                     			-,
                     			-, 
                     			-, 
                     			m_uESecurityCapabilities	
                     		)));
                   
                   		
                   		
                   f_recv_NGAP_PDU(
                     mw_ngap_succMsg(
                     	mw_n2_UEContexModificationResponse
                     ));
                    
                   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_12
              
              
              /**
               * @desc Testcase function for f_TC_NGAP_GNB_CMP_13
               */
               function f_TC_NGAP_GNB_CMP_13() runs on aMFNGAPComponent {
                 
                   // Preamble
                   f_NGAP_amf_init();
                   f_NGAP_amf_UE_Register();
                   f_NGAP_amf_UE_PDU_ResourceSetup();
                   f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
                   
                   
                   // Body
           /*        f_send_NGAP_PDU(
                   	m_ngap_initMsg(
                   		m_n2_UEContextReleaseCommand 
                   		(	
                   			m_uE_NGAP_IDs_aMF_UE_NGAP_ID
                   			(
                   				-
                   			),
                   			-
                   		)));
                   		
                   		
                   f_recv_NGAP_PDU(
                     mw_ngap_succMsg(
                     	mw_n2_UEContextReleaseComplete
                     ));
                    */
                   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_13
              
              
            } // End of group UE_Context_Modification
            } // End of group UE_Context_Modification
            //8.3.5
            //8.3.5
            group RRC_Inactive_Transition_Report{
            group RRC_Inactive_Transition_Report{
+113 −0
Original line number Original line Diff line number Diff line
@@ -586,6 +586,119 @@ module NGAP_TestCases {
            } // End of group UE_Context_Release_AMF_initiated
            } // End of group UE_Context_Release_AMF_initiated
            //8.3.4
            //8.3.4
            group UE_Context_Modification{
            group UE_Context_Modification{
              
              /**
                 * @desc Test objective "Verify that the NG-RAN node successfully processes a UE CONTEXT MODIFICATION REQUEST contains mandatory IEs and answers with UE CONTEXT MODIFICATION FAILURE because the UE is no longer available."
                 */
                testcase TC_NGAP_GNB_CMP_10() 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_4)){
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_NGAP_GNB_IUT and PICS_A3_2_4' 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_10());

                    // 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_10
              
              
              /**
                 * @desc Test objective "Verify that the NG-RAN node successfully processes a UE CONTEXT MODIFICATION REQUEST contains mandatory IEs   and answers with UE CONTEXT MODIFICATION RESPONSE with successfully modify UE context."
                 */
                testcase TC_NGAP_GNB_CMP_11() 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_4)){
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_NGAP_GNB_IUT and PICS_A3_2_4' 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_11());

                    // 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_11
              
              
              /**
                 * @desc Test objective "Verify that the NG-RAN node successfully processes a UE CONTEXT MODIFICATION REQUEST contains optional fields Security Key and Security Capabilities and answers with UE CONTEXT MODIFICATION RESPONSE with successfully modify UE context."
                 */
                testcase TC_NGAP_GNB_CMP_12() 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_4)){
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_NGAP_GNB_IUT and PICS_A3_2_4' 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_12());

                    // 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_12
              
              
              /**
                 * @desc Test objective "Verify that the NG-RAN node successfully processes a UE CONTEXT MODIFICATION REQUEST contains different optional fields and answers with UE CONTEXT MODIFICATION RESPONSE with successfully modify UE context."
                 */
                testcase TC_NGAP_GNB_CMP_13() 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_4)){
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_NGAP_GNB_IUT and PICS_A3_2_4' 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_13());

                    // 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_13
              
              
            } // End of group UE_Context_Modification
            } // End of group UE_Context_Modification
            //8.3.5
            //8.3.5
            group RRC_Inactive_Transition_Report{
            group RRC_Inactive_Transition_Report{
+40 −0
Original line number Original line Diff line number Diff line
@@ -1620,6 +1620,46 @@ module LibNGAP_Templates {
                                            }
                                            }
                        } // End of template m_n2_UEContextModificationRequest
                        } // End of template m_n2_UEContextModificationRequest
                        
                        
                        
                        /**
                         * @see ETSI TS 138 413 V16.12.0 (2023-05) Clause 9.2.2.7 UE CONTEXT MODIFICATION REQUEST
                         */
                        template (value) InitiatingMessage m_n2_UEContextModificationRequest_optional1(
                                                                                             in template (value) AMF_UE_NGAP_ID p_amfUeNgapID := PX_AMF_UE_NGAP_ID,
                                                                                             in template (value) RAN_UE_NGAP_ID p_ranUeNgapID := PX_RAN_UE_NGAP_ID,
                                                                                             in template (value) SecurityKey p_nextHopNH := PX_NEXT_HOP_NH,
                                                                                             in template (value) UESecurityCapabilities p_uESecurityCapabilities,
                                                                                             ) := {
                            procedureCode := id_UEContextModification,
                            criticality   := reject,
                            value_        := {
                                              UEContextModificationRequest := {
                                                                               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 }
                                                                                               },
                                                                                               {
                                                                                                   	id := id_SecurityKey,
                                                                                                   	criticality := reject,
                                                                                                   	value_ := { SecurityKey := p_nextHopNH }
                                                                                               },
                                                                                               {
                                                                                               	 	id := id_UESecurityCapabilities,
                                                                                                 	criticality := reject,
                                                                                                 	value_ := { UESecurityCapabilities := p_uESecurityCapabilities }
                                                                                               }
                                                                                              }
                                                                               }
                                            }
                        } // End of template m_n2_UEContextModificationRequest
                    } // End of group Send
                    } // End of group Send
                    group Receive {
                    group Receive {