Commit 974c0194 authored by YannGarcia's avatar YannGarcia
Browse files

Review TP_MEC_SRV_UELOC_001_OK, TC_MEC_SRV_UELOC_001_BR, TC_MEC_SRV_UELOC_001_NF

parent a5e73606
Loading
Loading
Loading
Loading

TODO.md

0 → 100644
+60 −0
Original line number Original line Diff line number Diff line
# MEC Testing Framework in TTCN-3- TODO list

## Introduction
This file provides the list of the TODOs related to the STF 569.

## SRV

### AMS

### APPSAQ

### APPSUB

### BWA 

### DNS 

### FAIS

### RLOC

### RNIS

### SAQ

### SRVSUB

### TIME

### TRAF

### TRANS 

### UEAREASUB

### UEDISTLOOK

### UEDISTSUB

### UEINFLOOK

### UEINFSUB

### UELOC
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
  TP_MEC_SRV_UELOC_001_OK <span style="color:green">Done</span>
  TC_MEC_SRV_UELOC_001_BR <span style="color:yellow">To be tested</span>
  TC_MEC_SRV_UELOC_001_NF <span style="color:yellow">To be tested</span>
  

### UELOCSUB

### UETAG 

### UETRACKSUB

### UeIdentity

+3 −3
Original line number Original line Diff line number Diff line
@@ -102,9 +102,9 @@ RUN cd /home/etsi/frameworks \
    && make && make install
    && make && make install


RUN cd /home/etsi/frameworks \
RUN cd /home/etsi/frameworks \
    && wget -q 'http://ftp.halifax.rwth-aachen.de/eclipse//technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
    && wget -q 'http://ftp.halifax.rwth-aachen.de/eclipse/technology/epp/downloads/release/photon/R/eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz' \
    && tar -zxvf ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
    && tar -zxvf ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \
    && rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
    && rm -f ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \
    && cd /home/etsi/dev/STF569_Mec \
    && cd /home/etsi/dev/STF569_Mec \
    && cd /home/etsi/dev/STF569_Mec/ttcn \
    && cd /home/etsi/dev/STF569_Mec/ttcn \
    && git clone https://forge.etsi.org/gitlab/LIBS/LibSip.git ./LibSip \
    && git clone https://forge.etsi.org/gitlab/LIBS/LibSip.git ./LibSip \
+116 −8
Original line number Original line Diff line number Diff line
@@ -34,14 +34,14 @@ module AtsMec_LocationAPI_TestCases {
  import from LibMec_Pics all;
  import from LibMec_Pics all;
  import from LibMec_Pixits all;
  import from LibMec_Pixits all;
  
  
  group location {
  group ueLocationLookup {
    
    
    /**
    /**
     * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application
     * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeLocation/PlatUeLocation.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_PLAT_LOC_001_OK() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_SRV_UELOC_001_OK() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        // Local variables
        var HeaderLines v_headers;
        var HeaderLines v_headers;
        var HttpMessage v_response;
        var HttpMessage v_response;
@@ -63,7 +63,7 @@ module AtsMec_LocationAPI_TestCases {
        httpPort.send(
        httpPort.send(
                      m_http_request(
                      m_http_request(
                                     m_http_request_get(
                                     m_http_request_get(
                                                        PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")),
                                                        "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")),
                                                        v_headers
                                                        v_headers
                                                        )
                                                        )
                                     )
                                     )
@@ -96,9 +96,117 @@ module AtsMec_LocationAPI_TestCases {
        
        
        // Postamble
        // Postamble
        f_cf_01_http_down();
        f_cf_01_http_down();
    } // End of testcase TC_MEC_PLAT_LOC_001_OK
    } // End of testcase TC_MEC_SRV_UELOC_001_OK
    
    /**
     * @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/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
     */
    testcase TC_MEC_SRV_UELOC_001_BR() 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(
                                                        "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?areaId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), // areaId instead of zoneId
                                                        v_headers
                                                        )
                                     )
                      );
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
        
        // Test Body
        tc_ac.start;
        alt {
          [] httpPort.receive(
                              mw_http_response(
                                               mw_http_response_400_bad_request
                                               )) -> value v_response {
            log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***");
            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_SRV_UELOC_001_BR
    
    /**
     * @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/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
     */
    testcase TC_MEC_SRV_UELOC_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(
                                                        "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID_UNKNOWN, "UTF-8")),
                                                        v_headers
                                                        )
                                     )
                      );
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
        
        // Test Body
        tc_ac.start;
        alt {
          [] httpPort.receive(
                              mw_http_response(
                                               mw_http_response_404_not_found
                                               )) -> value v_response {
            log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***");
            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_SRV_UELOC_001_NF
    
    
  } // End of group location 
  } // End of group ueLocationLookup 
  
  
  group subscription {
  group subscription {
    
    
@@ -129,7 +237,7 @@ module AtsMec_LocationAPI_TestCases {
        httpPort.send(
        httpPort.send(
                      m_http_request(
                      m_http_request(
                                     m_http_request_post(
                                     m_http_request_post(
                                                         PX_ME_APP_Q_USERS_SUB_URI,
                                                         "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_SUB_URI,
                                                         v_headers,
                                                         v_headers,
                                                         m_http_message_body_json(
                                                         m_http_message_body_json(
                                                                                  m_body_json_user_tracking_subscription(
                                                                                  m_body_json_user_tracking_subscription(
@@ -197,7 +305,7 @@ module AtsMec_LocationAPI_TestCases {
        httpPort.send(
        httpPort.send(
                      m_http_request(
                      m_http_request(
                                     m_http_request_get(
                                     m_http_request_get(
                                                        PX_ME_APP_Q_USERS_SUB_URI & "/" & PX_SUBSCRIPTION_ID, // TODO Shall be extract from Subscription request
                                                        "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_SUB_URI & "/" & PX_SUBSCRIPTION_ID, // TODO Shall be extract from Subscription request
                                                        v_headers
                                                        v_headers
                                                        )
                                                        )
                                     )
                                     )
+3 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,9 @@ module AtsMec_TestControl {
    
    
    if (PICS_MEC_PLAT) {
    if (PICS_MEC_PLAT) {
      if (PICS_LOCATION_API_SUPPORTED) {
      if (PICS_LOCATION_API_SUPPORTED) {
        execute(TC_MEC_PLAT_LOC_001_OK());
        execute(TC_MEC_SRV_UELOC_001_OK());
        execute(TC_MEC_SRV_UELOC_001_BR());
        execute(TC_MEC_SRV_UELOC_001_NF());
        execute(TC_MEC_PLAT_INFLOOK_001_OK());
        execute(TC_MEC_PLAT_INFLOOK_001_OK());
        execute(TC_MEC_PLAT_LOCSUB_001_OK());
        execute(TC_MEC_PLAT_LOCSUB_001_OK());
        execute(TC_MEC_PLAT_LOCSUB_002_OK());
        execute(TC_MEC_PLAT_LOCSUB_002_OK());
+1 −1
Original line number Original line Diff line number Diff line
@@ -276,7 +276,7 @@ module AtsMec_UEidentityAPI_TestCases {
                                                                                                                                                 mw_problem_details(
                                                                                                                                                 mw_problem_details(
                                                                                                                                                                    -, -, 400
                                                                                                                                                                    -, -, 400
                                                                                                                                                                    )))))) -> value v_response {
                                                                                                                                                                    )))))) -> value v_response {
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***");
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        }
        [] tc_ac.timeout {
        [] tc_ac.timeout {
Loading