Commit c75b80b6 authored by YannGarcia's avatar YannGarcia
Browse files

Add RNI tests

parent 33239901
Loading
Loading
Loading
Loading
+24 −5
Original line number Original line Diff line number Diff line
@@ -59,7 +59,16 @@ https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes


### FAIS
### FAIS


### RLOC
### RLOCLOOK

ETSI GS MEC 013 V1.5.0

https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList

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

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



### RNIS
### RNIS


@@ -81,6 +90,16 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purpo


- TC_MEC_SRV_RNIS_004_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_005_OK       <font color="color:green">To be tested</font>

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

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

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

- TODO TC_MEC_SRV_RNIS_009_OK & TC_MEC_SRV_RNIS_010_OK

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


- TC_MEC_SRV_RNIS_012_OK       <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_012_OK       <font color="color:green">To be tested</font>
@@ -189,17 +208,17 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20


- TC_MEC_SRV_UEINFSUB_002_NF   <font color="color:yellow">To be tested</font>
- TC_MEC_SRV_UEINFSUB_002_NF   <font color="color:yellow">To be tested</font>


### UELOC
### UELOCLOOK


Draft ETSI GS MEC 013 V2.0.3 (2018-10)
Draft ETSI GS MEC 013 V2.0.3 (2018-10)


https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2


- TC_MEC_SRV_UELOC_001_OK   <font color="color:green">Done</font>
- TC_MEC_SRV_UELOCLOOK_001_OK   <font color="color:green">Done</font>


- TC_MEC_SRV_UELOC_001_BR   <font color="color:yellow">To be tested</font>
- TC_MEC_SRV_UELOCLOOK_001_BR   <font color="color:yellow">To be tested</font>


- TC_MEC_SRV_UELOC_001_NF   <font color="color:yellow">To be tested</font>
- TC_MEC_SRV_UELOCLOOK_001_NF   <font color="color:yellow">To be tested</font>


### UELOCSUB
### UELOCSUB


+3 −5
Original line number Original line Diff line number Diff line
@@ -78,7 +78,7 @@ group grant {
        alt {
        alt {
            [] httpPort.receive(
            [] httpPort.receive(
                mw_http_response(
                mw_http_response(
                    mw_http_response_ok(
                    mw_http_response_201_created(
                        mw_http_message_body_json(
                        mw_http_message_body_json(
                            mw_body_json_grant_response(
                            mw_body_json_grant_response(
                                mw_grant_response(
                                mw_grant_response(
@@ -87,11 +87,9 @@ group grant {
          ))))) -> value v_response {
          ))))) -> value v_response {
          tc_ac.stop;
          tc_ac.stop;
          
          
          if (v_response.response.statuscode == 201) {
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response ***");
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        }
        }
        [] tc_ac.timeout {
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
+7 −7
Original line number Original line Diff line number Diff line
@@ -38,7 +38,7 @@ module AtsMec_LocationAPI_TestCases {
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
     * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
     * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
     */
     */
    testcase TC_MEC_SRV_UELOC_001_OK() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        // Local variables
        var HeaderLines v_headers;
        var HeaderLines v_headers;
        
        
@@ -94,14 +94,14 @@ module AtsMec_LocationAPI_TestCases {
        
        
        // Postamble
        // Postamble
        f_cf_01_http_down();
        f_cf_01_http_down();
    } // End of testcase TC_MEC_SRV_UELOC_001_OK
    } // End of testcase TC_MEC_SRV_UELOCLOOK_001_OK
    
    
    /**
    /**
     * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
     * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
     * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
     * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
     */
     */
    testcase TC_MEC_SRV_UELOC_001_BR() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_SRV_UELOCLOOK_001_BR() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        // Local variables
        var HeaderLines v_headers;
        var HeaderLines v_headers;
        
        
@@ -149,14 +149,14 @@ module AtsMec_LocationAPI_TestCases {
        
        
        // Postamble
        // Postamble
        f_cf_01_http_down();
        f_cf_01_http_down();
    } // End of testcase TC_MEC_SRV_UELOC_001_BR
    } // End of testcase TC_MEC_SRV_UELOCLOOK_001_BR
    
    
    /**
    /**
     * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
     * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
     * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
     * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
     */
     */
    testcase TC_MEC_SRV_UELOC_001_NF() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_SRV_UELOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        // Local variables
        var HeaderLines v_headers;
        var HeaderLines v_headers;
        
        
@@ -177,7 +177,7 @@ module AtsMec_LocationAPI_TestCases {
        httpPort.send(
        httpPort.send(
                      m_http_request(
                      m_http_request(
                                     m_http_request_get(
                                     m_http_request_get(
                                                        "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID_UNKNOWN, "UTF-8")),
                                                        "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(NON_EXISTENT_ZONE_ID, "UTF-8")),
                                                        v_headers
                                                        v_headers
                                                        )
                                                        )
                                     )
                                     )
@@ -204,7 +204,7 @@ module AtsMec_LocationAPI_TestCases {
        
        
        // Postamble
        // Postamble
        f_cf_01_http_down();
        f_cf_01_http_down();
    } // End of testcase TC_MEC_SRV_UELOC_001_NF
    } // End of testcase TC_MEC_SRV_UELOCLOOK_001_NF
    
    
  } // End of group ueLocationLookup 
  } // End of group ueLocationLookup 
  
  
+62 −2
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
  import from LibMec_Pics all;
  import from LibMec_Pics all;
  import from LibMec_Pixits all;
  import from LibMec_Pixits all;
  
  
  group me_app_role {
  group rloclook {
    
    
    /**
    /**
     * @desc Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application
     * @desc Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application
@@ -96,6 +96,66 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
        f_cf_01_http_down();
        f_cf_01_http_down();
    } // End of testcase TC_MEC_PLAT_RLOC_001_OK
    } // End of testcase TC_MEC_PLAT_RLOC_001_OK
    
    
  } // End of group me_app_role 
    /**
     * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application
     * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RLOCLOOK/PlatRadioNodeLocation.tplan2
     * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList
     */
    testcase TC_MEC_PLAT_RLOC_001_NF() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var HeaderLines v_headers;
        var HttpMessage v_response;
        
        // Test control
        if (not(PICS_MEC_PLAT) or not(PICS_LOCATION_API_SUPPORTED)) {
            log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***");
            setverdict(inconc);
            stop;
        }
        
        // Test component configuration
        f_cf_01_http_up();
        
        // Test adapter configuration
        
        // Preamble
        f_init_default_headers_list(-, -, v_headers);
        httpPort.send(
                      m_http_request(
                                     m_http_request_get(
                                                        PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints",
                                                        v_headers
                                                        )
                                     )
                      );
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
        
        // Test Body
        tc_ac.start;
        alt {
          [] httpPort.receive(
                              mw_http_response(
                                               mw_http_response_ok(
                                                                   mw_http_message_body_json(
                                                                                             mw_body_json_access_point_list(
                                                                                                                            mw_access_point_list(
                                                                                                                                                 PX_ZONE_ID
                                                                                                                                                 )))))) -> value v_response {
            tc_ac.stop;
            
            log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPoint list containing a ZoneId ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          }
          [] tc_ac.timeout {
            log("*** " & testcasename() & ": INCONC: Expected message not received ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
          }
        } // End of 'alt' statement
        
        // Postamble
        f_cf_01_http_down();
    } // End of testcase TC_MEC_PLAT_RLOC_001_NF
    
  } // End of group rloclook 
  
  
} // End of module AtsMec_RadioNodeLocationAPI_TestCases 
} // End of module AtsMec_RadioNodeLocationAPI_TestCases 
+238 −0
Original line number Original line Diff line number Diff line
@@ -1305,6 +1305,244 @@ module AtsMec_RnisAPI_TestCases {
        f_cf_01_http_notif_down();
        f_cf_01_http_notif_down();
    } // End of testcase TC_MEC_SRV_RNIS_004_OK
    } // End of testcase TC_MEC_SRV_RNIS_004_OK
    
    
    /**
     * @desc Check that the RNIS service sends an RNIS notification about UE measurement report 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_005_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 MeasTaSubscription 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_meas_rep_ue_subscription(
                                                                                                                                         mw_meas_rep_ue_subscription(
                                                                                                                                                                     PX_CALLBACK_REFERENCE,
                                                                                                                                                                     PX_LINKS_SELF,
                                                                                                                                                                     mw_filter_criteria_tri(
                                                                                                                                                                                            PX_APP_INS_ID, 
                                                                                                                                                                                            -//TODO PX_E_RAB_ID
                                                                                                                                                                     ))))))) {
            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_005_OK
    
    /**
     * @desc Check that the RNIS service sends an RNIS notification about UE timing advance 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_006_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 MeasTaSubscription 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_meas_ta_subscription(
                                                                                                                                     mw_meas_ta_subscription(
                                                                                                                                                             PX_CALLBACK_REFERENCE,
                                                                                                                                                             PX_LINKS_SELF,
                                                                                                                                                             mw_filter_criteria_ho(
                                                                                                                                                                                   PX_APP_INS_ID, 
                                                                                                                                                                                   -//TODO PX_E_RAB_ID
                                                                                                                                                             ))))))) {
            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_006_OK
    
    /**
     * @desc Check that the RNIS service sends an RNIS notification about UE carrier aggregation reconfiguration 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_007_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 MeasTaSubscription 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_ca_reconf_subscription(
                                                                                                                                       mw_ca_reconfig_subscription(
                                                                                                                                                                   PX_CALLBACK_REFERENCE,
                                                                                                                                                                   PX_LINKS_SELF,
                                                                                                                                                                   mw_filter_criteria(
                                                                                                                                                                                      PX_APP_INS_ID, 
                                                                                                                                                                                      -//TODO PX_E_RAB_ID
                                                                                                                                                             ))))))) {
            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_007_OK
    
    /**
     * @desc Check that the RNIS service sends an RNIS notification about S1-U bearer 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_008_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 MeasTaSubscription 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_s1_bearer_subscription(
                                                                                                                                       mw_s1_bearer_subscription(
                                                                                                                                                                PX_CALLBACK_REFERENCE,
                                                                                                                                                                PX_LINKS_SELF,
                                                                                                                                                                -//mw_filter_criteria
                                                                                                                                                                )))))) {
            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_008_OK
    
  } // End of group rnis_notifications 
  } // End of group rnis_notifications 
  
  
} // End of module AtsMec_RnisAPI_TestCases
} // End of module AtsMec_RnisAPI_TestCases
Loading