Newer
Older
testcase TC_MEC_MEC013_SRV_UEZONESUB_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();
// 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,
m_body_json_zone_location_event_subscription(
m_zone_location_event_subscription(
"",
PX_CLIENT_ID,
PX_ZONE_ID
))))));
// 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
} // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_BR
* @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application
testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01() runs on HttpComponent system HttpTestAdapter {
var HttpMessage v_response;
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;
// Test component configuration
f_cf_01_http_up();
f_create_zone_location_event_subscription(v_zone_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_ZONES_SUB_URI & v_subscription_id,
m_body_json_zone_location_event_subscription(
m_zone_location_event_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
PX_CLIENT_ID,
PX_ZONE_ID
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_zone_location_event_subscription(
mw_zone_location_event_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
PX_CLIENT_ID,
PX_ZONE_ID
)))))) {
log("*** " & testcasename() & ": PASS: IUT successfully updates the zoneLocationEventSubscription ***");
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_002_OK_01
* @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application
testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_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;
// Test component configuration
f_cf_01_http_up();
f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id);
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_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_zone_status_subscription(
m_zone_status_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
-,
PX_ZONE_ID
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_zone_status_subscription(
mw_zone_status_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
-,
PX_ZONE_ID
)))))) {
log("*** " & testcasename() & ": PASS: IUT successfully updates with a zoneStatusSubscription ***");
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_002_OK_02
/**
* @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_UEZONESUB_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();
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & PX_NON_EXISTENT_SUBSCRIPTION_ID,
v_headers,
m_http_message_body_json(
m_body_json_zone_location_event_subscription(
m_zone_location_event_subscription(
PX_UE_NEW_SUB_CALLBACK_URI,
PX_CLIENT_ID,
PX_ZONE_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_UEZONESUB_002_NF
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
/**
* @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application
*/
testcase TC_MEC_MEC013_SRV_UEZONESUB_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
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;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_subscription_id,
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 204 No Content ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_003_OK
/**
* @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application
*/
testcase TC_MEC_MEC013_SRV_UEZONESUB_003_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID,
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 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_UEZONESUB_003_NF
} // End of group ueZoneSub