Commit 4d6b2f86 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in templates; Add skeleton for NAS TCs

parent 0f0be8b1
Loading
Loading
Loading
Loading
+66 −0
Original line number Original line Diff line number Diff line
@@ -1875,15 +1875,81 @@ module NGAP_TCFunctions {
        group Transport_of_NAS_Messages_Procedures{
        group Transport_of_NAS_Messages_Procedures{
            //8.6.1
            //8.6.1
            group Initial_UE_Message{
            group Initial_UE_Message{

              function f_TC_NGAP_GNB_NAS_01() runs on aMFNGAPComponent {
                // Local variables

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

                // Body

                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_NAS_01

            } // End of group Initial_UE_Message
            } // End of group Initial_UE_Message
            //8.6.2
            //8.6.2
            group Downlink_NAS_Transport{
            group Downlink_NAS_Transport{
            } // End of group Downlink_NAS_Transport
            } // End of group Downlink_NAS_Transport
            //8.6.3
            //8.6.3
            group Uplink_NAS_Transport{
            group Uplink_NAS_Transport{

              function f_TC_NGAP_GNB_NAS_02() runs on aMFNGAPComponent {
                // Local variables

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

                // Body

                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_NAS_02

            } // End of group Uplink_NAS_Transport
            } // End of group Uplink_NAS_Transport
            //8.6.4
            //8.6.4
            group NAS_Non_Delivery_Indication{
            group NAS_Non_Delivery_Indication{

              function f_TC_NGAP_GNB_NAS_03() runs on aMFNGAPComponent {
                // Local variables

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

                // Body

                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_NAS_03

            } // End of group NAS_Non_Delivery_Indication
            } // End of group NAS_Non_Delivery_Indication
            //8.6.5
            //8.6.5
            group Rerout_NAS_Request{
            group Rerout_NAS_Request{
+84 −0
Original line number Original line Diff line number Diff line
@@ -959,15 +959,99 @@ module NGAP_TestCases {
        group Transport_of_NAS_Messages_Procedures{
        group Transport_of_NAS_Messages_Procedures{
            //8.6.1
            //8.6.1
            group Initial_UE_Message{
            group Initial_UE_Message{

                /**
                 * @desc Verify that the IUT can send an INITIAL UE MESSAGE to indicate the initiation of a NAS Transport procedure.
                 */
                testcase TC_NGAP_GNB_NAS_01() runs on aMFNGAPComponent system TestAdapter {

                    // Local variables
                    var aMFNGAPComponent v_ngap_amf;

                    // Test control
                    if ((not PICS_NGAP_GNB_IUT) and (not PICS_A3_5_1)){
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_NGAP_GNB_IUT and PICS_A3_5_1' 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_NAS_01());

                    // 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_NAS_01

            } // End of group Initial_UE_Message
            } // End of group Initial_UE_Message
            //8.6.2
            //8.6.2
            group Downlink_NAS_Transport{
            group Downlink_NAS_Transport{
            } // End of group Downlink_NAS_Transport
            } // End of group Downlink_NAS_Transport
            //8.6.3
            //8.6.3
            group Uplink_NAS_Transport{
            group Uplink_NAS_Transport{

                /**
                 * @desc Verify that the IUT can send an UPLINK NAS TRANSPORT message to the AMF.
                 */
                testcase TC_NGAP_GNB_NAS_02() runs on aMFNGAPComponent system TestAdapter {

                    // Local variables
                    var aMFNGAPComponent v_ngap_amf;

                    // Test control
                    if ((not PICS_NGAP_GNB_IUT) and (not PICS_A3_5_1)){
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_NGAP_GNB_IUT and PICS_A3_5_1' 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_NAS_02());

                    // 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_NAS_02

            } // End of group Uplink_NAS_Transport
            } // End of group Uplink_NAS_Transport
            //8.6.4
            //8.6.4
            group NAS_Non_Delivery_Indication{
            group NAS_Non_Delivery_Indication{

                /**
                 * @desc Verify that the IUT can send a NAS NON DELIVERY INDICATION message to the AMF.
                 */
                testcase TC_NGAP_GNB_NAS_03() runs on aMFNGAPComponent system TestAdapter {

                    // Local variables
                    var aMFNGAPComponent v_ngap_amf;

                    // Test control
                    if ((not PICS_NGAP_GNB_IUT) and (not PICS_A3_5_1)){
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_NGAP_GNB_IUT and PICS_A3_5_1' 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_NAS_03());

                    // 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_NAS_03

            } // End of group NAS_Non_Delivery_Indication
            } // End of group NAS_Non_Delivery_Indication
            //8.6.5
            //8.6.5
            group Rerout_NAS_Request{
            group Rerout_NAS_Request{
+6 −1
Original line number Original line Diff line number Diff line
@@ -1118,7 +1118,12 @@ module LibNGAP_Templates {
                        template (present) InitiatingMessage mw_n2_InitialContextSetupRequest(
                        template (present) InitiatingMessage mw_n2_InitialContextSetupRequest(
                                                                                              template (present) AMF_UE_NGAP_ID p_amfUeNgapID := ?,
                                                                                              template (present) AMF_UE_NGAP_ID p_amfUeNgapID := ?,
                                                                                              template (present) RAN_UE_NGAP_ID p_ranUeNgapID := ?,
                                                                                              template (present) RAN_UE_NGAP_ID p_ranUeNgapID := ?,
                                                                                              template (present) PDUSessionResourceSetupListCxtReq p_pDUSessionResourceSetupListCxtReq := ?
                                                                                              template (present) GUAMI p_gUAMI := ?,
                                                                                              template (present) PDUSessionResourceSetupListCxtReq p_pDUSessionResourceSetupListCxtReq := ?,
                                                                                              template (present) AllowedNSSAI p_allowedNSSAI := ?,
                                                                                              template (present) UESecurityCapabilities p_uESecurityCapabilities := ?,
                                                                                              template (present) SecurityKey p_nextHopNH := ?,
                                                                                              template (present) TraceActivation p_traceActivation := ?
                                                                                              ) := {
                                                                                              ) := {
                            procedureCode := id_InitialContextSetup,
                            procedureCode := id_InitialContextSetup,
                            criticality   := reject,
                            criticality   := reject,