Commit ad8158b5 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in MEC 013 for user info

parent 7497201e
Loading
Loading
Loading
Loading
+42 −10
Original line number Diff line number Diff line
@@ -20,17 +20,18 @@ LibMec_Pics.PICS_MEC_PLAT := true

# Mec-013 LocationAPI
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED   := true
LocationAPI_Pixits.PX_ZONE_ID                  := "zone01"
LocationAPI_Pixits.PX_ACCESS_POINT_ID          := "4g-macro-cell-2"
LocationAPI_Pixits.PX_ZONE_ID                  := "zone03"
LocationAPI_Pixits.PX_ACCESS_POINT_ID          := "4g-macro-cell-6"
LocationAPI_Pixits.PX_USER                     := "4005C0A640001"
LocationAPI_Pixits.PX_IP_ADDRESS               := "10.100.0.1"
LocationAPI_Pixits.PX_IP_ADDRESS               := "10.1.0.1"
LocationAPI_Pixits.PX_IP_ADDRESS_1             := "10.100.0.1"
LocationAPI_Pixits.PX_CLIENT_ID                := "0123"
LocationAPI_Pixits.PX_SUBSCRIPTION_ID          := "1"
LocationAPI_Pixits.PX_CALLBACK_REF_URL         := "http://yanngarcia.ddns.net/location/v3/notif/1"
LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI    := "http://yanngarcia.ddns.net/location/v3/notif/1"
LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := "http://yanngarcia.ddns.net/location/v3/notif/1"
LocationAPI_Pixits.PX_UE_COORD_LAT             := 43.729538
LocationAPI_Pixits.PX_UE_COORD_LONG            := 7.413819
LocationAPI_Pixits.PX_UE_COORD_LAT             := 43.736515
LocationAPI_Pixits.PX_UE_COORD_LONG            := 7.421802

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
@@ -76,6 +77,26 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec013)/TCP(debug=1
# In this section you can specify what parts of your test suite you want to execute.
#AtsMec_TestControl.control

# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - No Filter
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01
# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with one address
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02
# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several addresses
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03
# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several zoneIds
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_BR
# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_NF








# Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_OK
# Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event
@@ -85,13 +106,24 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec013)/TCP(debug=1
# Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event and address
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03
# Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Invalid filter
AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_BR
# Check that the IUT responds with an error when inconsistent request was sent by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_01
# Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Using filter
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_02
# Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01
# Check that the IUT responds with the subscription when queried by a MEC Application - UE location Periodoc
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02
# Check that the IUT responds with an error when the non existing subscription is queried by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_003_NF







# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_BR
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_NF
# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event
#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided
+77 −24
Original line number Diff line number Diff line
@@ -1607,8 +1607,10 @@ module AtsMec_LocationAPI_TestCases {
                                             mw_http_response_ok(
                                                                 mw_http_message_body_json(
                                                                                           mw_body_json_user_list(
                                                                                                                  mw_user_list(-, ?)
                            ))))) {
                                                                                                                  mw_user_list(
                                                                                                                               pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI,
                                                                                                                               ?
                            )))))) {
          tc_ac.stop;
          
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***");
@@ -1662,13 +1664,15 @@ module AtsMec_LocationAPI_TestCases {
                                                                 mw_http_message_body_json(
                                                                                           mw_body_json_user_list(
                                                                                                                  mw_user_list(
                                                                                                                               {
                                                                                                                                *,
                                                                                                                                mw_user_info(PX_IP_ADDRESS),
                                                                                                                                *
                                                                                                                               }, 
                                                                                                                               ?)
                            ))))) {
                                                                                                                               pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI,
                                                                                                                               superset(
                                                                                                                                        mw_user_info(
                                                                                                                                                     PX_IP_ADDRESS,
                                                                                                                                                     PX_ACCESS_POINT_ID,
                                                                                                                                                     PX_ZONE_ID,
                                                                                                                                                     -,
                                                                                                                                                     pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & PX_IP_ADDRESS
                            )))))))) {
          tc_ac.stop;
          
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***");
@@ -1721,15 +1725,12 @@ module AtsMec_LocationAPI_TestCases {
                                             mw_http_response_ok(
                                                                 mw_http_message_body_json(
                                                                                           mw_body_json_user_list(
                                                                                                                  mw_user_list( // FIXME Use superset?
                                                                                                                               {
                                                                                                                                *,
                                                                                                                  mw_user_list(
                                                                                                                               pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI,
                                                                                                                               superset(
                                                                                                                                        mw_user_info(PX_IP_ADDRESS),
                                                                                                                                mw_user_info(PX_IP_ADDRESS_1),
                                                                                                                                *
                                                                                                                               }, 
                                                                                                                               ?)
                            ))))) {
                                                                                                                                        mw_user_info(PX_IP_ADDRESS_1)
                            ))))))) {
          tc_ac.stop;
          
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***");
@@ -1783,6 +1784,7 @@ module AtsMec_LocationAPI_TestCases {
                                                                 mw_http_message_body_json(
                                                                                           mw_body_json_user_list(
                                                                                                                  mw_user_list( // FIXME Use superset?
                                                                                                                               -,
                                                                                                                               {
                                                                                                                                *,
                                                                                                                                mw_user_info(-, -, PX_ZONE_ID),
@@ -2241,7 +2243,58 @@ module AtsMec_LocationAPI_TestCases {
    /**
     * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application
     */
    testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_01() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var Headers v_headers;
        
        // Test control
        if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
            log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES 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_LOC_API_USERS_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID,
                                                        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
                              )) {
            tc_ac.stop;
            
            log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
            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_MEC013_SRV_UELOCLOOK_002_NF_01

    /**
     * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Using filter
     */
    testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_02() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var Headers v_headers;
        var UserLocationEventSubscription v_user_location_event_subscription;
@@ -2268,7 +2321,7 @@ module AtsMec_LocationAPI_TestCases {
        httpPort.send(
                      m_http_request(
                                     m_http_request_get(
                                                        PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&adress=" & PX_USER_2,
                                                        PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&address=" & PX_USER_2,
                                                        v_headers
                      )));
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
@@ -2295,7 +2348,7 @@ module AtsMec_LocationAPI_TestCases {
        f_delete_user_location_event_subscription(v_user_location_event_subscription_id);
        f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id);
        f_cf_01_http_down();
    } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF
    } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_02

    /**
     * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event
@@ -2341,7 +2394,7 @@ module AtsMec_LocationAPI_TestCases {
                                                                   mw_http_message_body_json(
                                                                                             mw_body_json_user_location_event_subscription(
                                                                                                                                           mw_user_location_event_subscription(
                                                                                                                                                                               v_user_location_event_subscription.links_.self_.href
                                                                                                                                                                               v_user_location_event_subscription.callbackReference
                              )))))) {
            tc_ac.stop;
            
@@ -2404,7 +2457,7 @@ module AtsMec_LocationAPI_TestCases {
                                                                   mw_http_message_body_json(
                                                                                             mw_body_json_user_location_periodic_subscription(
                                                                                                                                              mw_user_location_periodic_subscription(
                                                                                                                                                                                     v_user_location_periodic_subscription.links_.self_.href
                                                                                                                                                                                     v_user_location_periodic_subscription.callbackReference
                              )))))) {
            tc_ac.stop;
            
@@ -2424,7 +2477,7 @@ module AtsMec_LocationAPI_TestCases {
    } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02

    /**
     * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event
     * @desc Check that the IUT responds with an error when the non existing subscription is queried by a MEC Application
     */
    testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_NF() runs on HttpComponent system HttpTestAdapter {
        // Local variables
+2 −1
Original line number Diff line number Diff line
@@ -55,7 +55,8 @@ module AtsMec_LocationAPI_TestControl {
        execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02());
        execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03());
        execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_BR());
        execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_NF());
        execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_01());
        execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_02());
        execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01());
        execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02());
        execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_NF());
+66 −22
Original line number Diff line number Diff line
@@ -27,8 +27,8 @@ module LocationAPI_Templates {
    timestamp_           := p_timestamp,
    locationInfo         := omit,
    civicInfo            := omit,
    contextLocationInfo := omit,
    ancillaryInfo       := omit
    ancillaryInfo        := omit,
    relativeLocationInfo := omit
  } // End of template m_user_info

  template (present) UserInfo mw_user_info(
@@ -45,8 +45,8 @@ module LocationAPI_Templates {
    timestamp_           := p_timestamp,
    locationInfo         := *,
    civicInfo            := *,
    contextLocationInfo := *,
    ancillaryInfo       := *
    ancillaryInfo        := *,
    relativeLocationInfo := *
  } // End of template mw_user_info

  template (omit) UserList m_user_list(
@@ -57,9 +57,9 @@ module LocationAPI_Templates {
    resourceURL := p_resource_url
  } // End of template m_user_list

  template UserList mw_user_list(
                                 template UserInfos p_userInfo := *,
                                 template (present) ResourceURL p_resource_url := ?
  template (present) UserList mw_user_list(
                                           template (present) ResourceURL p_resource_url := ?,
                                           template UserInfos p_userInfo := *
                                           ) := {
    user        := p_userInfo,
    resourceURL := p_resource_url
@@ -110,6 +110,50 @@ module LocationAPI_Templates {
    velocity             := *
  } // End of template mw_location_info

  template (omit) RelativeLocationInfo m_relative_location_info(
                                                                in template (value) MapInfo p_mapInfo,
                                                                in Json.Number p_X,
                                                                in Json.Number p_Y,
                                                                in template (omit) Json.Number p_Z := omit
                                                                ) := {
    mapInfo := p_mapInfo,
    X       := p_Y,
    Y       := p_Y,
    Z       := p_Z
  } // End of template m_relative_location_info

  template (present) RelativeLocationInfo mw_relative_location_info(
                                                                    template (present) MapInfo p_mapInfo := ?,
                                                                    template (present) Json.Number p_X := ?,
                                                                    template (present) Json.Number p_Y := ?,
                                                                    template Json.Number p_Z := *
                                                                    ) := {
    mapInfo := p_mapInfo,
    X       := p_Y,
    Y       := p_Y,
    Z       := p_Z
  } // End of template mw_relative_location_info

  template (omit) MapInfoOrigin m_map_info_origin(
                                                  in Json.Number p_latitude,
                                                  in Json.Number p_longitude,
                                                  in template (omit) Json.Number p_altitude := omit
                                                  ) :={
    latitude  := p_latitude,
    longitude := p_longitude,
    altitude  := p_altitude
  } // End of template m_map_info_origin

  template (present) MapInfoOrigin mw_map_info_origin(
                                                      template (present) Json.Number p_latitude := ?,
                                                      template (present) Json.Number p_longitude := ?,
                                                      template Json.Number p_altitude := *
                                                      ) :={
    latitude  := p_latitude,
    longitude := p_longitude,
    altitude  := p_altitude
  } // End of template mw_map_info_origin

  template (value) ZoneInfo m_zone_info(
                                        in ZoneId p_zone_id := PX_ZONE_ID,
                                        in NumberOfAccessPoints p_number_of_access_points := PX_NB_ACCESS_POINTS,
+12 −17
Original line number Diff line number Diff line
@@ -319,11 +319,6 @@ module LocationAPI_TypesAndValues {
    UNKNOWN
  }

  /**
   * @desc Contextual information of a user location (e.g., aisle, floor, room number, etc.)
   */
  type Json.String ContextLocationInfo;

  /**
   * @desc Zone ID
   */
@@ -537,7 +532,7 @@ module LocationAPI_TypesAndValues {
    Json.String POM optional,
    Json.String usageRules optional,
    Json.String method optional,
    Json.String providedBy
    Json.String providedBy optional
  } 

  /**
@@ -561,8 +556,8 @@ module LocationAPI_TypesAndValues {
    TimeStamp            timestamp_,
    LocationInfo         locationInfo optional,
    CivicAddress         civicInfo optional,
    ContextLocationInfo contextLocationInfo optional,
    AncillaryInfo       ancillaryInfo optional
    AncillaryInfo        ancillaryInfo optional,
    RelativeLocationInfo relativeLocationInfo optional
  } with {
    variant (address_) "name as 'address'";
    variant (timestamp_) "name as 'timestamp'";
@@ -591,8 +586,8 @@ module LocationAPI_TypesAndValues {
   * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.4
   */
  type record MapInfoOrigin {
    Latitude    latitude,
    Longitude   longitude,
    Json.Number latitude,
    Json.Number longitude,
    Json.Number altitude optional
  }