Newer
Older
* @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
*/
testcase TC_MEC_MEC013_SRV_UEINFOSUB_001_OK() runs on HttpComponent system HttpTestAdapter {
// 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_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 {
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
// 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_MEC013_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_MEC013_SRV_UEINFOSUB_001_BR() runs on HttpComponent system HttpTestAdapter {
// 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_UNKNOWN, //clientCorrelator
PX_TRAFFIC_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_MEC013_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_MEC013_SRV_UEINFOSUB_002_OK() runs on HttpComponent system HttpTestAdapter {
// 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")),
)
);
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_MEC013_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_MEC013_SRV_UEINFOSUB_002_NF() runs on HttpComponent system HttpTestAdapter {
// 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")),
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
)
);
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_MEC013_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_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter {
// 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_MEC013_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_MEC013_SRV_UELOCLOOK_001_BR() runs on HttpComponent system HttpTestAdapter {
// 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_MEC013_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_MEC013_SRV_UELOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter {
// 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_MEC013_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_MEC013_SRV_UELOCSUB_001_OK() runs on HttpComponent system HttpTestAdapter {
// 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 {
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
// 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_MEC013_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_MEC013_SRV_UELOCSUB_001_BR() runs on HttpComponent system HttpTestAdapter {
// 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_MEC013_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_MEC013_SRV_UELOCSUB_002_OK() runs on HttpComponent system HttpTestAdapter {
// 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")),
)
);
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_MEC013_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_MEC013_SRV_UELOCSUB_002_NF() runs on HttpComponent system HttpTestAdapter {
// 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")),
)
);
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_MEC013_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_MEC013_SRV_UETRACKSUB_001_OK() runs on HttpComponent system HttpTestAdapter {
// 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_USERTRACK_SUB_CALLBACK_URI, // callbackReference
-, -,
PX_CLIENT_ID //clientCorrelator
)
)
)
)
);
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_USERTRACK_SUB_CALLBACK_URI, // callbackReference
-, -,
PX_CLIENT_ID //clientCorrelator
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
// 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_MEC013_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_MEC013_SRV_UETRACKSUB_001_BR() runs on HttpComponent system HttpTestAdapter {
// 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_MEC013_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_MEC013_SRV_UETRACKSUB_002_OK() runs on HttpComponent system HttpTestAdapter {
// 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")),
)
);
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_MEC013_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_MEC013_SRV_UETRACKSUB_002_NF() runs on HttpComponent system HttpTestAdapter {
// 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")),
)
);
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_MEC013_SRV_UETRACKSUB_002_NF
} // End of group ueTrackingSubscribe
} // End of module AtsMec_RadioNodeLocationAPI_TestCases