diff --git a/TODO.md b/TODO.md
index 57f0e1ce10edd74758304240efcadb5881cf34ca..bcfcbc2c9df9d7602a93bb481cc7f37417ba7f1c 100644
--- a/TODO.md
+++ b/TODO.md
@@ -37,6 +37,13 @@ This file provides the list of the TODOs related to the STF 569.
### UEDISTSUB
+Draft ETSI GS MEC 013 V2.0.3 (2018-10)
+
+https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTSUB/PlatUeDistanceSubscription.tplan2
+
+TODO DistanceNotificationSubscription data structure not found
+
+
### UEINFLOOK
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
@@ -51,6 +58,18 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20
### UEINFSUB
+Draft ETSI GS MEC 013 V2.0.3 (2018-10)
+
+https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2
+
+- TC_MEC_SRV_UEINFSUB_001_OK To be tested
+
+- TC_MEC_SRV_UEINFSUB_001_BR To be tested
+
+- TC_MEC_SRV_UEINFSUB_002_OK To be tested
+
+- TC_MEC_SRV_UEINFSUB_002_NF To be tested
+
### UELOC
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
diff --git a/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn
index cb1af2cd7a1f17ac7ee658f566a6c95553a57867..b13cf6164eb107f8d9ac0fde900532e648c13dd6 100644
--- a/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn
+++ b/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn
@@ -258,7 +258,7 @@ module AtsMec_LocationAPI_TestCases {
PX_CALLBACK_REF_URL,
PX_USER
)))))) {
- log("*** " & testcasename() & ": PASS: IUT successfully responds with a ressourceURL ***");
+ log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
@@ -828,4 +828,253 @@ module AtsMec_LocationAPI_TestCases {
} // End of group ueInfLook
+ group ueInfSub {
+
+ /**
+ * @desc Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes
+ * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2
+ */
+ testcase TC_MEC_SRV_UEINFSUB_001_OK() runs on HttpComponent system HttpTestAdapter {
+ // Local variables
+ var HeaderLines 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_post(
+ "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI,
+ v_headers,
+ m_http_message_body_json(
+ m_body_json_zonal_traffic_subscription(
+ m_zonal_traffic_subscription(
+ PX_CLIENT_ID,
+ PX_CALLBACK_REF_URL,
+ PX_ZONE_ID
+ )
+ )
+ )
+ )
+ )
+ );
+ f_selfOrClientSyncAndVerdict(c_prDone, e_success);
+
+ // Test Body
+ tc_ac.start;
+ alt {
+ [] httpPort.receive(
+ mw_http_response(
+ mw_http_response_201_created(
+ mw_http_message_body_json(
+ mw_body_json_zonal_traffic_subscription(
+ mw_zonal_traffic_subscription(
+ PX_CLIENT_ID,
+ PX_CALLBACK_REF_URL,
+ PX_ZONE_ID
+ )))))) {
+ log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***");
+ 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_UEINFSUB_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/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2
+ */
+ testcase TC_MEC_SRV_UEINFSUB_001_BR() runs on HttpComponent system HttpTestAdapter {
+ // Local variables
+ var HeaderLines 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_post(
+ "/" & PICS_ROOT_API & "invilad/" & PX_ME_APP_Q_USERS_INF_SUB_URI,
+ v_headers,
+ m_http_message_body_json(
+ m_body_json_zonal_traffic_subscription(
+ m_zonal_traffic_subscription(
+ PX_CLIENT_ID,
+ PX_CALLBACK_REF_URL,
+ PX_ZONE_ID
+ )
+ )
+ )
+ )
+ )
+ );
+ f_selfOrClientSyncAndVerdict(c_prDone, e_success);
+
+ // Test Body
+ tc_ac.start;
+ alt {
+ [] httpPort.receive(
+ mw_http_response(
+ mw_http_response_400_bad_request
+ )) {
+ log("*** " & testcasename() & ": PASS: IUT successfully responds 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_UEINFSUB_001_BR
+
+ /**
+ * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application
+ * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2
+ */
+ testcase TC_MEC_SRV_UEINFSUB_002_OK() runs on HttpComponent system HttpTestAdapter {
+ // Local variables
+ var HeaderLines 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_delete(
+ "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI,
+ v_headers,
+ m_http_message_body_json(
+ m_body_json_zonal_traffic_subscription(
+ m_zonal_traffic_subscription(
+ PX_CLIENT_ID,
+ PX_CALLBACK_REF_URL,
+ PX_ZONE_ID
+ )
+ )
+ )
+ )
+ )
+ );
+ f_selfOrClientSyncAndVerdict(c_prDone, e_success);
+
+ // Test Body
+ tc_ac.start;
+ alt {
+ [] httpPort.receive(
+ mw_http_response(
+ mw_http_response_204_no_content
+ )) {
+ log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***");
+ 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_UEINFSUB_002_OK
+
+ /**
+ * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application
+ * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2
+ */
+ testcase TC_MEC_SRV_UEINFSUB_002_NF() runs on HttpComponent system HttpTestAdapter {
+ // Local variables
+ var HeaderLines 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_delete(
+ "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & oct2char(unichar2oct(PX_USER_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
+ )) {
+ log("*** " & testcasename() & ": PASS: IUT successfully responds 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_UEINFSUB_002_NF
+
+ } // End of group ueInfSub
+
+ group ueDistSub {
+
+ } // End of group ueDistSub
+
} // End of module AtsMec_LocationAPI_TestCases
diff --git a/ttcn/AtsMec/AtsMec_TestControl.ttcn b/ttcn/AtsMec/AtsMec_TestControl.ttcn
index 3822a14b45783ddbde1528beec6c26ccea833a11..be65b93103130a13828371001cb24d853370a0c2 100644
--- a/ttcn/AtsMec/AtsMec_TestControl.ttcn
+++ b/ttcn/AtsMec/AtsMec_TestControl.ttcn
@@ -48,6 +48,11 @@ module AtsMec_TestControl {
execute(TC_MEC_SRV_UEINFLOOK_001_BR());
execute(TC_MEC_SRV_UEINFLOOK_001_NF());
+ execute(TC_MEC_SRV_UEINFSUB_001_OK());
+ execute(TC_MEC_SRV_UEINFSUB_001_BR());
+ execute(TC_MEC_SRV_UEINFSUB_002_OK());
+ execute(TC_MEC_SRV_UEINFSUB_002_NF());
+
execute(TC_MEC_PLAT_RLOC_001_OK());
}
}
diff --git a/ttcn/AtsMec/AtsMec_UEdistance_TestCases.ttcn b/ttcn/AtsMec/AtsMec_UEdistance_TestCases.ttcn
deleted file mode 100644
index e15e61e2e90b131ef08c69d9dc656117df83138c..0000000000000000000000000000000000000000
--- a/ttcn/AtsMec/AtsMec_UEdistance_TestCases.ttcn
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @author ETSI / STF569
- * @version $URL:$
- * $ID:$
- * @desc This module provides the MEC test cases.
- * @copyright ETSI Copyright Notification
- * No part may be reproduced except as authorized by written permission.
- * The copyright and the foregoing restriction extend to reproduction in all media.
- * All rights reserved.
- * @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V2.0.3 (2018-10)
- */
-module AtsMec_UEdistance_TestCases {
-
- // Libcommon
- import from LibCommon_Time all;
- import from LibCommon_VerdictControl all;
- import from LibCommon_Sync all;
-
- // LibHttp
- import from LibItsHttp_TypesAndValues all;
- import from LibItsHttp_Functions all;
- import from LibItsHttp_Templates all;
- import from LibItsHttp_JsonTemplates all;
- import from LibItsHttp_TestSystem all;
-
- // LibMec_LocationAPI
- import from LocationAPI_TypesAndValues all;
- import from LocationAPI_Templates all;
- import from LocationAPI_Pics all;
- import from LocationAPI_Pixits all;
-
- // LibMec
- import from LibMec_Functions all;
- import from LibMec_Pics all;
- import from LibMec_Pixits all;
-
- group me_app_role {
-
- /**
- * @desc Check that the IUT acknowledges the subscription by a MEC Application to the notifications on UE distance
- * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeDistance/PlatUeDistance.tplan2
- */
- testcase TC_MEC_PLAT_MP1_DIST_BV_001() 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_post(
- PX_ME_APP_Q_DIST_URI,
- 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_user_info(
- mw_user_info(-, -, PX_ZONE_ID)
- ))))) -> value v_response {
- log("*** " & testcasename() & ": PASS: IUT successfully responds with 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_MP1_DIST_BV_001
-
- } // End of group me_app_role
-
-} // End of module AtsMec_UEdistance_TestCases
diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn
index b5690ae243d621e07d4dabd99933a65e7880d6a0..6344cfdaf79b785b940bd4232439c5af08eac487 100644
--- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn
+++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn
@@ -153,4 +153,32 @@ module LocationAPI_Templates {
resourceURL := p_resourceURL
} // End of template mw_user_tracking_subscription
+ template (value) ZonalTrafficSubscription m_zonal_traffic_subscription(
+ in ClientCorrelator p_client_correlator,
+ in CallbackReference p_callback_reference,
+ in ZoneId p_zone_id
+ ) := {
+ clientCorrelator := p_client_correlator,
+ callbackReference := p_callback_reference,
+ zoneId := p_zone_id,
+ interestRealm := omit,
+ userEventCriteria := omit,
+ duration := omit,
+ resourceURL := omit
+ } // End of template m_zonal_traffic_subscription
+
+ template (present) ZonalTrafficSubscription mw_zonal_traffic_subscription(
+ template (present) ClientCorrelator p_client_correlator := ?,
+ template (present) CallbackReference p_callback_reference := ?,
+ template (present) ZoneId p_zone_id := ?
+ ) := {
+ clientCorrelator := p_client_correlator,
+ callbackReference := p_callback_reference,
+ zoneId := p_zone_id,
+ interestRealm := *,
+ userEventCriteria := *,
+ duration := *,
+ resourceURL := *
+ } // End of template mw_zonal_traffic_subscription
+
} // End of module LocationAPI_Templates
diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn
index 6fcf8e10034da2710e3bc72db88e08da85f25876..1b02fbdbc5b94c0a218b0161cc2a108e6cfff9f1 100644
--- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn
+++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn
@@ -10,6 +10,8 @@ module LibMec_Pixits {
modulepar charstring PX_ME_APP_Q_USERS_TRACK_SUB_URI := "/location/v2/subscriptions/periodic";
+ modulepar charstring PX_ME_APP_Q_USERS_INF_SUB_URI := "/location/v2/subscriptions/zonalTraffic";
+
modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v2/";
modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions/";
diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn
index c225b641b9c756e32b884f316fdc640a819a1001..0ca201b7a62925ab2603f2c9b35546f581caa1a3 100644
--- a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn
+++ b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn
@@ -22,6 +22,7 @@ module LibItsHttp_JsonMessageBodyTypes {
ZoneInfo zoneInfo,
AccessPointList accessPointList,
UserTrackingSubscription userTrackingSubscription,
+ ZonalTrafficSubscription zonalTrafficSubscription,
UEidentityAPI_TypesAndValues.ProblemDetails problemDetails_ue_identity,
UeIdentityTagInfo ueIdentityTagInfo,
SubscriptionLinkList subscriptionLinkList,
diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn
index 8ce0ad2584524c3edc2fb674b5cc668c068610d1..1268b9def3add37f0b5c0a06d74fe05b625b7565 100644
--- a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn
+++ b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn
@@ -103,6 +103,18 @@ module LibItsHttp_JsonTemplates {
userTrackingSubscription := p_user_tracking_subscription
} // End of template mw_body_json_user_rtracking_subscription
+ template (value) JsonBody m_body_json_zonal_traffic_subscription(
+ in template (value) ZonalTrafficSubscription p_zonal_traffic_subscription
+ ) := {
+ zonalTrafficSubscription := p_zonal_traffic_subscription
+ } // End of template m_body_json_zonal_traffic_subscription
+
+ template (present) JsonBody mw_body_json_zonal_traffic_subscription(
+ template (present) ZonalTrafficSubscription p_zonal_traffic_subscription := ?
+ ) := {
+ zonalTrafficSubscription := p_zonal_traffic_subscription
+ } // End of template mw_body_json_zonal_traffic_subscription
+
} // End of group locarion_api
group ue_identity_api {