Commit e3c32662 authored by YannGarcia's avatar YannGarcia
Browse files

Add RnisNotifications tests for RAB

parent 493d2b37
Loading
Loading
Loading
Loading
+14 −1
Original line number Original line Diff line number Diff line
@@ -23,8 +23,21 @@ This file provides the list of the TODOs related to the STF 569.


Draft ETSI GS MEC 012 2.0.4
Draft ETSI GS MEC 012 2.0.4


https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisAllSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisAllubscription_BI_BO.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BI_BO.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2

- TC_MEC_SRV_RNIS_001_OK       <font color="color:green">To be tested</font>

- TC_MEC_SRV_RNIS_002_OK       <font color="color:green">To be tested</font>

- TC_MEC_SRV_RNIS_003_OK       <font color="color:green">To be tested</font>

- TC_MEC_SRV_RNIS_004_OK       <font color="color:green">To be tested</font>


- TC_MEC_SRV_RNIS_011_OK       <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_011_OK       <font color="color:green">To be tested</font>


+12 −0
Original line number Original line Diff line number Diff line
@@ -223,6 +223,18 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
    RnisAPI__TypesAndValues::PlmnInfo plmn_info;
    RnisAPI__TypesAndValues::PlmnInfo plmn_info;
    plmn_info.decode(RnisAPI__TypesAndValues::PlmnInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    plmn_info.decode(RnisAPI__TypesAndValues::PlmnInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.plmnInfo() = plmn_info;
    msg.plmnInfo() = plmn_info;
  } else if (it->second.find("\"RabEstSubscription\"") != std::string::npos) {
    RnisAPI__TypesAndValues::RabEstSubscription rab_est_subscription;
    rab_est_subscription.decode(RnisAPI__TypesAndValues::RabEstSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.rabEstSubscription() = rab_est_subscription;
  } else if (it->second.find("\"RabModSubscription\"") != std::string::npos) {
    RnisAPI__TypesAndValues::RabModSubscription rab_mod_subscription;
    rab_mod_subscription.decode(RnisAPI__TypesAndValues::RabModSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.rabModSubscription() = rab_mod_subscription;
  } else if (it->second.find("\"RabRelSubscription\"") != std::string::npos) {
    RnisAPI__TypesAndValues::RabRelSubscription rab_rel_subscription;
    rab_rel_subscription.decode(RnisAPI__TypesAndValues::RabRelSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.rabRelSubscription() = rab_rel_subscription;
  } else if (it->second.find("\"bwInfo\"") != std::string::npos) {
  } else if (it->second.find("\"bwInfo\"") != std::string::npos) {
    BwManagementAPI__TypesAndValues::BwInfo bw_info;
    BwManagementAPI__TypesAndValues::BwInfo bw_info;


+7 −1
Original line number Original line Diff line number Diff line
@@ -121,7 +121,13 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_NF
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_NF


AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_001_OK
AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_001_OK

#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_002_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_003_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_004_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_005_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_006_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_007_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_008_OK


#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
+191 −10
Original line number Original line Diff line number Diff line
@@ -147,7 +147,7 @@ module AtsMec_RnisAPI_TestCases {
                                                                                                                       m_cell_change_subscription(
                                                                                                                       m_cell_change_subscription(
                                                                                                                                                  PX_CALLBACK_REFERENCE,
                                                                                                                                                  PX_CALLBACK_REFERENCE,
                                                                                                                                                  PX_LINKS_SELF,
                                                                                                                                                  PX_LINKS_SELF,
                                                                                                                                                  m_filter_criteria(
                                                                                                                                                  m_filter_criteria_ho(
                                                                                                                                                                    "01",
                                                                                                                                                                    "01",
                                                                                                                                                                    { m_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) },
                                                                                                                                                                    { m_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) },
                                                                                                                                                                    m_plmn("01", "001"),
                                                                                                                                                                    m_plmn("01", "001"),
@@ -284,7 +284,7 @@ module AtsMec_RnisAPI_TestCases {
                                                                                                                       m_cell_change_subscription_wrong_subscription_type(
                                                                                                                       m_cell_change_subscription_wrong_subscription_type(
                                                                                                                                                                          PX_CALLBACK_REFERENCE,
                                                                                                                                                                          PX_CALLBACK_REFERENCE,
                                                                                                                                                                          PX_LINKS_SELF,
                                                                                                                                                                          PX_LINKS_SELF,
                                                                                                                                                                          m_filter_criteria(
                                                                                                                                                                          m_filter_criteria_ho(
                                                                                                                                                                                            "01",
                                                                                                                                                                                            "01",
                                                                                                                                                                                            { m_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) },
                                                                                                                                                                                            { m_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) },
                                                                                                                                                                                            m_plmn("01", "001"),
                                                                                                                                                                                            m_plmn("01", "001"),
@@ -376,10 +376,7 @@ module AtsMec_RnisAPI_TestCases {
                                                                                                                               -,
                                                                                                                               -,
                                                                                                                               {
                                                                                                                               {
                                                                                                                                 mw_cell_user_info(
                                                                                                                                 mw_cell_user_info(
                                                                                                                                                   mw_ecgi(
                                                                                                                                                   { *, mw_ecgi(mw_plmn, PX_CELL_ID), * }
                                                                                                                                                           mw_plmn,
                                                                                                                                                           PX_CELL_ID
                                                                                                                                                           )
                                                                                                                                                   )
                                                                                                                                                   )
                                                                                                                               }
                                                                                                                               }
                                                                                                                               )))))) {
                                                                                                                               )))))) {
@@ -1028,9 +1025,8 @@ module AtsMec_RnisAPI_TestCases {
  group rnis_notifications {
  group rnis_notifications {
    
    
    /**
    /**
     * @desc Check that the RNIS service sends an RNIS notification  about cell change if the RNIS service has an associated subscription and the event is generated
     * @desc Check that the RNIS service sends an RNIS notification  about cell change if the RNIS service has an associated subscription and the event is generated.
.
     * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
     * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2
     */
     */
    testcase TC_MEC_SRV_RNIS_001_OK() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_SRV_RNIS_001_OK() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        // Local variables
@@ -1059,7 +1055,7 @@ module AtsMec_RnisAPI_TestCases {
          [] httpPort_notif.receive(
          [] httpPort_notif.receive(
                                    mw_http_request(
                                    mw_http_request(
                                                    mw_http_request_post(
                                                    mw_http_request_post(
                                                                         -,
                                                                         PX_CALLBACK_URI,
                                                                         -,
                                                                         -,
                                                                         mw_http_message_body_json(
                                                                         mw_http_message_body_json(
                                                                                                   mw_body_json_cell_change_subscription(
                                                                                                   mw_body_json_cell_change_subscription(
@@ -1085,6 +1081,191 @@ module AtsMec_RnisAPI_TestCases {
        f_cf_01_http_notif_down();
        f_cf_01_http_notif_down();
    } // End of testcase TC_MEC_SRV_RNIS_001_OK
    } // End of testcase TC_MEC_SRV_RNIS_001_OK
    
    
    /**
     * @desc Check that the RNIS service sends an RNIS notification about RAB establishment if the RNIS service has an associated subscription and the event is generated.
     * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
     */
    testcase TC_MEC_SRV_RNIS_002_OK() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var HeaderLines v_headers;
        
        // Test control
        if (not(PICS_RNIS) or not(PICS_RNIS_NOTIFICATIONS)) {
            log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_NOTIFICATIONS required for executing the TC ***");
            setverdict(inconc);
            stop;
        }
        
        // Test component configuration
        f_cf_01_http_notif_up();
        
        // Test adapter configuration
        
        // Preamble
        f_init_default_headers_list(-, -, v_headers);
        action("Trigger a RabEstSubscription event");
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
        
        // Test Body
        tc_wait.start;
        alt {
          [] httpPort_notif.receive(
                                    mw_http_request(
                                                    mw_http_request_post(
                                                                         PX_CALLBACK_URI,
                                                                         -,
                                                                         mw_http_message_body_json(
                                                                                                   mw_body_json_rab_est_subscription(
                                                                                                                                     mw_rab_est_subscription(
                                                                                                                                                             PX_CALLBACK_REFERENCE,
                                                                                                                                                             PX_LINKS_SELF,
                                                                                                                                                             mw_filter_criteria_qci(
                                                                                                                                                                                    PX_APP_INS_ID, 
                                                                                                                                                                                    PX_E_RAB_ID, 
                                                                                                                                                                                    -, 
                                                                                                                                                                                    PX_QCI
                                                                                                                                                             ))))))) {
            tc_wait.stop;
            
            // Send 204 No Content
            httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers)));
            
            log("*** " & testcasename() & ": PASS: IUT successfully sends RAB establishment notification ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          }
          [] tc_wait.timeout {
            log("*** " & testcasename() & ": INCONC: Expected message not received ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
          }
        } // End of 'alt' statement
        
        // Postamble
        f_cf_01_http_notif_down();
    } // End of testcase TC_MEC_SRV_RNIS_002_OK
    
    /**
     * @desc Check that the RNIS service sends an RNIS notification about RAB modification if the RNIS service has an associated subscription and the event is generated.
     * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
     */
    testcase TC_MEC_SRV_RNIS_003_OK() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var HeaderLines v_headers;
        
        // Test control
        if (not(PICS_RNIS) or not(PICS_RNIS_NOTIFICATIONS)) {
            log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_NOTIFICATIONS required for executing the TC ***");
            setverdict(inconc);
            stop;
        }
        
        // Test component configuration
        f_cf_01_http_notif_up();
        
        // Test adapter configuration
        
        // Preamble
        f_init_default_headers_list(-, -, v_headers);
        action("Trigger a RabEstSubscription event");
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
        
        // Test Body
        tc_wait.start;
        alt {
          [] httpPort_notif.receive(
                                    mw_http_request(
                                                    mw_http_request_post(
                                                                         PX_CALLBACK_URI,
                                                                         -,
                                                                         mw_http_message_body_json(
                                                                                                   mw_body_json_rab_mod_subscription(
                                                                                                                                     mw_rab_mod_subscription(
                                                                                                                                                             PX_CALLBACK_REFERENCE,
                                                                                                                                                             PX_LINKS_SELF,
                                                                                                                                                             mw_filter_criteria_qci(
                                                                                                                                                                                    PX_APP_INS_ID, 
                                                                                                                                                                                    PX_E_RAB_ID, 
                                                                                                                                                                                    -, 
                                                                                                                                                                                    PX_QCI
                                                                                                                                                             ))))))) {
            tc_wait.stop;
            
            // Send 204 No Content
            httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers)));
            
            log("*** " & testcasename() & ": PASS: IUT successfully sends RAB modification notification ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          }
          [] tc_wait.timeout {
            log("*** " & testcasename() & ": INCONC: Expected message not received ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
          }
        } // End of 'alt' statement
        
        // Postamble
        f_cf_01_http_notif_down();
    } // End of testcase TC_MEC_SRV_RNIS_003_OK
    
    /**
     * @desc Check that the RNIS service sends an RNIS notification about RAB release if the RNIS service has an associated subscription and the event is generated.
     * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
     */
    testcase TC_MEC_SRV_RNIS_004_OK() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var HeaderLines v_headers;
        
        // Test control
        if (not(PICS_RNIS) or not(PICS_RNIS_NOTIFICATIONS)) {
            log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_NOTIFICATIONS required for executing the TC ***");
            setverdict(inconc);
            stop;
        }
        
        // Test component configuration
        f_cf_01_http_notif_up();
        
        // Test adapter configuration
        
        // Preamble
        f_init_default_headers_list(-, -, v_headers);
        action("Trigger a RabEstSubscription event");
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
        
        // Test Body
        tc_wait.start;
        alt {
          [] httpPort_notif.receive(
                                    mw_http_request(
                                                    mw_http_request_post(
                                                                         PX_CALLBACK_URI,
                                                                         -,
                                                                         mw_http_message_body_json(
                                                                                                   mw_body_json_rab_rel_subscription(
                                                                                                                                     mw_rab_rel_subscription(
                                                                                                                                                             PX_CALLBACK_REFERENCE,
                                                                                                                                                             PX_LINKS_SELF,
                                                                                                                                                             mw_filter_criteria_qci(
                                                                                                                                                                                    PX_APP_INS_ID, 
                                                                                                                                                                                    PX_E_RAB_ID, 
                                                                                                                                                                                    -, 
                                                                                                                                                                                    PX_QCI
                                                                                                                                                             ))))))) {
            tc_wait.stop;
            
            // Send 204 No Content
            httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers)));
            
            log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          }
          [] tc_wait.timeout {
            log("*** " & testcasename() & ": INCONC: Expected message not received ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
          }
        } // End of 'alt' statement
        
        // Postamble
        f_cf_01_http_notif_down();
    } // End of testcase TC_MEC_SRV_RNIS_004_OK
    
    
  } // End of group rnis_notifications 
  } // End of group rnis_notifications 
  
  
+3 −0
Original line number Original line Diff line number Diff line
@@ -92,6 +92,9 @@ module AtsMec_TestControl {
      }
      }
      if (PICS_RNIS_NOTIFICATIONS) {
      if (PICS_RNIS_NOTIFICATIONS) {
        execute(TC_MEC_SRV_RNIS_001_OK());
        execute(TC_MEC_SRV_RNIS_001_OK());
        execute(TC_MEC_SRV_RNIS_002_OK());
        execute(TC_MEC_SRV_RNIS_003_OK());
        execute(TC_MEC_SRV_RNIS_004_OK());
      }
      }
    }
    }


Loading