/**
* @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_UEAppInterfaceAPI_TestCases {
// Libcommon
import from LibCommon_Sync all;
// LibHttp
import from LibHttp_TypesAndValues all;
import from LibHttp_Functions all;
import from LibHttp_Templates all;
import from LibHttp_JsonTemplates all;
import from LibHttp_TestSystem all;
// LibMec/UEAppInterfaceAPI
import from UEAppInterfaceAPI_Templates all;
import from UEAppInterfaceAPI_Functions all;
import from UEAppInterfaceAPI_Pics all;
import from UEAppInterfaceAPI_Pixits all;
// LibMec
import from LibMec_Functions all;
import from LibMec_Pics all;
import from LibMec_Pixits all;
group ue_app_ctx {
/**
* @desc Check that the IUT acknowledges the creation of the application context when requested by an UE Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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 & PX_UE_APP_CTX_URI,
v_headers,
m_http_message_body_json(
m_body_json_app_context(
m_app_context(
PX_CONTEXT_ID,
PX_ASSOCIATE_UE_APP_ID,
m_required_app_info(
PX_APP_NAME,
PX_APP_PROVIDER,
PX_REFERENCE_URL
)))))));
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_app_context(
mw_app_context(
-,
-,
mw_required_app_info(
PX_APP_NAME
))))))) -> value v_response {
tc_ac.stop;
if (f_check_headers(v_response.response.header) == true) {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] 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_MEC016_MEO_UEAPPCTX_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_BR() 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_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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 & PX_UE_APP_CTX_URI,
v_headers,
m_http_message_body_json(
m_body_json_app_context(
m_app_context(
PX_CONTEXT_ID,
PX_ASSOCIATE_UE_APP_ID,
m_required_app_info(
PX_APP_NAME,
PX_APP_PROVIDER,
PX_REFERENCE_URL
)))))));
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 AppTerminationNotificationSubscription ***");
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_MEC016_MEO_UEAPPCTX_001_BR
/**
* @desc Check that the IUT updates the application callback reference when commanded by an UE Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK() 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_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_ue_app_ctx();
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
"/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)),
v_headers,
m_http_message_body_json(
m_body_json_app_context(
m_app_context(
PX_CONTEXT_ID,
PX_ASSOCIATE_UE_APP_ID,
m_required_app_info(
PX_APP_NAME,
PX_APP_PROVIDER,
PX_REFERENCE_URL
),
PX_CALLBACK_REF
))))));
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 a AppContext ***");
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_ue_app_ctx();
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_BR() 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_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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 & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)),
v_headers,
m_http_message_body_json(
m_body_json_app_context(
m_app_context(
PX_CONTEXT_ID,
PX_ASSOCIATE_UE_APP_ID,
m_required_app_info(
PX_APP_NAME,
PX_APP_PROVIDER,
PX_REFERENCE_URL
),
PX_CALLBACK_REF
))))));
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 AppContext ***");
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_MEC016_MEO_UEAPPCTX_002_BR
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_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_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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 & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)),
v_headers,
m_http_message_body_json(
m_body_json_app_context(
m_app_context(
PX_NON_EXISTENT_CONTEXT_ID,
PX_ASSOCIATE_UE_APP_ID,
m_required_app_info(
PX_APP_NAME,
PX_APP_PROVIDER,
PX_REFERENCE_URL
),
PX_CALLBACK_REF
))))));
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 AppContext ***");
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_MEC016_MEO_UEAPPCTX_002_NF
/**
* @desc Check that the IUT deletes the application context when commanded by an UE Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_OK() 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_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_ue_app_ctx();
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
"/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_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 delete AppContext ***");
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_MEC016_MEO_UEAPPCTX_003_OK
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPCTX_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_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_ue_app_ctx();
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
"/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_CONTEXT_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 delete AppContext ***");
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_MEC016_MEO_UEAPPCTX_003_NF
} // End of group ue_app_ctx
group ue_apps {
/**
* @desc Check that the IUT responds with the list of user applications available when requested by an UE Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_ue_app_ctx();
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_APP_NAME)),
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_app_info(
{ *, mw_appInfo_list(PX_APP_NAME), *}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***");
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_create_ue_app_ctx();
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPS_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_ue_app_ctx();
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_APP_NAME)) & "&serviceCont=unknown", // Wrong URI
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 AppInfo ***");
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_create_ue_app_ctx();
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_BR
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2
*/
testcase TC_MEC_MEC016_MEO_UEAPPS_001_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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 & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_NAME)),
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 AppInfo ***");
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_MEC016_MEO_UEAPPS_001_NF
} // End of group ue_apps
} // End of module AtsMec_UEAppInterfaceAPI_TestCases
module AtsMec_TestControl {
// LibMec/LocationAPI
import from LocationAPI_Pics all;
// LibMec/UEidentityAPI
import from UEidentityAPI_Pics all;
// LibMec/RnisAPI
import from RnisAPI_Pics all;
// LibMec/TrafficManagementAPI
import from TrafficManagementAPI_Pics all;
// LibMec/AppEnablementAPI
import from EdgePlatformApplicationEnablementAPI_Pics all;
// LibMec/UEAppInterfaceAPI
import from UEAppInterfaceAPI_Pics all;
// LibMec
import from LibMec_Pics all;
// AtsMec
import from AtsMec_LocationAPI_TestCases all;
import from AtsMec_UEidentityAPI_TestCases all;
// import from AtsMec_RadioNodeLocationAPI_TestCases all;
import from AtsMec_RnisAPI_TestCases all;
import from AtsMec_TrafficManagementAPI_TestCases all;
import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all;
import from AtsMec_UEAppInterfaceAPI_TestCases all;
control {
if (PICS_MEC_PLAT and PICS_SERVICES) {
if (PICS_UE_IDENTITY_API_SUPPORTED) {
execute(TC_MEC_MEC014_SRV_UETAG_001_OK());
execute(TC_MEC_MEC014_SRV_UETAG_001_BR());
execute(TC_MEC_MEC014_SRV_UETAG_001_NF());
execute(TC_MEC_MEC014_SRV_UETAG_002_OK());
execute(TC_MEC_MEC014_SRV_UETAG_002_BR());
execute(TC_MEC_MEC014_SRV_UETAG_002_PF());
}
if (PICS_LOCATION_API_SUPPORTED) {
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF());
execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK());
execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF());
// execute(TC_MEC_PLAT_RLOC_001_OK());
// execute(TC_MEC_PLAT_RLOC_001_NF());
}
if (PICS_APP_ENABLEMENT_API_SUPPORTED) {
/*execute(TC_MEC_SRV_TRANS_001_OK());
execute(TC_MEC_SRV_TRAF_001_OK());
execute(TC_MEC_SRV_TRAF_002_OK());
execute(TC_MEC_SRV_TRAF_003_OK());
execute(TC_MEC_SRV_TRAF_001_NF());*/
}
if (PICS_ENABLE_UE_APP_CTX) {
execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF());
execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK());
execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR());
execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF());
}
}
/*if (PICS_RNIS) {
if (PICS_RNIS_NOTIFICATIONS) {
execute(TC_MEC_MEC012_SRV_RNIS_001_OK());
execute(TC_MEC_MEC012_SRV_RNIS_002_OK());
execute(TC_MEC_MEC012_SRV_RNIS_003_OK());
execute(TC_MEC_MEC012_SRV_RNIS_004_OK());
}
if (PICS_RNIS_ALL_SUBSCRIPTIONS) {
execute(TC_MEC_MEC012_SRV_RNIS_011_OK());
execute(TC_MEC_MEC012_SRV_RNIS_012_OK());
execute(TC_MEC_MEC012_SRV_RNIS_011_BR());
execute(TC_MEC_MEC012_SRV_RNIS_012_BR());
}
if (PICS_RNIS_QUERY) {
execute(TC_MEC_MEC012_SRV_RNIS_016_OK());
execute(TC_MEC_MEC012_SRV_RNIS_016_BR());
execute(TC_MEC_MEC012_SRV_RNIS_016_NF());
execute(TC_MEC_MEC012_SRV_RNIS_017_OK());
execute(TC_MEC_MEC012_SRV_RNIS_017_BR());
execute(TC_MEC_MEC012_SRV_RNIS_017_NF());
execute(TC_MEC_MEC012_SRV_RNIS_018_OK());
execute(TC_MEC_MEC012_SRV_RNIS_018_BR());
execute(TC_MEC_MEC012_SRV_RNIS_018_NF());
execute(TC_MEC_MEC012_SRV_RNIS_019_OK());
execute(TC_MEC_MEC012_SRV_RNIS_019_BR());
execute(TC_MEC_MEC012_SRV_RNIS_019_NF());
}
}*/
if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) {
execute(TC_MEC_MEC015_SRV_TM_001_OK());
execute(TC_MEC_MEC015_SRV_TM_002_OK());
execute(TC_MEC_MEC015_SRV_TM_002_BR());
execute(TC_MEC_MEC015_SRV_TM_002_NF());
}
} // End of 'control' statement
} // End of module AtsMec_TestControl
module AtsMec_TestControl {
// LibMec/LocationAPI
import from LocationAPI_Pics all;
// LibMec/UEidentityAPI
import from UEidentityAPI_Pics all;
// LibMec/RnisAPI
import from RnisAPI_Pics all;
// LibMec/TrafficManagementAPI
import from TrafficManagementAPI_Pics all;
// LibMec/AppEnablementAPI
import from EdgePlatformApplicationEnablementAPI_Pics all;
// LibMec/UEAppInterfaceAPI
import from UEAppInterfaceAPI_Pics all;
// LibMec
import from LibMec_Pics all;
// AtsMec
import from AtsMec_LocationAPI_TestCases all;
import from AtsMec_UEidentityAPI_TestCases all;
// import from AtsMec_RadioNodeLocationAPI_TestCases all;
import from AtsMec_RnisAPI_TestCases all;
import from AtsMec_TrafficManagementAPI_TestCases all;
import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all;
import from AtsMec_UEAppInterfaceAPI_TestCases all;
control {
if (PICS_MEC_PLAT and PICS_SERVICES) {
if (PICS_UE_IDENTITY_API_SUPPORTED) {
execute(TC_MEC_MEC014_SRV_UETAG_001_OK());
execute(TC_MEC_MEC014_SRV_UETAG_001_BR());
execute(TC_MEC_MEC014_SRV_UETAG_001_NF());
execute(TC_MEC_MEC014_SRV_UETAG_002_OK());
execute(TC_MEC_MEC014_SRV_UETAG_002_BR());
execute(TC_MEC_MEC014_SRV_UETAG_002_PF());
}
if (PICS_LOCATION_API_SUPPORTED) {
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF());
execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK());
execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF());
// execute(TC_MEC_PLAT_RLOC_001_OK());
// execute(TC_MEC_PLAT_RLOC_001_NF());
}
if (PICS_APP_ENABLEMENT_API_SUPPORTED) {
/*execute(TC_MEC_SRV_TRANS_001_OK());
execute(TC_MEC_SRV_TRAF_001_OK());
execute(TC_MEC_SRV_TRAF_002_OK());
execute(TC_MEC_SRV_TRAF_003_OK());
execute(TC_MEC_SRV_TRAF_001_NF());*/
}
if (PICS_ENABLE_UE_APP_CTX) {
execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK());
execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF());
execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK());
execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR());
execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF());
}
}
/*if (PICS_RNIS) {
if (PICS_RNIS_NOTIFICATIONS) {
execute(TC_MEC_MEC012_SRV_RNIS_001_OK());
execute(TC_MEC_MEC012_SRV_RNIS_002_OK());
execute(TC_MEC_MEC012_SRV_RNIS_003_OK());
execute(TC_MEC_MEC012_SRV_RNIS_004_OK());
}
if (PICS_RNIS_ALL_SUBSCRIPTIONS) {
execute(TC_MEC_MEC012_SRV_RNIS_011_OK());
execute(TC_MEC_MEC012_SRV_RNIS_012_OK());
execute(TC_MEC_MEC012_SRV_RNIS_011_BR());
execute(TC_MEC_MEC012_SRV_RNIS_012_BR());
}
if (PICS_RNIS_QUERY) {
execute(TC_MEC_MEC012_SRV_RNIS_016_OK());
execute(TC_MEC_MEC012_SRV_RNIS_016_BR());
execute(TC_MEC_MEC012_SRV_RNIS_016_NF());
execute(TC_MEC_MEC012_SRV_RNIS_017_OK());
execute(TC_MEC_MEC012_SRV_RNIS_017_BR());
execute(TC_MEC_MEC012_SRV_RNIS_017_NF());
execute(TC_MEC_MEC012_SRV_RNIS_018_OK());
execute(TC_MEC_MEC012_SRV_RNIS_018_BR());
execute(TC_MEC_MEC012_SRV_RNIS_018_NF());
execute(TC_MEC_MEC012_SRV_RNIS_019_OK());
execute(TC_MEC_MEC012_SRV_RNIS_019_BR());
execute(TC_MEC_MEC012_SRV_RNIS_019_NF());
}
}*/
if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) {
execute(TC_MEC_MEC015_SRV_TM_001_OK());
execute(TC_MEC_MEC015_SRV_TM_002_OK());
execute(TC_MEC_MEC015_SRV_TM_002_BR());
execute(TC_MEC_MEC015_SRV_TM_002_NF());
}
} // End of 'control' statement
} // End of module AtsMec_TestControl
/**
* @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 021 V2.1.1
*/
module AtsMec_ApplicationMobiltyServiceAPI_TestCases {
// JSON
import from Json all;
// Libcommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_Sync all;
// LibHttp
import from LibHttp_TypesAndValues all;
import from LibHttp_Functions all;
import from LibHttp_Templates all;
import from LibHttp_JsonTemplates all;
import from LibHttp_TestSystem all;
// LibMec_ApplicationMobiltyServiceAPI
import from ApplicationMobilityServiceAPI_TypesAndValues all;
import from ApplicationMobilityServiceAPI_Templates all;
import from ApplicationMobilityServiceAPI_Functions all;
import from ApplicationMobilityServiceAPI_Pics all;
import from ApplicationMobilityServiceAPI_Pixits all;
// LibMec
import from LibMec_TypesAndValues all;
import from LibMec_Templates all;
import from LibMec_Functions all;
import from LibMec_Pics all;
import from LibMec_Pixits all;
group appMobilityServices {
/**
* @desc Check that the AMS service returns information about the registered application mobility services when requested
*/
testcase TC_MEC_MEC021_SRV_AMS_001_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(-, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_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_ams_registration_info_list(
{
*,
v_registration_info_1,
v_registration_info_2,
*
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***");
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_application_mobility_services(v_registration_info_1.appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_01
/**
* @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - filter
*/
testcase TC_MEC_MEC021_SRV_AMS_001_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(-, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & v_registration_info_1.appMobilityServiceId & ")",
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_ams_registration_info_list(
{
*,
v_registration_info_1,
*
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***");
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_application_mobility_services(v_registration_info_1.appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_02
/**
* @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - filter
*/
testcase TC_MEC_MEC021_SRV_AMS_001_OK_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(-, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,serviceConsumerId[appInstanceId]," & PX_APP_INS_ID_2 & ")",
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_ams_registration_info_list(
{
*,
v_registration_info_2,
*
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***");
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_application_mobility_services(v_registration_info_1.appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_03
/**
* @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - exclude_fields
*/
testcase TC_MEC_MEC021_SRV_AMS_001_OK_04() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(-, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & v_registration_info_1.appMobilityServiceId & "&exclude_fields=[deviceInformation])",
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_ams_registration_info_list(
{
*,
mw_registration_info(
v_registration_info_1.appMobilityServiceId,
mw_service_consumer_id(
PX_APP_INS_ID,
PX_MEP_ID
)),
*
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***");
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_application_mobility_services(v_registration_info_1.appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_04
/**
* @desc Check that the AMS service returns information about the registered application mobility services when requested - No registered application mobility service
*/
testcase TC_MEC_MEC021_SRV_AMS_001_OK_05() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS 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_get(
PICS_ROOT_API & PX_ME_APP_AMS_URI,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok_no_body
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an empty body ***");
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_MEC021_SRV_AMS_001_OK_05
/**
* @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters
*/
testcase TC_MEC_MEC021_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(-, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & "?filter=(appMobilityServiceId,eq," & v_registration_info_1.appMobilityServiceId & ")", // Wrong syntax
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(
mw_http_message_body_json(
mw_body_json_problem_details(
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);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_001_BR
/**
* @desc Check that the AMS service creates a new application mobility services when requested
*/
testcase TC_MEC_MEC021_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var Json.String v_app_mobility_service_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS 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_ME_APP_AMS_URI,
v_headers,
m_http_message_body_json(
m_body_json_ams_registration_info(
m_registration_info(
-,
m_service_consumer_id(
PX_APP_INS_ID
)))))));
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_ams_registration_info(
mw_registration_info(
?,
mw_service_consumer_id(
PX_APP_INS_ID
))))))) -> value v_response {
tc_ac.stop;
v_app_mobility_service_id := v_response.response.body.json_body.registrationInfo.appMobilityServiceId;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a v_app_mobility_service_id ", v_app_mobility_service_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_application_mobility_services(v_app_mobility_service_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_002_OK
/**
* @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service
*/
testcase TC_MEC_MEC021_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var Json.String v_app_mobility_service_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS 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_ME_APP_AMS_URI,
v_headers,
m_http_message_body_json(
m_body_json_ams_registration_info(
m_registration_info(
PX_APP_INS_ID, // Wrong field value: Shall be absent in POST requests, and present otherwise
m_service_consumer_id(
PX_APP_INS_ID
)))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***");
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_MEC021_SRV_AMS_002_BR
} // End of group appMobilityServices
group appMobilityServicesSubscriptions {
/**
* @desc Check that the AMS service returns information about the available subscriptions when requested
*/
testcase TC_MEC_MEC021_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & v_mobility_procedure_subscription.subscriptionType,
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_ams_subscriptions(
mw_subscription_link_list(
v_mobility_procedure_subscription.links,
mw_subscription(
-,
v_mobility_procedure_subscription.subscriptionType
))))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***");
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_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_down();
} // END TC_MEC_MEC021_SRV_AMS_003_OK
/**
* @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions
*/
testcase TC_MEC_MEC021_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS 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_get(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=info_app_adj", // Wrong parameter
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 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 TC_MEC_MEC021_SRV_AMS_003_BR
/**
* @desc Check that the AMS service creates a notification subscriptions when requested
*/
testcase TC_MEC_MEC021_SRV_AMS_004_OK() 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_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS 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_ME_APP_AMS_SUBS,
v_headers,
m_http_message_body_json(
m_body_json_ams_mobility_procedure_subscription(
m_mobility_procedure_subscription(
PX_CALLBACK_REFERENCE,
m_filter_criteria
))))));
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_ams_mobility_procedure_subscription(
mw_mobility_procedure_subscription(
PX_CALLBACK_REFERENCE,
mw_filter_criteria,
mw_links
)))))) -> 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 Area 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_ME_APP_AMS_SUBS & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status code, 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_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of TC_MEC_MEC021_SRV_AMS_004_OK
/**
* @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription
*/
testcase TC_MEC_MEC021_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS,
v_headers,
m_http_message_body_json(
m_body_json_ams_mobility_procedure_subscription(
m_mobility_procedure_subscription_error(
PX_CALLBACK_REFERENCE,
m_filter_criteria
))))));
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 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_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of TC_MEC_MEC021_SRV_AMS_004_BR
/**
* @desc Check that the AMS service returns information about a given subscription when requested
*/
testcase TC_MEC_MEC021_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & 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_ok(
mw_http_message_body_json(
mw_body_json_ams_mobility_procedure_subscription(
v_mobility_procedure_subscription
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct subscription ***");
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_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of TC_MEC_MEC021_SRV_AMS_005_OK
/**
* @desc Check that the AMS service returns an error when receives a query about a not existing subscription
*/
testcase TC_MEC_MEC021_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & 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 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_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of TC_MEC_MEC021_SRV_AMS_005_NF
/**
* @desc Check that the AMS service deletes a given subscription when requested
*/
testcase TC_MEC_MEC021_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & 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 the correct 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 TC_MEC_MEC021_SRV_AMS_006_OK
/**
* @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription
*/
testcase TC_MEC_MEC021_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & 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 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_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of TC_MEC_MEC021_SRV_AMS_006_NF
/**
* @desc Check that the AMS service modifies a given subscription when requested
*/
testcase TC_MEC_MEC021_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_ams_mobility_procedure_subscription(
m_mobility_procedure_subscription(
PX_CALLBACK_REFERENCE,
m_filter_criteria(
PX_APP_INS_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_ams_mobility_procedure_subscription(
m_mobility_procedure_subscription(
PX_CALLBACK_REFERENCE,
m_filter_criteria(
PX_APP_INS_ID
))))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully updates successfully the subscription ***");
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_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of TC_MEC_MEC021_SRV_AMS_007_OK
/**
* @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription
*/
testcase TC_MEC_MEC021_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_ams_mobility_procedure_subscription(
m_mobility_procedure_subscription_error(
PX_CALLBACK_REFERENCE,
m_filter_criteria(
PX_APP_INS_ID
)))))));
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 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_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of TC_MEC_MEC021_SRV_AMS_007_BR
/**
* @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription
*/
testcase TC_MEC_MEC021_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID,
v_headers,
m_http_message_body_json(
m_body_json_ams_mobility_procedure_subscription(
m_mobility_procedure_subscription(
PX_CALLBACK_REFERENCE,
m_filter_criteria(
PX_APP_INS_ID
)))))));
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 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_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of TC_MEC_MEC021_SRV_AMS_007_NF
} // End of group appMobilityServicesSubscriptions
group ams_notifications {
/**
* @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated
*/
testcase TC_MEC_MEC021_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_notif_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
action("Trigger a mobility procedure event");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_wait.start;
alt {
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
-,
mw_http_message_body_json(
mw_body_json_mobility_procedure_notification(
mw_mobility_procedure_notification(
v_mobility_procedure_subscription.links
)))))) {
tc_wait.stop;
// Send 204 No Content
f_init_default_headers_list(-, -, v_headers);
httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers)));
log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_mobility_procedure_subscription(v_subscription_id);
f_cf_01_http_notif_down();
} // End of TC_MEC_MEC021_SRV_AMS_008_OK
/**
* @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated
*/
testcase TC_MEC_MEC021_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var AdjacentAppInfoSubscription v_adjacent_appInfo_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_notif_up();
// Preamble
f_create_adjacent_appInfo_subscription(v_adjacent_appInfo_subscription, v_subscription_id);
action("Trigger a mobility procedure event");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_wait.start;
alt {
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
-,
mw_http_message_body_json(
mw_body_json_adjacent_app_info_notification(
mw_adjacent_app_info_notification(
v_adjacent_appInfo_subscription.links
)))))) {
tc_wait.stop;
// Send 204 No Content
f_init_default_headers_list(-, -, v_headers);
httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers)));
log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent appInfo notification ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_adjacent_appInfo_subscription(v_subscription_id);
f_cf_01_http_notif_down();
} // End of TC_MEC_MEC021_SRV_AMS_009_OK
/**
* @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated
*/
testcase TC_MEC_MEC021_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MobilityProcedureSubscription v_mobility_procedure_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_notif_up();
// Preamble
f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id);
action("Trigger a mobility procedure event");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_wait.start;
alt {
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
-,
mw_http_message_body_json(
mw_body_json_mobility_procedure_notification(
mw_mobility_procedure_notification(
v_mobility_procedure_subscription.links
)))))) {
tc_wait.stop;
// Send 204 No Content
f_init_default_headers_list(-, -, v_headers);
httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers)));
log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***");
repeat;
}
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
-,
mw_http_message_body_json(
mw_body_json_expire_notification(
mw_expire_notification
))))) {
tc_wait.stop;
log("*** " & testcasename() & ": PASS: IUT successfully sends expiry notification ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_mobility_procedure_subscription(v_subscription_id);
} // End of TC_MEC_MEC021_SRV_AMS_009_OK
} // End of group ams_notifications
group individualAppMobilityService {
/**
* @desc Check that the AMS service returns information about this individual application mobility service
*/
testcase TC_MEC_MEC021_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")),
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_ams_registration_info(
v_registration_info_1
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a the correct RegistrationInfo ***");
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_application_mobility_services(v_registration_info_1.appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_011_OK
/**
* @desc Check that the AMS service sends an error when receives a query about a not existing individual application mobility service
*/
testcase TC_MEC_MEC021_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_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 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_application_mobility_services(v_registration_info_1.appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_011_NF
/**
* @desc Check that the AMS service modifies the individual application mobility service when requested
*/
testcase TC_MEC_MEC021_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
v_registration_info_1.serviceConsumerId.appInstanceId := PX_APP_INS_ID_NEW;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_ams_registration_info(
v_registration_info_1
)))));
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_ams_registration_info(
v_registration_info_1
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully updates with a the correct RegistrationInfo ***");
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_application_mobility_services(v_registration_info_1.appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_012_OK
/**
* @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters
*/
testcase TC_MEC_MEC021_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
var Json.String v_appMobilityServiceId;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
v_appMobilityServiceId := v_registration_info_1.appMobilityServiceId;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_ams_registration_info(
v_registration_info_1
)))));
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 updates with a 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_application_mobility_services(v_appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_012_BR
/**
* @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service
*/
testcase TC_MEC_MEC021_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info_1;
var RegistrationInfo v_registration_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1);
f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2);
v_registration_info_1.serviceConsumerId.appInstanceId := PX_APP_INS_ID_NEW;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_ams_registration_info(
v_registration_info_1
)))));
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 updates with a 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_application_mobility_services(v_registration_info_1.appMobilityServiceId);
f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_012_NF
/**
* @desc Check that the AMS service de-register the individual application mobility service and delete the resource that represents the individual application mobility service
*/
testcase TC_MEC_MEC021_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info.appMobilityServiceId, "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 deletes the RegistrationInfo ***");
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_MEC021_SRV_AMS_013_OK
/**
* @desc Check that the AMS service sends an error when is requested to delete the resource that represents the individual application mobility service
*/
testcase TC_MEC_MEC021_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_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 de-registers the RegistrationInfo ***");
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_MEC021_SRV_AMS_013_NF
} // End of group individualAppMobilityService
group appMobilityServiceDeregisterTask {
/**
* @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service
*/
testcase TC_MEC_MEC021_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info.appMobilityServiceId, "UTF-8")) & "/deregisterTask",
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_ams_registration_info_list(
{
*,
v_registration_info,
*
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully deregisters the registerInfo ***");
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_MEC021_SRV_AMS_014_OK
/**
* @desc Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service
*/
testcase TC_MEC_MEC021_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var RegistrationInfo v_registration_info;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask",
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 deregisters the registerInfo ***");
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_MEC021_SRV_AMS_014_NF
} // End of group appMobilityServiceDeregisterTask
group adjacentApplicationInstances {
/**
* @desc Check that the AMS service returns information about the registered application mobility services when requested
*/
testcase TC_MEC_MEC021_SRV_AMS_015_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var AdjacentAppInstanceInfo v_adjacent_app_instance_info_1;
var AdjacentAppInstanceInfo v_adjacent_app_instance_info_2;
// Test control
if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Preamble
f_create_adjacent_app_instance_info(-, -, m_communication_interface({{ host := PX_HOST, port_ := PX_PORT }}), v_adjacent_app_instance_info_1);
f_create_adjacent_app_instance_info(PX_APP_INS_ID_2, PX_APP_ID_2, m_communication_interface({{ host := PX_HOST, port_ := PX_PORT }}), v_adjacent_app_instance_info_2);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_APP_AMS_QUERIES_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_ams_adjacent_app_instance_info_list(
{
*,
v_adjacent_app_instance_info_1,
v_adjacent_app_instance_info_2,
*
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***");
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_adjacent_app_instance_info(v_adjacent_app_instance_info_1.appInstanceId);
f_delete_adjacent_app_instance_info(v_adjacent_app_instance_info_2.appInstanceId);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC021_SRV_AMS_015_OK_01
} // End of group adjacentApplicationInstances
} // End of module AtsMec_ApplicationMobiltyServiceAPI_TestCases
module AtsMec_ApplicationMobiltyServiceAPI_TestControl {
// LibMec_ApplicationMobiltyServiceAPI
import from ApplicationMobilityServiceAPI_Pics all;
// LibMec
import from LibMec_Pics all;
// AtsMec
import from AtsMec_ApplicationMobiltyServiceAPI_TestCases all;
control {
if (PICS_MEC_PLAT and PICS_SERVICES) {
execute(TC_MEC_MEC021_SRV_AMS_001_OK_01());
execute(TC_MEC_MEC021_SRV_AMS_001_OK_02());
execute(TC_MEC_MEC021_SRV_AMS_001_OK_03());
execute(TC_MEC_MEC021_SRV_AMS_001_OK_04());
execute(TC_MEC_MEC021_SRV_AMS_001_OK_05());
execute(TC_MEC_MEC021_SRV_AMS_001_BR());
execute(TC_MEC_MEC021_SRV_AMS_002_OK());
execute(TC_MEC_MEC021_SRV_AMS_002_BR());
execute(TC_MEC_MEC021_SRV_AMS_003_OK());
execute(TC_MEC_MEC021_SRV_AMS_003_BR());
execute(TC_MEC_MEC021_SRV_AMS_004_OK());
execute(TC_MEC_MEC021_SRV_AMS_004_BR());
execute(TC_MEC_MEC021_SRV_AMS_005_OK());
execute(TC_MEC_MEC021_SRV_AMS_005_NF());
execute(TC_MEC_MEC021_SRV_AMS_006_OK());
execute(TC_MEC_MEC021_SRV_AMS_006_NF());
execute(TC_MEC_MEC021_SRV_AMS_007_OK());
execute(TC_MEC_MEC021_SRV_AMS_007_BR());
execute(TC_MEC_MEC021_SRV_AMS_007_NF());
execute(TC_MEC_MEC021_SRV_AMS_008_OK());
execute(TC_MEC_MEC021_SRV_AMS_009_OK());
execute(TC_MEC_MEC021_SRV_AMS_009_OK());
execute(TC_MEC_MEC021_SRV_AMS_011_OK());
execute(TC_MEC_MEC021_SRV_AMS_011_NF());
execute(TC_MEC_MEC021_SRV_AMS_012_OK());
execute(TC_MEC_MEC021_SRV_AMS_012_BR());
execute(TC_MEC_MEC021_SRV_AMS_012_NF());
execute(TC_MEC_MEC021_SRV_AMS_013_OK());
execute(TC_MEC_MEC021_SRV_AMS_013_NF());
execute(TC_MEC_MEC021_SRV_AMS_014_OK());
execute(TC_MEC_MEC021_SRV_AMS_014_NF());
execute(TC_MEC_MEC021_SRV_AMS_015_OK_01());
}
} // End of 'control' statement
} // End of module AtsMec_ApplicationMobiltyServiceAPI_TestControl
suite := AtsMec
suite := AtsMec_ApplicationMobiltyService
sources := \
AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \
AtsMec_TrafficManagementAPI_TestCases.ttcn \
AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \
AtsMec_LocationAPI_TestCases.ttcn \
AtsMec_RnisAPI_TestCases.ttcn \
AtsMec_TestControl.ttcn \
AtsMec_UEAppInterfaceAPI_TestCases.ttcn \
AtsMec_UEidentityAPI_TestCases.ttcn \
AtsMec_V2XInformationServiceAPI_TestCases.ttcn \
AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \
AtsMec_WlanInformationAPI_TestCases.ttcn \
AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \
# AtsMec_Ams_TestCases.ttcn \
# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \
# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \
AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn \
AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn
modules := ../LibCommon \
../LibIts \
../LibIts/ttcn/Http \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
../LibMec/LocationAPI \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/LocationAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
../LibMec/DeviceApplicationInterfaceAPI \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FixedAccessInformationAPI \
../LibMec/IoTAPI \
../LibMec/FederationEnablementAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibHttp \
../../ccsrc/EncDec/LibMec \
../../ccsrc/Framework \
../../ccsrc/externals \
../../ccsrc/loggers \
../../ccsrc/Protocols/ETH \
../../ccsrc/Protocols/Http \
../../ccsrc/Protocols/Json \
../../ccsrc/Protocols/Pcap \
../../ccsrc/Protocols/Tcp \
../modules/titan.TestPorts.Common_Components.Abstract_Socket \
module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl {
// LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI
import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all;
// LibMec
import from LibMec_Pics all;
// AtsMec
import from AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases all;
control {
if (PICS_MEC_PLAT) {
if (PICS_APP_PACKAGE_MANAGEMENT) {
if (PICS_IUT_MEO) {
if (PICS_GRANTS_MANAGEMENT) {
execute(TC_MEC_MEC010p2_MEO_GRANT_001_OK());
execute(TC_MEC_MEC010p2_MEO_GRANT_001_BR());
execute(TC_MEC_MEC010p2_MEO_GRANT_002_OK());
execute(TC_MEC_MEC010p2_MEO_GRANT_003_OK());
execute(TC_MEC_MEC010p2_MEO_GRANT_004_OK());
execute(TC_MEC_MEC010p2_MEO_GRANT_005_OK());
execute(TC_MEC_MEC010p2_MEO_GRANT_006_OK());
execute(TC_MEC_MEC010p2_MEO_GRANT_006_NF());
}
if (PICS_APP_PACKAGE_MANAGEMENT) {
execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR());
execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR());
execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR());
execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR());
execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01());
execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02());
execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF());
}
if (PICS_APP_PACKAGE_NOTIFICATIONS) {
execute(TC_MEC_MEC010p2_MEO_PKGM_010_OK());
}
}
if (PICS_IUT_MEPM) {
if (PICS_APP_PACKAGE_MANAGEMENT) {
execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR());
execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR());
execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR());
execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR());
execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01());
execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02());
execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK());
execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF());
execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF());
execute(TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_001_BR());
execute(TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_002_NF());
execute(TC_MEC_MEC010p2_MEPM_PKGM_003_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_003_BR());
execute(TC_MEC_MEC010p2_MEPM_PKGM_004_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_005_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_006_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_006_NF());
execute(TC_MEC_MEC007p2_MEPM_PKGM_007_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_008_NA());
execute(TC_MEC_MEC010p2_MEPM_PKGM_011_NA());
execute(TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF());
execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF());
execute(TC_MEC_MEC010p2_MEPM_LCM_01_OK());
execute(TC_MEC_MEC010p2_MEPM_LCM_01_BR());
if (PICS_APP_PACKAGE_NOTIFICATIONS) {
execute(TC_MEC_MEC010p2_MEPM_PKGM_009_OK());
execute(TC_MEC_MEC010p2_MEPM_PKGM_009_NF());
execute(TC_MEC_MEC010p2_MEPM_PKGM_010_FO());
}
}
}
if (PICS_IUT_MEX) {
if (PIC_APP_LCM_MANAGEMENT) {
execute(TC_MEC_MEC010p2_MEX_LCM_001_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_001_BR());
execute(TC_MEC_MEC010p2_MEX_LCM_002_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_003_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_003_NF());
execute(TC_MEC_MEC010p2_MEX_LCM_004_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_004_NF());
execute(TC_MEC_MEC010p2_MEX_LCM_005_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_005_BR());
execute(TC_MEC_MEC010p2_MEX_LCM_005_NF());
execute(TC_MEC_MEC010p2_MEX_LCM_006_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_006_BR());
execute(TC_MEC_MEC010p2_MEX_LCM_006_NF());
execute(TC_MEC_MEC010p2_MEX_LCM_007_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_007_BR());
execute(TC_MEC_MEC010p2_MEX_LCM_007_NF());
execute(TC_MEC_MEC010p2_MEX_LCM_008_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_009_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_009_NF());
execute(TC_MEC_MEC010p2_MEX_LCM_010_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_010_BR());
execute(TC_MEC_MEC010p2_MEX_LCM_011_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_012_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_012_NF());
execute(TC_MEC_MEC010p2_MEX_LCM_013_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_013_NF());
execute(TC_MEC_MEC010p2_MEX_LCM_014_OK());
execute(TC_MEC_MEC010p2_MEX_LCM_014_BR());
execute(TC_MEC_MEC010p2_MEX_LCM_014_NF());
execute(TC_MEC_MEC010p2_MEX_LCM_017_OK());
}
}
}
}
} // End of 'control' statement
} // End of module AtsMec_TestControl
suite := AtsMec
suite := AtsMec_ApplicationPackageLifecycleAndOperationGranting
sources := \
AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \
AtsMec_TrafficManagementAPI_TestCases.ttcn \
AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \
AtsMec_LocationAPI_TestCases.ttcn \
AtsMec_RnisAPI_TestCases.ttcn \
AtsMec_TestControl.ttcn \
AtsMec_UEAppInterfaceAPI_TestCases.ttcn \
AtsMec_UEidentityAPI_TestCases.ttcn \
AtsMec_V2XInformationServiceAPI_TestCases.ttcn \
AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \
AtsMec_WlanInformationAPI_TestCases.ttcn \
AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \
# AtsMec_Ams_TestCases.ttcn \
# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \
# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \
AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn
modules := ../LibCommon \
../LibIts \
../LibIts/ttcn/Http \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/LocationAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
../LibMec/DeviceApplicationInterfaceAPI \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FixedAccessInformationAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibHttp \
../../ccsrc/EncDec/LibMec \
../../ccsrc/Framework \
../../ccsrc/externals \
../../ccsrc/loggers \
../../ccsrc/Protocols/ETH \
../../ccsrc/Protocols/Http \
../../ccsrc/Protocols/Json \
../../ccsrc/Protocols/Pcap \
../../ccsrc/Protocols/Tcp \
../modules/titan.TestPorts.Common_Components.Abstract_Socket \
module AtsMec_DeviceApplicationInterfaceAPI_TestControl {
// LibMec/DeviceApplicationInterfaceAPI
import from DeviceApplicationInterfaceAPI_Pics all;
// LibMec
import from LibMec_Pics all;
// AtsMec
import from AtsMec_DeviceApplicationInterfaceAPI_TestCases all;
control {
if (PICS_MEC_PLAT and PICS_SERVICES) {
// if (PICS_ENABLE_UE_APP_CTX) {
// execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK());
// execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR());
// execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK());
// execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR());
// execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF());
// execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK());
// execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF());
// execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK());
// execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR());
// execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF());
// }
}
} // End of 'control' statement
} // End of module AtsMec_TestControl
suite := AtsMec
suite := AtsMec_DeviceApplicationInterface
sources := \
AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \
AtsMec_TrafficManagementAPI_TestCases.ttcn \
AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \
AtsMec_LocationAPI_TestCases.ttcn \
AtsMec_RnisAPI_TestCases.ttcn \
AtsMec_TestControl.ttcn \
AtsMec_UEAppInterfaceAPI_TestCases.ttcn \
AtsMec_UEidentityAPI_TestCases.ttcn \
AtsMec_V2XInformationServiceAPI_TestCases.ttcn \
AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \
AtsMec_WlanInformationAPI_TestCases.ttcn \
AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \
# AtsMec_Ams_TestCases.ttcn \
# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \
# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \
AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn
modules := ../LibCommon \
../LibIts \
../LibIts/ttcn/Http \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
../LibMec/LocationAPI \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/LocationAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
../LibMec/DeviceApplicationInterfaceAPI \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FixedAccessInformationAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibHttp \
../../ccsrc/EncDec/LibMec \
../../ccsrc/Framework \
../../ccsrc/externals \
../../ccsrc/loggers \
../../ccsrc/Protocols/ETH \
../../ccsrc/Protocols/Http \
../../ccsrc/Protocols/Json \
../../ccsrc/Protocols/Pcap \
../../ccsrc/Protocols/Tcp \
../modules/titan.TestPorts.Common_Components.Abstract_Socket \
module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl {
// LibMec/AppEnablementAPI
import from EdgePlatformApplicationEnablementAPI_Pics all;
// LibMec
import from LibMec_Pics all;
// AtsMec_EdgePlatformApplicationEnablementAPI
import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all;
control {
if (PICS_MEC_PLAT and PICS_SERVICES) {
if (PICS_APP_ENABLEMENT_API_SUPPORTED) {
execute(TC_MEC_MEC011_SRV_APPSAQ_001_OK());
execute(TC_MEC_MEC011_SRV_APPSAQ_001_BR());
execute(TC_MEC_MEC011_SRV_APPSAQ_001_NF());
execute(TC_MEC_MEC011_SRV_APPSAQ_002_OK());
execute(TC_MEC_MEC011_SRV_APPSAQ_002_BR());
execute(TC_MEC_MEC011_SRV_APPSAQ_002_NF());
execute(TC_MEC_MEC011_SRV_APPSAQ_003_OK());
execute(TC_MEC_MEC011_SRV_APPSAQ_003_NF());
execute(TC_MEC_MEC011_SRV_APPSAQ_004_OK());
execute(TC_MEC_MEC011_SRV_APPSAQ_004_BR());
execute(TC_MEC_MEC011_SRV_APPSAQ_004_NF());
execute(TC_MEC_MEC011_SRV_APPSAQ_004_PF());
execute(TC_MEC_MEC011_SRV_APPSAQ_005_OK());
execute(TC_MEC_MEC011_SRV_APPSAQ_005_NF());
execute(TC_MEC_MEC011_SRV_APPSUB_001_OK());
execute(TC_MEC_MEC011_SRV_APPSUB_001_NF());
execute(TC_MEC_MEC011_SRV_APPSUB_002_OK());
execute(TC_MEC_MEC011_SRV_APPSUB_002_BR());
execute(TC_MEC_MEC011_SRV_APPSUB_003_OK());
execute(TC_MEC_MEC011_SRV_APPSUB_003_NF());
execute(TC_MEC_MEC011_SRV_APPSUB_004_OK());
execute(TC_MEC_MEC011_SRV_APPSUB_004_NF());
execute(TC_MEC_MEC011_SRV_CONFTASK_001_OK());
execute(TC_MEC_MEC011_SRV_CONFTASK_001_NF());
execute(TC_MEC_MEC011_SRV_CONFTASK_002_OK());
execute(TC_MEC_MEC011_SRV_CONFTASK_002_NF());
execute(TC_MEC_MEC011_SRV_DNS_001_OK());
execute(TC_MEC_MEC011_SRV_DNS_001_NF());
execute(TC_MEC_MEC011_SRV_DNS_002_OK());
execute(TC_MEC_MEC011_SRV_DNS_002_NF());
execute(TC_MEC_MEC011_SRV_DNS_003_OK());
execute(TC_MEC_MEC011_SRV_DNS_003_BR());
execute(TC_MEC_MEC011_SRV_DNS_003_NF());
execute(TC_MEC_MEC011_SRV_DNS_003_PF());
execute(TC_MEC_MEC011_SRV_MSL_001_OK());
execute(TC_MEC_MEC011_SRV_MSL_001_NF());
execute(TC_MEC_MEC011_SRV_MSL_002_OK());
execute(TC_MEC_MEC011_SRV_MSL_002_BR());
execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_01());
execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_02());
execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_03());
execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_01());
execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_02());
execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_03());
execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_04());
execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_05());
execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_06());
execute(TC_MEC_MEC011_SRV_REGAPPS_002_OK());
execute(TC_MEC_MEC011_SRV_REGAPPS_002_NF());
execute(TC_MEC_MEC011_SRV_REGAPPS_003_OK());
execute(TC_MEC_MEC011_SRV_REGAPPS_003_NF());
execute(TC_MEC_MEC011_SRV_REGAPPS_004_OK());
execute(TC_MEC_MEC011_SRV_REGAPPS_004_NF());
execute(TC_MEC_MEC011_SRV_SAQ_001_OK());
execute(TC_MEC_MEC011_SRV_SAQ_001_BR());
execute(TC_MEC_MEC011_SRV_SAQ_002_OK());
execute(TC_MEC_MEC011_SRV_SAQ_002_NF());
execute(TC_MEC_MEC011_SRV_SRVSUB_001_OK());
execute(TC_MEC_MEC011_SRV_SRVSUB_001_NF());
execute(TC_MEC_MEC011_SRV_SRVSUB_002_OK());
execute(TC_MEC_MEC011_SRV_SRVSUB_002_BR());
execute(TC_MEC_MEC011_SRV_SRVSUB_003_OK());
execute(TC_MEC_MEC011_SRV_SRVSUB_003_NF());
execute(TC_MEC_MEC011_SRV_SRVSUB_004_OK());
execute(TC_MEC_MEC011_SRV_SRVSUB_004_NF());
execute(TC_MEC_MEC011_SRV_TIME_001_OK());
execute(TC_MEC_MEC011_SRV_TIME_002_OK());
execute(TC_MEC_MEC011_SRV_TRAF_001_OK());
execute(TC_MEC_MEC011_SRV_TRAF_001_NF());
execute(TC_MEC_MEC011_SRV_TRAF_002_OK());
execute(TC_MEC_MEC011_SRV_TRAF_003_OK());
execute(TC_MEC_MEC011_SRV_TRAF_003_BR());
execute(TC_MEC_MEC011_SRV_TRAF_003_NF());
execute(TC_MEC_MEC011_SRV_TRAF_003_PF());
execute(TC_MEC_MEC011_SRV_TRANS_001_OK());
}
}
} // End of 'control' statement
} // End of module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl
suite := AtsMec
suite := AtsMec_EdgePlatformApplicationEnablement
sources := \
AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \
AtsMec_TrafficManagementAPI_TestCases.ttcn \
AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \
AtsMec_LocationAPI_TestCases.ttcn \
AtsMec_RnisAPI_TestCases.ttcn \
AtsMec_TestControl.ttcn \
AtsMec_UEAppInterfaceAPI_TestCases.ttcn \
AtsMec_UEidentityAPI_TestCases.ttcn \
AtsMec_V2XInformationServiceAPI_TestCases.ttcn \
AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \
AtsMec_WlanInformationAPI_TestCases.ttcn \
AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \
# AtsMec_Ams_TestCases.ttcn \
# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \
# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \
AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn
modules := ../LibCommon \
../LibIts \
../LibIts/ttcn/Http \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
../LibMec/LocationAPI \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/LocationAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
../LibMec/DeviceApplicationInterfaceAPI \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FixedAccessInformationAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibHttp \
../../ccsrc/EncDec/LibMec \
../../ccsrc/Framework \
../../ccsrc/externals \
../../ccsrc/loggers \
../../ccsrc/Protocols/ETH \
../../ccsrc/Protocols/Http \
../../ccsrc/Protocols/Json \
../../ccsrc/Protocols/Pcap \
../../ccsrc/Protocols/Tcp \
../modules/titan.TestPorts.Common_Components.Abstract_Socket \
module AtsMec_FederationEnablementAPI_TestCases {
// Libcommon
import from LibCommon_Sync all;
// LibHttp
import from LibHttp_TypesAndValues all;
import from LibHttp_Functions all;
import from LibHttp_Templates all;
import from LibHttp_JsonTemplates all;
import from LibHttp_TestSystem all;
// LibMec/EdgePlatformApplicationEnablementAPI
import from EdgePlatformApplicationEnablementAPI_Templates all;
// LibMec/FederationEnablementAPI
import from FederationEnablementAPI_TypesAndValues all;
import from FederationEnablementAPI_Templates all;
import from FederationEnablementAPI_Functions all;
import from FederationEnablementAPI_Pics all;
import from FederationEnablementAPI_Pixits all;
// LibMec
import from LibMec_Functions all;
import from LibMec_Pics all;
import from LibMec_Pixits all;
group lookup {
/**
* @desc Check that the IUT responds with a list of all available systemInfo when requested by a MEC Orchestrator - No query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO,
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_fed_system_info_list(
{
*,
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
),
*
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_01
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemId query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")),
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_02
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemId query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")),
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
),
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_2,
PX_FED_SYSTEM_ID_2
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_03
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemId query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_04() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=",
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
),
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_2,
PX_FED_SYSTEM_ID_2
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_04
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_05() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_1, "UTF-8")),
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_05
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemName query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_06() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_1, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_2, "UTF-8")),
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
),
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_2,
PX_FED_SYSTEM_ID_2
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_06
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemName query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_07() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=",
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
),
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_2,
PX_FED_SYSTEM_ID_2
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_07
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_08() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")),
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_08
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_09() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")) & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_2, "UTF-8")),
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
),
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_2,
PX_FED_SYSTEM_ID_2
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_09
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty systemProvider query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_10() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=",
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
),
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_2,
PX_FED_SYSTEM_ID_2
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_10
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters
*/
testcase TC_MEC_MEC040_SRV_MEF_001_OK_11() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")) & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_3, "UTF-8")),
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_fed_system_info_list(
{
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
),
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_2,
PX_FED_SYSTEM_ID_2
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_11
/**
* @desc Check that the IUT responds with an error when selection is not applicable - SystemId
*/
testcase TC_MEC_MEC040_SRV_MEF_001_NF_01() 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_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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 & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_UNKNOWN, "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 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_MEC040_SRV_MEF_001_NF_01
/**
* @desc Check that the IUT responds with an error when selection is not applicable - SystemName
*/
testcase TC_MEC_MEC040_SRV_MEF_001_NF_02() 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_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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 & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_UNKNOWN, "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 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_MEC040_SRV_MEF_001_NF_02
/**
* @desc Check that the IUT responds with an error when selection is not applicable - SystemProvider
*/
testcase TC_MEC_MEC040_SRV_MEF_001_NF_03() 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_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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 & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_UNKNOWN, "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 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_MEC040_SRV_MEF_001_NF_03
/**
* @desc Check that the IUT responds with an error when request is malformed
*/
testcase TC_MEC_MEC040_SRV_MEF_001_BR() 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_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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 & PX_FED_API_LIST_SYSTEM_INFO & "?system=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), // system instead of systemId
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 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_MEC040_SRV_MEF_001_BR
} // End of group lookup
group subscription {
/**
* @desc Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator
*/
testcase TC_MEC_MEC040_SRV_MEF_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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 & PX_FED_API_SUB,
v_headers,
m_http_message_body_json(
m_body_json_fed_system_info(
m_system_info(
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_PROVIDER_1
))))));
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_fed_system_info(
mw_system_info(
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_1
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds the success 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_system_info(v_response.response.body.json_body.systemInfo);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_002_OK
/**
* @desc Check that the IUT responds with an error on creating an existing systemInfo
*/
testcase TC_MEC_MEC040_SRV_MEF_002_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var SystemInfo v_system_info := valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info(v_system_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_FED_API_SUB,
v_headers,
m_http_message_body_json(
m_body_json_fed_system_info(
m_system_info( // Already created
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_PROVIDER_1
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with yhe 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_system_info(v_system_info);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_002_BR_01
/**
* @desc Check that the IUT responds with an error on creating an existing systemInfo
*/
testcase TC_MEC_MEC040_SRV_MEF_002_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var SystemInfo v_system_info := valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info(v_system_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_FED_API_SUB,
v_headers,
m_http_message_body_json(
m_body_json_fed_system_info(
m_system_info(
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_PROVIDER_1,
PX_FED_SYSTEM_ID_1 // Shall be omitted
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with yhe 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_system_info(v_system_info);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_002_BR_02
/**
* @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator
*/
testcase TC_MEC_MEC040_SRV_MEF_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")),
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_fed_system_info(
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_2,
PX_FED_SYSTEM_ID_2
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct SystemInfo entry ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_003_OK
/**
* @desc Check that the IUT responds with an error when it receives a request for returning a systemInfo referred with a wrong systemId
*/
testcase TC_MEC_MEC040_SRV_MEF_003_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_3, "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 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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_003_NF
/**
* @desc Check that the IUT responds with an error when it receives a request with an inconsistant URI
*/
testcase TC_MEC_MEC040_SRV_MEF_003_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_SUB_WRONG & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), // Inconsistent URI
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 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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_003_BR
} // End of group subscription
group patch {
/**
* @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator
*/
testcase TC_MEC_MEC040_SRV_MEF_004_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_fed_system_info_update(
m_system_info_update(
-,
m_end_point_uris(
{ PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 }
)))))));
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_fed_system_info(
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_1,
PX_FED_SYSTEM_ID_2
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_01
/**
* @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator
*/
testcase TC_MEC_MEC040_SRV_MEF_004_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_fed_system_info_update(
m_system_info_update(
PX_FED_SYSTEM_NAME_1 & "_patched"
))))));
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_fed_system_info(
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_1 & "_patched",
PX_FED_SYSTEM_ID_2
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_02
/**
* @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator
*/
testcase TC_MEC_MEC040_SRV_MEF_004_OK_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_fed_system_info_update(
m_system_info_update(
PX_FED_SYSTEM_NAME_1 & "_patched",
m_end_point_uris(
{ PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 }
)))))));
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_fed_system_info(
mw_system_info(
PX_FED_SYSTEM_PROVIDER_2,
PX_FED_SYSTEM_NAME_1 & "_patched",
PX_FED_SYSTEM_ID_2
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***");
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_03
/**
* @desc Check that the IUT responds with an error when requested to update an unknown systemInfo
*/
testcase TC_MEC_MEC040_SRV_MEF_004_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_fed_system_info_update(
m_system_info_update(
-,
m_end_point_uris(
{ PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 }
)))))));
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 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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_004_NF
/**
* @desc Check that the IUT responds with an error when requested to update with an inconsistant URI
*/
testcase TC_MEC_MEC040_SRV_MEF_004_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_FED_API_SUB_WRONG & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), // v10 instead of v1
v_headers,
m_http_message_body_json(
m_body_json_fed_system_info_update(
m_system_info_update(
-,
m_end_point_uris(
{ PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 }
)))))));
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 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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_004_BR_01
/**
* @desc Check that the IUT responds with an error when requested to update with no data provided
*/
testcase TC_MEC_MEC040_SRV_MEF_004_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_fed_system_info_update(
m_system_info_update // No data provided
)))));
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 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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_004_BR_02
} // End of group patch
group delete {
/**
* @desc Check that the IUT deletes the systemInfo when requested by a MEC Orchestrator
*/
testcase TC_MEC_MEC040_SRV_MEF_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)),
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "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 204 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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_005_OK
/**
* @desc Check that the IUT responds with an error when requested to delete an unknown systemInfo
*/
testcase TC_MEC_MEC040_SRV_MEF_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var SystemInfoList v_system_info_list := {
valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_system_info_list(v_system_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "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 the correct error code ***");
v_system_info_list[1].systemId := omit;
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_system_info_list(v_system_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC040_SRV_MEF_005_NF
} // End of group delete
} // End of module AtsMec_FederationEnablementAPI_TestCases
module AtsMec_FederationEnablementAPI_TestControl {
// LibMec/FederationEnablementAPI
import from FederationEnablementAPI_Pics all;
// LibMec
import from LibMec_Pics all;
// AtsMec_FederationEnablementAPI
import from AtsMec_FederationEnablementAPI_TestCases all;
control {
if (PICS_FED_API_SUPPORTED) {
if (PICS_MEC_PLAT and PICS_SERVICES) {
execute(TC_MEC_MEC040_SRV_MEF_001_OK_01());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_02());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_03());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_04());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_05());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_06());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_07());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_08());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_09());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_10());
execute(TC_MEC_MEC040_SRV_MEF_001_OK_11());
execute(TC_MEC_MEC040_SRV_MEF_001_NF_01());
execute(TC_MEC_MEC040_SRV_MEF_001_NF_02());
execute(TC_MEC_MEC040_SRV_MEF_001_NF_03());
execute(TC_MEC_MEC040_SRV_MEF_001_BR());
execute(TC_MEC_MEC040_SRV_MEF_002_OK());
execute(TC_MEC_MEC040_SRV_MEF_002_BR_01());
execute(TC_MEC_MEC040_SRV_MEF_002_BR_02());
execute(TC_MEC_MEC040_SRV_MEF_003_OK());
execute(TC_MEC_MEC040_SRV_MEF_003_NF());
execute(TC_MEC_MEC040_SRV_MEF_003_BR());
execute(TC_MEC_MEC040_SRV_MEF_004_OK_01());
execute(TC_MEC_MEC040_SRV_MEF_004_OK_02());
execute(TC_MEC_MEC040_SRV_MEF_004_OK_03());
execute(TC_MEC_MEC040_SRV_MEF_004_NF());
execute(TC_MEC_MEC040_SRV_MEF_004_BR_01());
execute(TC_MEC_MEC040_SRV_MEF_004_BR_02());
execute(TC_MEC_MEC040_SRV_MEF_005_OK());
execute(TC_MEC_MEC040_SRV_MEF_005_NF());
}
}
} // End of 'control' statement
} // End of module AtsMec_FederationEnablementAPI_TestControl
suite := AtsMec_FederationEnablement
sources := \
AtsMec_FederationEnablementAPI_TestCases.ttcn \
AtsMec_FederationEnablementAPI_TestControl.ttcn
modules := ../LibCommon \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
../LibMec/LocationAPI \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
../LibMec/DeviceApplicationInterfaceAPI \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/IoTAPI \
../LibMec/FederationEnablementAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibMec \
../../ccsrc/externals \
../../ccsrc/Protocols/Http \
../../ccsrc/Protocols/Json \
../modules/titan.TestPorts.Common_Components.Abstract_Socket \
......@@ -7,7 +7,7 @@
* 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, ETSI GS MEC 029 V2.1.1
* @see ETSI GS MEC 003, ETSI GS MEC 029 V2.2.1
*/
module AtsMec_FixedAccessInformationServiceAPI_TestCases {
......@@ -24,11 +24,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
import from LibHttp_TestSystem all;
// LibMec_FixedAccessInformationServiceAPI
import from FixedAccessInformationServiceAPI_TypesAndValues all;
import from FixedAccessInformationServiceAPI_Templates all;
import from FixedAccessInformationServiceAPI_Functions all;
import from FixedAccessInformationServiceAPI_Pics all;
import from FixedAccessInformationServiceAPI_Pixits all;
// LibMec
import from LibMec_Templates all;
import from LibMec_Functions all;
import from LibMec_Pics all;
import from LibMec_Pixits all;
......@@ -41,10 +44,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
/**
* @desc Check that the IUT responds with the current status of the fixed access information when queried by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_001_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -60,9 +62,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
m_http_request_get(
PX_FAI_FA_INFO_URI,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -88,15 +88,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_001_OK
} // End of testcase TC_MEC_MEC029_SRV_FAIS_001_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_001_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -115,11 +114,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_FAI_FA_INFO_URI & "?interface=1",
PX_FAI_FA_INFO_URI & "?if=1",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -142,12 +139,12 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_001_BR
} // End of testcase TC_MEC_MEC029_SRV_FAIS_001_BR
/**
* @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 TP_MEC_MEC029_SRV_FAIS_001_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_001_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
......@@ -168,11 +165,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_FA_INFO_URI & "?interface=999",
PICS_ROOT_API & PX_FAI_FA_INFO_URI & "?interface=666",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -180,7 +175,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found()
mw_http_response_404_not_found
)) {
tc_ac.stop;
......@@ -195,15 +190,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_001_NF
} // End of testcase TC_MEC_MEC029_SRV_FAIS_001_NF
/**
* @desc Check that the IUT responds with the current status of the device information when queried by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_002_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -222,11 +216,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI,
PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -252,15 +244,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_002_OK
} // End of testcase TC_MEC_MEC029_SRV_FAIS_002_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_002_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_002_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -279,11 +270,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?device=__any_value__",
PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?dev=__any_value__",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -307,12 +296,12 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_002_BR
} // End of testcase TC_MEC_MEC029_SRV_FAIS_002_BR
/**
* @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 TP_MEC_MEC029_SRV_FAIS_002_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_002_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
......@@ -333,11 +322,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?gwId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_GW_ID[0], "UTF-8")),
PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?gwId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_GW_ID[0], "UTF-8")),
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -360,15 +347,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_002_NF
} // End of testcase TC_MEC_MEC029_SRV_FAIS_002_NF
/**
* @desc CCheck that the IUT responds with the current status of the cable line information when queried by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_003_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -387,11 +373,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI,
PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -418,15 +402,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_003_OK
} // End of testcase TC_MEC_MEC029_SRV_FAIS_003_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_003_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_003_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -445,11 +428,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cm=__any_value__",
PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cm=__any_value__",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -473,15 +454,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_003_BR
} // End of testcase TC_MEC_MEC029_SRV_FAIS_003_BR
/**
* @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 TP_MEC_MEC029_SRV_FAIS_003_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_003_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -500,11 +480,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cmId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_CM_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cmId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_CM_ID, "UTF-8")),
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -527,15 +505,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_003_NF
} // End of testcase TC_MEC_MEC029_SRV_FAIS_003_NF
/**
* @desc Check that the IUT responds with the current status of the optical network information when queried by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_004_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -554,11 +531,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI,
PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -584,22 +559,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_004_OK
} // End of testcase TC_MEC_MEC029_SRV_FAIS_004_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_004_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_004_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -618,11 +585,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onu=__any_value__",
PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onu=__any_value__",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -646,12 +611,12 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_004_BR
} // End of testcase TC_MEC_MEC029_SRV_FAIS_004_BR
/**
* @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 TP_MEC_MEC029_SRV_FAIS_004_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_004_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
......@@ -662,14 +627,6 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
setverdict(inconc);
stop;
}
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
......@@ -680,11 +637,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onuId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_ONU_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onuId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_ONU_ID, "UTF-8")),
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -692,7 +647,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found()
mw_http_response_404_not_found
)) {
tc_ac.stop;
......@@ -707,15 +662,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_004_NF
} // End of testcase TC_MEC_MEC029_SRV_FAIS_004_NF
/**
* @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
*/
testcase TP_MEC_MEC029_SRV_FAIS_005_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -734,11 +688,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI,
PICS_ROOT_API & PX_FAI_SUB_URI,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -764,12 +716,12 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_005_OK
} // End of testcase TC_MEC_MEC029_SRV_FAIS_005_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_005_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_005_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
......@@ -791,11 +743,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription=__any_value",
PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription=__any_value",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -818,15 +768,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_005_BR
} // End of testcase TC_MEC_MEC029_SRV_FAIS_005_BR
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_005_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -845,11 +794,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription_type=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_SUB_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_SUB_ID, "UTF-8")),
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -873,15 +820,17 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_SRV_UEINFOLOOK_001_NF
} // End of testcase TC_MEC_MEC029_SRV_FAIS_005_NF
/**
* @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events
*/
testcase TP_MEC_MEC029_SRV_FAIS_006_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_006_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var OnuAlarmSubscription v_onu_alarm_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -900,19 +849,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI,
PICS_ROOT_API & PX_FAI_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_fai_onu_alarm_subscription_link_list(
m_body_json_fai_onu_alarm_subscription(
m_onu_alarm_subscription(
PX_ONU_ALARM_SUB_CALLBACK_URI, // callbackReference
PX_ONU_ALARM_SUB_CALLBACK_URI,
m_filter_criteria_onu_alarm
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -922,26 +866,30 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_fai_onu_alarm_subscription_link_list(
mw_body_json_fai_onu_alarm_subscription(
mw_onu_alarm_subscription(
PX_ONU_ALARM_SUB_CALLBACK_URI
)))))) {
// TODO how to send this? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test?
// MEC 029, clause 7.7.3.4
// the IUT entity sends a vPOST containing
// uri indicating value CALLBACK_URL
// body containing
// OnuAlarmNotification containing
// notificationType set to "OnuAlarmSubscription"
// ;
// ;
// ;
// to the MEC_APP entity
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a OnuAlarmSubscription ***");
// Check HTTP Location header
if (f_check_headers(v_response.response.header) == false) {
log("*** " & testcasename() & ": FAIL: IUT failed in Area 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_FAI_SUB_URI & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a onuAlarmSubscription, 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);
......@@ -949,16 +897,16 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_onu_alarm_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_006_OK
} // End of testcase TC_MEC_MEC029_SRV_FAIS_006_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_006_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_006_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -977,19 +925,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
"/" & PICS_ROOT_API & PX_UE_ZONAL_TRAF_SUB_URI,
PICS_ROOT_API & PX_FAI_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_fai_onu_alarm_subscription_link_list(
m_body_json_fai_onu_alarm_subscription(
m_onu_alarm_subscription_bad_request(
PX_ONU_ALARM_SUB_CALLBACK_URI, // callbackReference
PX_ONU_ALARM_SUB_CALLBACK_URI,
m_filter_criteria_onu_alarm
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1012,15 +955,16 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_006_BR
} // End of testcase TC_MEC_MEC029_SRV_FAIS_006_BR
/**
* @desc Check that the IUT responds with the information on a given subscription when queried by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_007_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_007_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var OnuAlarmSubscription v_onu_alarm_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1035,11 +979,12 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id,
v_headers
)
)
......@@ -1053,7 +998,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_fai_onu_alarm_subscription_link_list(
mw_body_json_fai_onu_alarm_subscription(
mw_onu_alarm_subscription
))))) {
tc_ac.stop;
......@@ -1068,16 +1013,16 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_onu_alarm_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_007_OK
} // End of testcase TC_MEC_MEC029_SRV_FAIS_007_OK
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_007_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_007_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1096,11 +1041,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1123,15 +1066,16 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_007_NF
} // End of testcase TC_MEC_MEC029_SRV_FAIS_007_NF
/**
* @desc Check that the IUT updates an existing subscription when commanded by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_008_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_008_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var OnuAlarmSubscription v_onu_alarm_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1146,24 +1090,19 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Test adapter configuration
// Preamble
// TODO If-Match header needs to have a PROPER_ETAG
f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_fai_onu_alarm_subscription_link_list(
m_body_json_fai_onu_alarm_subscription(
m_onu_alarm_subscription(
PX_ONU_ALARM_SUB_CALLBACK_URI,
m_filter_criteria_onu_alarm
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1173,7 +1112,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_fai_onu_alarm_subscription_link_list(
mw_body_json_fai_onu_alarm_subscription(
mw_onu_alarm_subscription
))))) {
tc_ac.stop;
......@@ -1188,16 +1127,18 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_onu_alarm_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_008_OK
} // End of testcase TC_MEC_MEC029_SRV_FAIS_008_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_008_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_008_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var OnuAlarmSubscription v_onu_alarm_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1212,24 +1153,19 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Test adapter configuration
// Preamble
// TODO If-Match header needs to have a PROPER_ETAG
f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_fai_onu_alarm_subscription_link_list(
m_body_json_fai_onu_alarm_subscription(
m_onu_alarm_subscription_bad_request(
PX_ONU_ALARM_SUB_CALLBACK_URI,
m_filter_criteria_onu_alarm
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1251,16 +1187,18 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_onu_alarm_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_008_BR
} // End of testcase TC_MEC_MEC029_SRV_FAIS_008_BR
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_008_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_008_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var OnuAlarmSubscription v_onu_alarm_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1275,24 +1213,19 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Test adapter configuration
// Preamble
// TODO If-Match header needs to have a PROPER_ETAG
f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_fai_onu_alarm_subscription_link_list(
m_body_json_fai_onu_alarm_subscription(
m_onu_alarm_subscription(
PX_ONU_ALARM_SUB_CALLBACK_URI,
m_filter_criteria_onu_alarm
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1314,16 +1247,18 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_onu_alarm_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_008_NF
} // End of testcase TC_MEC_MEC029_SRV_FAIS_008_NF
/**
* @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition
*/
testcase TP_MEC_MEC029_SRV_FAIS_008_PF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_008_PF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var OnuAlarmSubscription v_onu_alarm_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1338,24 +1273,19 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Test adapter configuration
// Preamble
// TODO If-Match header needs to have an INVALID_ETAG
f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_fai_onu_alarm_subscription_link_list(
m_body_json_fai_onu_alarm_subscription(
m_onu_alarm_subscription(
PX_ONU_ALARM_SUB_CALLBACK_URI,
m_filter_criteria_onu_alarm
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1377,16 +1307,18 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_onu_alarm_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_008_PF
} // End of testcase TC_MEC_MEC029_SRV_FAIS_008_PF
/**
* @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_009_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_009_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var OnuAlarmSubscription v_onu_alarm_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1401,15 +1333,14 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1432,22 +1363,16 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_009_OK
} // End of testcase TC_MEC_MEC029_SRV_FAIS_009_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 TP_MEC_MEC029_SRV_FAIS_009_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_009_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
var OnuAlarmSubscription v_onu_alarm_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1462,11 +1387,12 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
"/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
v_headers
)
)
......@@ -1492,16 +1418,18 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_onu_alarm_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TP_MEC_MEC029_SRV_FAIS_009_NF
} // End of testcase TC_MEC_MEC029_SRV_FAIS_009_NF
/**
* @desc Check that the IUT sends notification on expiry of Fixed Access Information event subscription to a MEC Application
*/
testcase TP_MEC_MEC029_SRV_FAIS_010_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_010_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var DevInfoSubscription v_dev_info_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1511,77 +1439,57 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
}
// Test component configuration
f_cf_01_http_up();
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_FAI_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_fai_onu_alarm_subscription_link_list(
m_onu_alarm_subscription(
PX_ONU_ALARM_SUB_CALLBACK_URI,
m_filter_criteria_onu_alarm,
-,
m_time_stamp(1577836800)
)
)
)
)
)
);
f_create_dev_info_subscription(v_dev_info_subscription, v_subscription_id);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
tc_wait.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
PX_FAI_SUB_URI,
-,
mw_http_message_body_json(
mw_body_json_fai_onu_alarm_subscription_link_list(
mw_onu_alarm_subscription
))))) {
// TODO Need to check Location header
// TODO: how to wait for a timeout of (NOW_PLUS_X_SECONDS - guard time)? which guard time value to use?
// MEC 029, clause 5.2.6.2
// the IUT entity sends a vPOST containing
// uri indicating value CALLBACK_URL
// body containing
// ExpiryNotification containing
// expiryDeadline indicating value NOW_PLUS_X_SECONDS // TODO: how to set this?
// ;
// ;
// ;
// to the MEC_APP entity
tc_ac.stop;
mw_body_json_fai_dev_info_subscription(
mw_dev_info_subscription(
PX_DEV_ALARM_SUB_CALLBACK_URI
)))))) {
tc_wait.stop;
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 DevInfoSubscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
[] tc_wait.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 TP_MEC_MEC029_SRV_FAIS_010_OK
f_delete_dev_info_subscription(v_subscription_id);
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_MEC029_SRV_FAIS_010_OK
/**
* @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events
*/
testcase TP_MEC_MEC029_SRV_FAIS_011_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC029_SRV_FAIS_011_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var OnuAlarmSubscription v_onu_alarm_subscription;
var charstring v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) {
......@@ -1596,40 +1504,43 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases {
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// TODO how to generate an event?
// Initial conditions with {
// the IUT entity being_in idle_state and
// the IUT entity having a subscriptions containing,
// subscriptionType indicating value "OnuAlarmSubscription"
// callbackReference indicating value CALLBACK_URL
// ;
// }
//
// // MEC 029, clause 5.2.7
// Expected behaviour
// ensure that {
// when {
// the IUT entity generates a onu_alarm_event
// }
// then {
// // // MEC 029, clause 5.2.7
// the IUT entity sends a vPOST containing
// Uri set to CALLBACK_URL
// body containing
// OnuAlarmSubscription containing
// notificationType set to "OnuAlarmSubscription"
// ;
// ;
// ;
// to the MEC_APP entity
// }
// }
// Test Body
tc_wait.start;
alt {
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
PX_FAI_SUB_URI,
-,
mw_http_message_body_json(
mw_body_json_fai_onu_alarm_subscription(
mw_onu_alarm_subscription(
PX_DEV_ALARM_SUB_CALLBACK_URI
)))))) {
tc_wait.stop;
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 DevInfoSubscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_wait.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 TP_MEC_MEC029_SRV_FAIS_011_OK
f_delete_onu_alarm_subscription(v_subscription_id);
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_MEC029_SRV_FAIS_011_OK
} // End of group fixedAccessInfoService
......
......@@ -11,8 +11,44 @@ module AtsMec_FixedAccessInformationServiceAPI_TestControl {
control {
if (PICS_MEC_PLAT and PICS_FAI_API_SUPPORTED) {
execute(TP_MEC_MEC029_SRV_FAIS_001_OK());
if (PICS_MEC_PLAT and PICS_FAI_API_SUPPORTED and PICS_FAI_API_SUPPORTED) {
execute(TC_MEC_MEC029_SRV_FAIS_001_OK());
execute(TC_MEC_MEC029_SRV_FAIS_001_BR());
execute(TC_MEC_MEC029_SRV_FAIS_001_NF());
execute(TC_MEC_MEC029_SRV_FAIS_002_OK());
execute(TC_MEC_MEC029_SRV_FAIS_002_BR());
execute(TC_MEC_MEC029_SRV_FAIS_002_NF());
execute(TC_MEC_MEC029_SRV_FAIS_003_OK());
execute(TC_MEC_MEC029_SRV_FAIS_003_BR());
execute(TC_MEC_MEC029_SRV_FAIS_003_NF());
execute(TC_MEC_MEC029_SRV_FAIS_004_OK());
execute(TC_MEC_MEC029_SRV_FAIS_004_BR());
execute(TC_MEC_MEC029_SRV_FAIS_004_NF());
execute(TC_MEC_MEC029_SRV_FAIS_005_OK());
execute(TC_MEC_MEC029_SRV_FAIS_005_BR());
execute(TC_MEC_MEC029_SRV_FAIS_005_NF());
execute(TC_MEC_MEC029_SRV_FAIS_006_OK());
execute(TC_MEC_MEC029_SRV_FAIS_006_BR());
execute(TC_MEC_MEC029_SRV_FAIS_007_OK());
execute(TC_MEC_MEC029_SRV_FAIS_007_NF());
execute(TC_MEC_MEC029_SRV_FAIS_008_OK());
execute(TC_MEC_MEC029_SRV_FAIS_008_BR());
execute(TC_MEC_MEC029_SRV_FAIS_008_NF());
execute(TC_MEC_MEC029_SRV_FAIS_008_PF());
execute(TC_MEC_MEC029_SRV_FAIS_009_OK());
execute(TC_MEC_MEC029_SRV_FAIS_009_NF());
execute(TC_MEC_MEC029_SRV_FAIS_010_OK());
execute(TC_MEC_MEC029_SRV_FAIS_011_OK());
}
} // End of 'control' statement
......