Newer
Older
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_ZONAL_TRAF_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_zonal_traffic_subscription(
m_zonal_traffic_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_TRAFFIC_SUB_CALLBACK_URI, // callbackReference
PX_ZONE_ID // zoneId
)
)
)
)
)
);
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, //clientCorrelator
PX_TRAFFIC_SUB_CALLBACK_URI, // callbackReference
PX_ZONE_ID // zoneId
)))))) -> value v_response {
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
// TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test?
// MEC 013, clause 7.3.5.3
// the IUT entity sends a vPOST containing
// Uri set to CALLBACK_URL
// body containing
// zonalPresenceNotification containing
// clientCorrelator set to CLIENT_ID,
// zoneId indicating value ZONE_ID
// ;
// ;
// ;
// to the MEC_APP entity
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a circleNotificationSubscription ***");
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_UEINFOSUB_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TC_MEC_SRV_UEINFOSUB_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 & oct2char(unichar2oct(PX_UE_ZONAL_TRAF_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_circle_notification_subscription(
m_circle_notification_subscription(
PX_CLIENT_ID, //clientCorrelator
// TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or
// change the test to use another trigger?
PX_TRAFFIC_SUB_CALLBACK_URI, // callbackReference
PX_ZONE_ID // zoneId
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
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_UEINFOSUB_001_BR
/**
* @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application
*/
testcase TC_MEC_SRV_UEINFOSUB_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 & oct2char(unichar2oct(PX_UE_ZONAL_TRAF_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with 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_UEINFOSUB_002_OK
/**
* @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
*/
testcase TC_MEC_SRV_UEINFOSUB_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 & oct2char(unichar2oct(PX_UE_ZONAL_TRAF_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
)
);
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 no 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_UEINFOSUB_002_NF
} // End of group ueInformationSubscription
/*
* UE Location Lookup (UELOCLOOK)
*/
group ueLocationLookup {
/**
* @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application
*/
testcase TC_MEC_SRV_UELOCLOOK_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_get(
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_USERS_URI, "UTF-8")) & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")),
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_body_json_user_info(
mw_user_info(
PX_ZONE_ID // zoneId
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a 200 OK ***");
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_UELOCLOOK_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TC_MEC_SRV_UELOCLOOK_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_get(
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_USERS_URI, "UTF-8")) & "?zone=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")),
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
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a 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_UELOCLOOK_001_BR
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TC_MEC_SRV_UELOCLOOK_001_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_get(
"/" & PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_USERS_URI, "UTF-8")) & "?zoneId=" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "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
)) {
tc_ac.stop;
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_UELOCLOOK_001_NF
} // End of group ueLocationLookup
/*
* UE Location Subscription (UELOCSUB)
*/
group ueLocationSubscription {
/**
* @desc Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes
*/
testcase TC_MEC_SRV_UELOCSUB_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_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 & oct2char(unichar2oct(PX_UE_LOC_USERTRACK_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_user_tracking_subscription(
m_user_tracking_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_USERTRACK_SUB_CALLBACK_URI, // callbackReference
PX_IP_ADDRESS // address
)
)
)
)
)
);
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_user_tracking_subscription(
mw_user_tracking_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_USERTRACK_SUB_CALLBACK_URI, // callbackReference
PX_IP_ADDRESS // address
)))))) -> value v_response {
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
// TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test?
// MEC 013, clause 7.3.4.3
// the IUT entity sends a vPOST containing
// Uri set to CALLBACK_URL
// body containing
// zonalPresenceNotification containing
// clientCorrelator set to CLIENT_ID,
// address set to IP_ADDRESS
// ;
// ;
// ;
// to the MEC_APP entity
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a userTrackingSubscription ***");
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_UELOCSUB_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TC_MEC_SRV_UELOCSUB_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 & oct2char(unichar2oct(PX_UE_LOC_USERTRACK_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_user_tracking_subscription(
m_user_tracking_subscription(
PX_CLIENT_ID, //clientCorrelator
// TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or
// change the test to use another trigger?
PX_USERTRACK_SUB_CALLBACK_URI, // callbackReference
PX_IP_ADDRESS // address
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
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_UELOCSUB_001_BR
/**
* @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application
*/
testcase TC_MEC_SRV_UELOCSUB_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 & oct2char(unichar2oct(PX_UE_LOC_USERTRACK_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with 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_UELOCSUB_002_OK
/**
* @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
*/
testcase TC_MEC_SRV_UELOCSUB_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 & oct2char(unichar2oct(PX_UE_LOC_USERTRACK_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "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
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with no 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_UELOCSUB_002_NF
} // End of group ueLocationSubscription
/*
* UE Tracking Subscribe (UETRACKSUB)
*/
group ueTrackingSubscribe {
/**
* @desc Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location
*/
testcase TC_MEC_SRV_UETRACKSUB_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_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 & oct2char(unichar2oct(PX_UE_PERIODIC_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_periodic_notification_subscription(
m_periodic_notification_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_USERTRACK_SUB_CALLBACK_URI, // callbackReference
PX_IP_ADDRESS // address
)
)
)
)
)
);
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_periodic_notification_subscription(
mw_periodic_notification_subscription(
PX_CLIENT_ID, //clientCorrelator
PX_USERTRACK_SUB_CALLBACK_URI, // callbackReference
PX_IP_ADDRESS // address
)))))) -> value v_response {
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
// TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test?
// // MEC 013, clause 7.3.8.3
// the IUT entity sends a vPOST containing
// uri indicating value CALLBACK_URL
// body containing
// subscriptionNotification containing
// terminalLocation containing
// address set to IP_ADDRESS
// ;
// ;
// ;
// ;
// to the MEC_APP entity
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a periodicNotificationSubscription ***");
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_UETRACKSUB_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TC_MEC_SRV_UETRACKSUB_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 & oct2char(unichar2oct(PX_UE_PERIODIC_SUB_URI, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_user_tracking_subscription(
m_user_tracking_subscription(
PX_CLIENT_ID, //clientCorrelator
// TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or
// change the test to use another trigger?
PX_UE_PERIODIC_SUB_CALLBACK_URI, // callbackReference
PX_IP_ADDRESS // address
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
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_UETRACKSUB_001_BR
/**
* @desc Check that the IUT acknowledges the cancellation of UE tracking notifications when commanded by a MEC Application
*/
testcase TC_MEC_SRV_UETRACKSUB_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 & oct2char(unichar2oct(PX_UE_PERIODIC_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with 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_UETRACKSUB_002_OK
/**
* @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
*/
testcase TC_MEC_SRV_UETRACKSUB_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 & oct2char(unichar2oct(PX_UE_LOC_USERTRACK_SUB_URI, "UTF-8")) & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "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
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with no 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_UETRACKSUB_002_NF
} // End of group ueTrackingSubscribe
} // End of module AtsMec_RadioNodeLocationAPI_TestCases