Commit 0a214f26 authored by Yann Garcia's avatar Yann Garcia
Browse files
parents 1997f2ce 6df616de
......@@ -35,8 +35,22 @@ This file provides the list of the TODOs related to the STF 569.
### UEDISTLOOK
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 TerminalDistance data structure not found
### 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 +65,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 <font color="color:yellow">To be tested</font>
- TC_MEC_SRV_UEINFSUB_001_BR <font color="color:yellow">To be tested</font>
- TC_MEC_SRV_UEINFSUB_002_OK <font color="color:yellow">To be tested</font>
- TC_MEC_SRV_UEINFSUB_002_NF <font color="color:yellow">To be tested</font>
### UELOC
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
......
......@@ -496,7 +496,7 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod
if (decoding_buffer.get_len() - decoding_buffer.get_pos() <= 0) {
return -1;
}
/* TODO Uncommentif (p_content_type.empty()) {
/* TODO Uncomment if (p_content_type.empty()) {
loggers::get_instance().warning("http_codec::encode_body: Failed to select a codec for HTTP body payload");
return -1;
}*/
......
......@@ -8,18 +8,19 @@ LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;
#LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87"
LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.5"
LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.17"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_SERVICES := true
LibMec_Pics.PICS_RNIS := false
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := false
UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := true
BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := true
BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := false
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
......@@ -37,7 +38,7 @@ LogEventTypes:= Yes
[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.0.5,port=8081,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.0.17,port=8081,use_ssl=0)"
[DEFINE]
# In this section you can create macro definitions,
......@@ -62,7 +63,34 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1
[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
AtsMec_TestControl.control
#AtsMec_TestControl.control
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_NF
AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_002_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_002_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF
[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
......
......@@ -80,6 +80,8 @@ module AtsMec_BwManagementAPI_TestCases {
mw_body_json_bw_info(
mw_bw_info
))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ZoneId ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
......
......@@ -81,6 +81,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
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);
}
......
......@@ -82,6 +82,8 @@ module AtsMec_RnisAPI_TestCases {
PX_LINKS_SELF,
?
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
......
......@@ -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());
}
}
......
/**
* @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
......@@ -75,8 +75,9 @@ module AtsMec_UEidentityAPI_TestCases {
mw_body_json_ue_identity_tag_info(
mw_ue_identity_tag_info(
{ *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG), * }
)))))) {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a UeIdentityTag ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
......@@ -115,7 +116,7 @@ module AtsMec_UEidentityAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG_UNKNOWN, "UTF-8")),
"/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
v_headers
)
)
......@@ -133,6 +134,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
......@@ -189,6 +192,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details(
-, -, 404
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
......@@ -225,7 +230,7 @@ module AtsMec_UEidentityAPI_TestCases {
// Preamble
f_init_default_headers_list(-, -, v_headers);
// Verify that the user is not register yet
if (f_check_user_register_state(-, v_headers) != 0) {
if (f_check_user_register_state(-, v_headers) != 0) {
log("*** " & testcasename() & ": INCONC: Wrong initial conditions ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
......@@ -262,6 +267,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_ue_identity_tag_info(
{ *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG, REGISTERED), * }
)))))) {
tc_ac.stop;
if (f_check_user_register_state(-, v_headers) == 1) {
log("*** " & testcasename() & ": PASS: IUT successfully registered the tag ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
......@@ -340,6 +347,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 403 Forbidden ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
......@@ -413,6 +422,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details(
-, -, 412
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
......
/**
* @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_UEinformation_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 responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2
*/
testcase TC_MEC_SRV_UEINFLOOK_001_OK() 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_USERS_LIST_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_list(
mw_user_list(-, ?)
))))) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***");
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_UEINFLOOK_001_OK
} // End of group me_app_role
} // End of module AtsMec_UEinformation_TestCases
......@@ -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
......@@ -5,6 +5,7 @@ module LibMec_Functions {
// LibMec
import from LibMec_Pixits all;
import from LibMec_Pics all;
// LibMec_UEidentityAPI
import from UEidentityAPI_TypesAndValues all;
......@@ -85,7 +86,7 @@ module LibMec_Functions {
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(p_ue_identity_tag, "UTF-8")),
"/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(p_ue_identity_tag, "UTF-8")),
p_headers
)
)
......@@ -102,12 +103,18 @@ module LibMec_Functions {
mw_ue_identity_tag_info(
{ *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG), * }
)))))) -> value v_response {
tc_ac.stop;
for (var integer v_i := 0; v_i < lengthof(v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags); v_i := v_i + 1) {
if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].ueIdentityTag == p_ue_identity_tag) {
//log("Processing ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].ueIdentityTag);
//log("State ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state);
if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == UNREGISTERED) {
v_result := 0;
} else {
} else if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == REGISTERED) {
v_result := 1;
} else if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == INVALID_STATE) {
v_result := 2;
}
break;
}
......
......@@ -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/";
......
......@@ -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,
......
......@@ -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 {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment