Newer
Older
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
// Preamble
f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_user_location_event_subscription(
m_user_location_event_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
PX_USER,
PX_CLIENT_ID
))))));
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_location_event_subscription(
mw_user_location_event_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
PX_USER,
-,
PX_CLIENT_ID
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully updates userLocationPeriodicSubscription, SubscriptionId: ", v_subscription_id," ***");
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_delete_user_location_periodic_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01
* @desc Check that the IUT acknowledges a request to modify an existing subscription by a MEC Application
testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var UserLocationPeriodicNotification v_user_location_periodic_notification;
var charstring v_subscription_id;
// 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_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_user_location_periodic_subscription(
m_user_location_periodic_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
PX_USER,
PX_CLIENT_ID
))))));
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_location_periodic_subscription(
mw_user_location_periodic_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
PX_USER,
-,
PX_CLIENT_ID
)))))) {
log("*** " & testcasename() & ": PASS: IUT successfully updates userLocationPeriodicSubscription, SubscriptionId: ", v_subscription_id," ***");
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_delete_user_location_periodic_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02
* @desc Check that the IUT responds with an error when received an inconsistent request
testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var UserLocationEventNotification v_user_location_event_notification;
var charstring v_subscription_id;
// 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_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_user_location_event_subscription(
m_user_location_event_subscription(
"",
PX_USER,
PX_CLIENT_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 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_delete_user_location_periodic_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01
* @desc Check that the IUT responds with an error when received an inconsistent request
testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var UserLocationPeriodicNotification v_user_location_periodic_notification;
var charstring v_subscription_id;
// 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_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_user_location_periodic_subscription(
m_user_location_periodic_subscription(
"",
PX_USER,
PX_CLIENT_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 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_delete_user_location_periodic_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02
* @desc Check that the IUT acknowledges a request to modify a not existing subscription by a MEC Application
testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
// 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_put(
PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID,
v_headers,
m_http_message_body_json(
m_body_json_user_location_event_subscription(
m_user_location_event_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
PX_USER,
PX_CLIENT_ID
))))));
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 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_UELOCSUB_003_NF_01
* @desc Check that the IUT responds with an error when received an inconsistent request
testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02() 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();
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID,
v_headers,
m_http_message_body_json(
m_body_json_user_location_periodic_subscription(
m_user_location_periodic_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
PX_USER,
PX_CLIENT_ID
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
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
} // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02
} // End of group ueLocSub
group ueTestNot {
* @desc Check that the IUT provides a test notification when requested by a MEC Application
testcase TC_MEC_MEC013_SRV_UETESTNOT_001_OK() runs on HttpComponent system HttpTestAdapter {
var HttpMessage v_response;
var charstring v_subscription_id;
// 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;
f_cf_01_http_notif_up();
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_user_location_event_subscription(
m_user_location_event_subscription(
PX_CALLBACK_REF_URL,
PX_USER,
PX_CLIENT_ID,
true
))))));
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
// 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_location_event_subscription(
mw_user_location_event_subscription(
PX_CALLBACK_REF_URL,
PX_USER,
-,
PX_CLIENT_ID,
true
)))))) -> value v_response {
tc_ac.stop;
// Check HTTP Location header
if (f_check_headers(v_response.response.header) == false) {
log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_header_location;
f_get_header(v_response.response.header, "Location", v_header_location);
v_subscription_id := regexp(
v_header_location[0],
"?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)",
0
);
log("*** " & testcasename() & ": INFO: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***");
repeat; // Wait for test notification
}
}
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
-,
mw_http_message_body_json(
mw_body_json_test_notification(
mw_test_notification(
v_response.response.body.json_body.userLocationEventNotification.links_
)))))) {
tc_ac.stop;
// Send response
f_init_default_headers_list(-, -, v_headers);
httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers)));
log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaNotification ***");
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_delete_user_location_event_subscription(v_subscription_id);
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_MEC013_SRV_UETESTNOT_001_OK
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
/**
* @desc Check that the IUT terminates notifications after time expiration
*/
testcase TC_MEC_MEC013_SRV_UETESTNOT_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_subscription_id;
var boolean v_notification_received_after_expiry := false;
timer tc_expiry := PX_NOTIF_EXPIRY;
timer tc_expiry_guard := PX_NOTIF_EXPIRY / 2.0;
// 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_notif_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_LOC_API_USERS_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_user_location_event_subscription(
m_user_location_event_subscription(
PX_CALLBACK_REF_URL,
PX_USER,
PX_CLIENT_ID,
-, -, -, -,
m_time_stamp(
float2int(PX_NOTIF_EXPIRY)
)))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_user_location_event_subscription(
mw_user_location_event_subscription(
PX_CALLBACK_REF_URL,
PX_USER,
-,
PX_CLIENT_ID
)))))) -> value v_response {
// Check HTTP Location header
if (f_check_headers(v_response.response.header) == false) {
log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_header_location;
f_get_header(v_response.response.header, "Location", v_header_location);
v_subscription_id := regexp(
v_header_location[0],
"?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)",
0
);
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
log("*** " & testcasename() & ": INFO: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***");
tc_ac.start;
repeat; // Wait for test notification
}
}
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
-,
mw_http_message_body_json(
mw_body_json_test_notification(
mw_test_notification(
v_response.response.body.json_body.userLocationEventNotification.links_
)))))) {
tc_ac.stop;
// Send response
f_init_default_headers_list(-, -, v_headers);
httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers)));
log("*** " & testcasename() & ": INFO: Receive new notification ***");
v_notification_received_after_expiry := true;
tc_ac.start;
repeat;
}
[] tc_expiry.timeout {
v_notification_received_after_expiry := false;
tc_expiry_guard.start;
repeat;
}
[] tc_expiry_guard.timeout {
if (v_notification_received_after_expiry) {
log("*** " & testcasename() & ": FAIL: Received notification after expiration time ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
log("*** " & testcasename() & ": PASS: No more notification received ***");
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
f_delete_user_location_event_subscription(v_subscription_id);
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_MEC013_SRV_UETESTNOT_002_OK
} // End of group ueTestNot
group ueZoneLook {
// TODO
} // End of group ueZoneLook
* @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application
testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_subscription_id;
// 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();
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_zone_location_event_subscription(
m_zone_location_event_subscription(
PX_CALLBACK_REF_URL,
PX_CLIENT_ID,
PX_ZONE_ID
))))));
mw_http_response_201_created(
mw_body_json_zone_location_event_notification(
mw_zone_location_event_notification(
// FIXME
)))))) -> value v_response {
// Check HTTP Location header
if (f_check_headers(v_response.response.header) == false) {
log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_header_location;
f_get_header(v_response.response.header, "Location", v_header_location);
v_subscription_id := regexp(
v_header_location[0],
"?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***");
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
f_delete_zone_location_event_subscription(v_subscription_id);
} // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01
* @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application
testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02() runs on HttpComponent system HttpTestAdapter {
var ZoneLocationEventNotification v_zone_location_event_notification;
var charstring v_subscription_id;
// 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;
f_cf_01_http_notif_up();
f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id);
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-, -,
mw_http_message_body_json(
mw_body_json_zone_location_event_notification(
mw_zone_location_event_notification(
-,
v_zone_location_event_notification.links_
)))))) {
// Send response
var Headers v_headers;
f_init_default_headers_list(-, -, v_headers);
httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers)));
log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***");
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
f_delete_zone_location_event_subscription(v_subscription_id);
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02
* @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - OperationStatus constraint
testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01() runs on HttpComponent system HttpTestAdapter {
var HttpMessage v_response;
var charstring v_subscription_id;
// 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();
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_zone_status_subscription(
m_zone_status_subscription(
PX_AREA_SUB_CALLBACK_URI,
-,
PX_ZONE_ID,
-, -, -, -, -, -, -,
Serviceable
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_zone_status_notification(
mw_zone_status_notification(
-, -,
Serviceable
)))))) -> value v_response {
// Check HTTP Location header
if (f_check_headers(v_response.response.header) == false) {
log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_header_location;
f_get_header(v_response.response.header, "Location", v_header_location);
v_subscription_id := regexp(
v_header_location[0],
"?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***");
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
f_delete_zone_status_subscription(v_subscription_id);
} // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01
* @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - OperationStatus constraint
testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02() runs on HttpComponent system HttpTestAdapter {
var ZoneStatusNotification v_zone_status_notification;
var charstring v_subscription_id;
// 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;
f_cf_01_http_notif_up();
f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id);
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-, -,
mw_http_message_body_json(
mw_body_json_zone_status_notification(
mw_zone_status_notification(
v_zone_status_notification.links_
)))))) {
// Send response
var Headers v_headers;
f_init_default_headers_list(-, -, v_headers);
httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers)));
log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***");
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
f_delete_zone_status_subscription(v_subscription_id);
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02
* @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - UserNumEvent constraint
testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01() runs on HttpComponent system HttpTestAdapter {
var HttpMessage v_response;
var charstring v_subscription_id;
// 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();
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_zone_status_subscription(
m_zone_status_subscription(
PX_AREA_SUB_CALLBACK_URI,
-,
PX_ZONE_ID,
-, -, -,
PX_UPPER_NUM_USER_THRESHOLD,
PX_LOWER_NUM_USER_THRESHOLD
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_zone_status_notification(
mw_zone_status_notification(
// FIXME
)))))) -> value v_response {
// Check HTTP Location header
if (f_check_headers(v_response.response.header) == false) {
log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_header_location;
f_get_header(v_response.response.header, "Location", v_header_location);
v_subscription_id := regexp(
v_header_location[0],
"?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***");
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
f_delete_zone_status_subscription(v_subscription_id);
} // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01
* @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - UserNumEvent constraint
testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02() runs on HttpComponent system HttpTestAdapter {
var ZoneStatusNotification v_zone_status_notification;
var charstring v_subscription_id;
// 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;
f_cf_01_http_notif_up();
f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id, omit, PX_UPPER_NUM_USER_THRESHOLD, PX_LOWER_NUM_USER_THRESHOLD);
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-, -,
mw_http_message_body_json(
mw_body_json_zone_status_notification(
v_zone_status_notification
))))) {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***");
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
f_delete_zone_status_subscription(v_subscription_id);
} // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02
* @desc 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