Commit 4ea333db authored by juvancic's avatar juvancic
Browse files

added new tests for AMF PDU session managementProcedures TPs

parent 228243c0
Loading
Loading
Loading
Loading
+169 −0
Original line number Diff line number Diff line
@@ -1181,6 +1181,175 @@ module NGAP_TCFunctions {
            } // End of group PDU_Session_Resource_Notify
            //8.2.5
            group PDU_Session_Resource_Modify_Indication{

              /**
               * @desc Testcase function for TC_NGAP_AMF_PDU_04
               */
               function f_TC_NGAP_AMF_PDU_04() runs on gNBNGAPComponent {
                   // Local variables

                   // Preamble
                   f_NGAP_gnb_init();
                   f_NGAP_gnb_UE_Register();
                   f_NGAP_gnb_UE_PDU_ResourceSetup();

                   f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

                   // Body
                   f_send_NGAP_PDU(
                     m_ngap_initMsg(
                       m_n2_PDUSessionResourceModifyIndication(
                         PX_AMF_UE_NGAP_ID,//template (present) AMF_UE_NGAP_ID p_amfUeNgapID := ?,
                         PX_RAN_UE_NGAP_ID,//template (present) RAN_UE_NGAP_ID p_ranUeNgapID := ?,
                         {  
                            m_pDUSessionResourceModifyItemModInd(
                                PX_PDU_SESSION_ID,//template (present) PDUSessionID p_pDUSessionID := ?,
                                bit2oct(encvalue(
                                  m_pDUSessionResourceModifyIndicationTransfer(
                                    m_qosFlowPerTNLInformation(
                                      m_uPTransportLayerInformation_gTPTunnel(
                                        m_gTPTunnel(
                                          PX_TRANSPORT_LAYER_ADDRESS,
                                          PX_GTP_TEID,
                                          omit
                                        )
                                      ),
                                      {
                                        m_associatedQosFlowItem(
                                          PX_QOS_FLOW_IDENTIFIER,
                                          omit,
                                          omit
                                        )
                                      },//in template (value) AssociatedQosFlowList p_associatedQosFlowList,                
                                      omit//in template (omit) QosFlowPerTNLInformation.iE_Extensions p_iE_Extensions := omit
                                    ),//template (present) QosFlowPerTNLInformation p_dLQosFlowPerTNLInformation := ?,
                                    omit,//template QosFlowPerTNLInformationList p_additionalDLQosFlowPerTNLInformation := *,                
                                    omit//template PDUSessionResourceModifyIndicationTransfer.iE_Extensions p_iE_Extensions := *
                                ))),
                                omit//template PDUSessionResourceModifyItemModRes.iE_Extensions p_iE_Extensions := *
                              ) 
                         }
                        )
                     )
                   );

                  //  f_recv_NGAP_PDU(
                  //    mw_ngap_succMsg(
                  //     ? //FIXME missing template mw_n2_PDUSessionResourceFailedToModifyListModCfm
                  //     //  mw_n2_PDUSessionResourceModifyConfirm(
                  //     //     PX_AMF_UE_NGAP_ID,
                  //     //     PX_RAN_UE_NGAP_ID,
                  //     //     {
                  //     //       mw_pDUSessionResourceModifyItemModCfm(
                  //     //         PX_PDU_SESSION_ID,
                  //     //         ?,//mw_pDUSessionResourceModifyConfirmTransfer(
                  //     //           //    ?,//template (present) QosFlowModifyConfirmList p_qosFlowModifyConfirmList := ?,
                  //     //           //    ?,//template (present) UPTransportLayerInformation p_uLNGU_UP_TNLInformation := ?,
                  //     //           //    -,//template UPTransportLayerInformationPairList p_additionalNG_UUPTNLInformation := *,
                  //     //           //    -,//template QosFlowListWithCause p_qosFlowFailedToModifyList := *,
                  //     //           //    -//template PDUSessionResourceModifyConfirmTransfer.iE_Extensions p_iE_Extensions := *
                  //     //           //  ), OCTETSTRING
                  //     //         -//template PDUSessionResourceModifyItemModCfm.iE_Extensions p_iE_Extensions := *
                  //     //       ) 
                  //     //     }
                  //     //  )
                  //    )
                  //  );

                   f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                   // Postamble
                   f_postamble_NGAP_AMF();
                   f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");

                } // End of function f_TC_NGAP_AMF_PDU_04

              /**
               * @desc Testcase function for TC_NGAP_AMF_PDU_05
               */
               function f_TC_NGAP_AMF_PDU_05() runs on gNBNGAPComponent {
                   // Local variables

                   // Preamble
                   f_NGAP_gnb_init();
                   f_NGAP_gnb_UE_Register();
                   f_NGAP_gnb_UE_PDU_ResourceSetup();

                   f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

                   // Body
                   f_send_NGAP_PDU(
                     m_ngap_initMsg(
                       m_n2_PDUSessionResourceModifyIndication(
                         PX_AMF_UE_NGAP_ID,//template (present) AMF_UE_NGAP_ID p_amfUeNgapID := ?,
                         PX_RAN_UE_NGAP_ID,//template (present) RAN_UE_NGAP_ID p_ranUeNgapID := ?,
                         {  
                            ( 
                              m_pDUSessionResourceModifyItemModInd(
                                PX_PDU_SESSION_ID,//template (present) PDUSessionID p_pDUSessionID := ?,
                                bit2oct(encvalue(
                                  m_pDUSessionResourceModifyIndicationTransfer(
                                    m_qosFlowPerTNLInformation(
                                      m_uPTransportLayerInformation_gTPTunnel(
                                        m_gTPTunnel(
                                          PX_TRANSPORT_LAYER_ADDRESS,
                                          PX_GTP_TEID,
                                          omit
                                        )
                                      ),
                                      {
                                        m_associatedQosFlowItem(
                                          PX_QOS_FLOW_IDENTIFIER,
                                          omit,
                                          omit
                                        )
                                      },//in template (value) AssociatedQosFlowList p_associatedQosFlowList,                
                                      omit//in template (omit) QosFlowPerTNLInformation.iE_Extensions p_iE_Extensions := omit
                                    ),//template (present) QosFlowPerTNLInformation p_dLQosFlowPerTNLInformation := ?,
                                    omit,//template QosFlowPerTNLInformationList p_additionalDLQosFlowPerTNLInformation := *,                
                                    omit//template PDUSessionResourceModifyIndicationTransfer.iE_Extensions p_iE_Extensions := *
                                ))),
                                omit//template PDUSessionResourceModifyItemModRes.iE_Extensions p_iE_Extensions := *
                              ) 
                            )
                         }
                        )
                     )
                   );

                   f_recv_NGAP_PDU(
                     mw_ngap_succMsg(
                       mw_n2_PDUSessionResourceModifyConfirm(
                          PX_AMF_UE_NGAP_ID,
                          PX_RAN_UE_NGAP_ID,
                          { *
                            // mw_pDUSessionResourceFailedToModifyItemModCfm(
                            //    PX_PDU_SESSION_ID,
                            //    ?,//mw_pDUSessionResourceModifyIndicationUnsuccessfulTransfer(
                            //      //  ?,//template (present) Cause p_cause := ?,
                            //      //  -//template PDUSessionResourceModifyIndicationUnsuccessfulTransfer.iE_Extensions p_iE_Extensions := *
                            //      //),OCTETSTRING
                            //    *//template PDUSessionResourceFailedToModifyItemModCfm.iE_Extensions p_iE_Extensions := *
                            // )
                          }
                       )
                     )
                   );

                   f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                   // Postamble
                   f_postamble_NGAP_AMF();
                   f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                   log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");

                } // End of function f_TC_NGAP_AMF_PDU_05

            } // End of group PDU_Session_Resource_Modify_Indication
        } // End of group PDU_Session_Management_Procedures
        //8.3
+55 −0
Original line number Diff line number Diff line
@@ -754,6 +754,61 @@ module NGAP_TestCases {
            } // End of group PDU_Session_Resource_Notify
            //8.2.5
            group PDU_Session_Resource_Modify_Indication{

                /**
                 * @desc "Verify that the AMF node successfully processes a  PDU_SESSION_RESOURCE_MODIFY_INDICATION contains mandatory IEs and answers with PDU_SESSION_RESOURCE_MODIFY_CONFIRM for successfully modified PDU session."
                 */
                testcase TC_NGAP_AMF_PDU_04() runs on gNBNGAPComponent system TestAdapter {

                    // Local variables
                    var gNBNGAPComponent v_ngap_gnb;

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

                    // Test component configuration
                    f_cf_NGAP_gNB_Up(v_ngap_gnb);

                    // Start
                    v_ngap_gnb.start(f_TC_NGAP_AMF_PDU_04());

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

                    f_cf_Down/*gNBoraMF*/();

                } // End of testcase TC_NGAP_AMF_PDU_04

                /**
                 * @desc "Verify that the AMF node processes a  PDU_SESSION_RESOURCE_MODIFY_INDICATION contains mandatory IEs and answers with PDU_SESSION_RESOURCE_MODIFY_CONFIRM for not successfully modified PDU session."
                 */
                testcase TC_NGAP_AMF_PDU_05() runs on gNBNGAPComponent system TestAdapter {

                    // Local variables
                    var gNBNGAPComponent v_ngap_gnb;

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

                    // Test component configuration
                    f_cf_NGAP_gNB_Up(v_ngap_gnb);

                    // Start
                    v_ngap_gnb.start(f_TC_NGAP_AMF_PDU_05());

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

                    f_cf_Down/*gNBoraMF*/();

                } // End of testcase TC_NGAP_AMF_PDU_05

            } // End of group PDU_Session_Resource_Modify_Indication
        } // End of group PDU_Session_Management_Procedures
        //8.3