/** * @Author ETSI / STF569 / TTF012 * @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 010-2 V2.2.1 */ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // JSON import from JSON all; // Libcommon import from LibCommon_Sync all; // LibHttp import from LibItsHttp_TypesAndValues all; import from LibItsHttp_Functions all; import from LibItsHttp_Templates all; import from LibItsHttp_JsonTemplates all; import from LibItsHttp_TestSystem all; // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; // LibMec import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; group granting { /** * @desc Check that MEO sends a synchronous grant response when a grant request is requested - INSTANTIATE */ testcase TC_MEC_MEC010p2_MEO_GRANT_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_GRANTS_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT 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_MEO_GRANT_URI, v_headers, m_http_message_body_json( m_body_json_grant_request( m_grant_request( PX_APP_INSTANCE_ID, PX_APP_LCM_OP_OCC_ID, PX_APP_ID, INSTANTIATE, m_grant_request_link( m_link_type(""), // TODO m_link_type("") // TODO ))))))); 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_grant_response( mw_grant ))))) -> value v_response { tc_ac.stop; if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_001_OK /** * @desc Check that MEO responds with an error when it receives a malformed request when a new grant request is performed */ testcase TC_MEC_MEC010p2_MEO_GRANT_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control if (not(PICS_GRANTS_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT 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_MEO_GRANT_URI, v_headers, m_http_message_body_json( m_body_json_grant_request( m_grant_request( PX_APP_INSTANCE_ID, PX_APP_LCM_OP_OCC_ID, PX_APP_ID, INVALID_OPERATE, m_grant_request_link( m_link_type(""), // TODO m_link_type("") // TODO ))))))); 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 Bad response ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_001_BR /** * @desc Check that MEO sends a synchronous grant response when a grant request is requested */ testcase TC_MEC_MEC010p2_MEO_GRANT_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_GRANTS_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT 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_MEO_GRANT_URI, v_headers, m_http_message_body_json( m_body_json_grant_request( m_grant_request( PX_APP_INSTANCE_ID, PX_APP_LCM_OP_OCC_ID, PX_APP_ID, PX_APP_OPERATION, m_grant_request_link( m_link_type(""), // TODO m_link_type("") // TODO ))))))); 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_grant_response( mw_grant ))))) -> value v_response { tc_ac.stop; if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_002_OK /** * @desc Check that MEO sends a asynchronous grant response when a grant request is requested - INSTANTIATE */ testcase TC_MEC_MEC010p2_MEO_GRANT_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response_1; var HttpMessage v_response_2; // Test control if (not(PICS_GRANTS_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT 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_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_grant_request( m_grant_request( PX_APP_INSTANCE_ID, PX_APP_LCM_OP_OCC_ID, PX_APP_ID, PX_APP_OPERATION, m_grant_request_link( m_link_type(""), // TODO m_link_type("") // TODO ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_202_accepted )) -> value v_response_1 { tc_ac.stop; if (f_check_headers(valueof(v_response_1.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { repeat; } } [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( mw_body_json_grant_response( mw_grant ))))) -> value v_response_2 { tc_ac.stop; if (not(isbound(v_response_1)) or f_check_headers(valueof(v_response_2.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Didn't receive 202 accepted or Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_003_OK /** * @desc Check that MEO sends the status of a grant request when a query on a granting ID is performed */ testcase TC_MEC_MEC010p2_MEO_GRANT_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_GRANTS_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT 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_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_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_ok( mw_http_message_body_json( mw_body_json_grant_response( mw_grant( PX_APP_INSTANCE_ID )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_004_OK /** * @desc Check that MEO sends the status of a grant request when a query on a granting ID is performed */ testcase TC_MEC_MEC010p2_MEO_GRANT_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_GRANTS_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT 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_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_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_202_accepted )) -> value v_response { repeat; } [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_grant_response( mw_grant( PX_APP_INSTANCE_ID ) ))))) { tc_ac.stop; if (isbound(v_response)) { log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: IUT successfully didn't respond with a 202 accepted status code ***"); 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 } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_005_OK /** * @desc Check that MEO sends the status of a grant request when a query on a granting ID is performed */ testcase TC_MEC_MEC010p2_MEO_GRANT_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_GRANTS_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT 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_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_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_ok( mw_http_message_body_json( mw_body_json_grant_response( mw_grant( PX_APP_INSTANCE_ID )))))) { tc_ac.stop; if (isbound(v_response)) { log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: IUT successfully didn't respond with a 202 accepted status code ***"); 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 } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_006_OK /** * @desc Check that MEO responds with an error when it receives a request for returning a grant referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEO_GRANT_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control if (not(PICS_GRANTS_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT 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_MEO_GRANT_URI & oct2char(unichar2oct(PX_NON_EXISTANT_GRANTING_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a not found status code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_006_NF } // End of group granting group meo_pkgmgt { /** * @desc Check that MEO creates a new App Package when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI, v_headers, m_http_message_body_json( m_body_json_create_package_management( m_create_package_management( "appPkgName", PX_APP_PKG_VERSION, m_checksum(-, PX_CHECKSUM), PX_APP_PKG_PATH )))))); 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_pkg_info( mw_app_pkg_info/*( -, PX_APP_PKG_NAME, PX_APP_PKG_VERSION, mw_checksum, PX_OPERATIONAL_STATE, PX_USAGE_STATE )*/ ))))) -> value v_response { tc_ac.stop; // TODO Chek Location header log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_OK /** * @desc Check that MEO creates a new App Package when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI, v_headers, m_http_message_body_json( m_body_json_create_package_management( m_create_package_management( "", PX_APP_PKG_VERSION, m_checksum(-, PX_CHECKSUM), PX_APP_PKG_PATH )))))); 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 correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_BR /** * @desc Check that MEO returns the list of App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEO_PKGM_002_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_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_app_pkg_info_list )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_01_OK /** * @desc Check that MEO returns the list of App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEO_PKGM_002_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI_ONBOARDED, 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_pkg_info_list )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_02_OK /** * @desc Check that MEO responds with an error when it receives * a malformed request for retrieving the list of existing App Packages */ testcase TC_MEC_MEC010p2_MEO_PKGM_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI & "?filter()", 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 correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_BR /** * @desc Check that MEO returns the an App Package when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEO_PKGM_003_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_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_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( PX_APP_PKG_ID )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_01_OK /** * @desc Check that MEO returns the an App Package when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEO_PKGM_003_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_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_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( PX_APP_PKG_ID )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_02_OK /** * @desc Check that MEO responds with an error when it receives * a request for retrieving a App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEO_PKGM_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_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 )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_NF /** * @desc Check that MEO deletes an App Package when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_delete( PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_OK /** * @desc Check that MEO responds with an error when it receives * a request for deleting an App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEO_PKGM_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_delete( PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_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 )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_NF /** * @desc Check that MEO updates the operational state of an individual application package resource */ testcase TC_MEC_MEC010p2_MEO_PKGM_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_patch( PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( DISABLED )))))); 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_pkg_info_modification( mw_app_pkg_info_modification( DISABLED )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_OK /** * @desc Check that MEO sends an error when it receives a malformed request to modify * the operational state of an application package */ testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_patch( PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( UNKNOWN )))))); 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 a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR /** * @desc Check that MEO responds with an error when it receives * a request for updating an App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEO_PKGM_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( DISABLED )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_NF /** * @desc Check that MEO service returns an application package subscription when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_SUBS, v_headers, m_http_message_body_json( m_body_json_pkgm_subscription( m_app_pkg_info_subscription( PX_CALLBACK_URI )))))); 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_pkgm_subscription_info( mw_app_pkg_subscription_info( -, -, PX_CALLBACK_URI )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_OK /** * @desc Check that MEO service sends an error when it receives a * malformed request for creating a new subscription on AppPackages */ testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_SUBS, v_headers, m_http_message_body_json( m_body_json_pkgm_subscription( m_app_pkg_info_subscription( PX_CALLBACK_URI, "Invalid_field" )))))); 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 a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR /** * @desc Check that MEO service returns the list of Application Package Subscriptions when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_SUBS, 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_pkgm_subscription_link_list // TODO )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK /** * @desc Check that MEO service returns an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_008_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_pkgm_subscription_info( mw_app_pkg_subscription_info( PX_APP_PKG_ID, -, PX_CALLBACK_URI, m_app_pkg_link("") // TODO )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_OK /** * @desc Check that MEO service returns an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_008_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_NF /** * @desc Check that MEO service deletes an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_009_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_delete( PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_OK /** * @desc Check that MEO service sends an error when it receives a deletion request for a subscription on AppPackages * with a wrong identifier */ testcase TC_MEC_MEC010p2_MEO_PKGM_009_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_delete( PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_NF /** * @desc Check that the MEO service sends a application package notification * if the MEO service has an associated subscription and the event is generated */ testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_request( mw_http_request_post( PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed v_headers, mw_http_message_body_json( mw_body_json_app_package_notification( mw_app_pkg_notification // TODO To be refined ))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully sends notification info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK /** * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_011_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/appd", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_ok( ? // TODO To be refined ))) -> value v_response { tc_ac.stop; // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_OK /** * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_011_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/appd", 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 )) -> value v_response { tc_ac.stop; // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_NF /** * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/package_content", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_ok( ? // TODO To be refined ))) -> value v_response { tc_ac.stop; // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_OK /** * @desc Check that MEO fetches the on-boarded application package content identified by appDId when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/package_content", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_ok( ? // TODO To be refined ))) -> value v_response { tc_ac.stop; // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_OK /** * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested */ testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")) & "/package_content", 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 )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_NG /** * @desc Check that MEO service sends an error when it receives a request refering a wrong on-boarded appPkgId */ testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/package_content", 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 )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_NG } // End of group meo_pkgmgt group mepm_pkgmgt { /** * @desc Check that MEPM returns the list of App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEPM_PKGM_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_app_pkg_info_list )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK /** * @desc Check that MEPM returns the list of App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI_ONBOARDED, // FIXME Rename into PX_PKGM_URI_ONBOARDED 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_pkg_info_list )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK /** * @desc Check that MEPM responds with an error when it receives * a malformed request for retrieving the list of existing App Packages */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEPM_PKGM_URI & "?filter()", 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 correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_BR /** * @desc Check that MEPM returns the an App Package when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_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_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( PX_APP_PKG_ID )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK /** * @desc Check that MEPM returns the an App Package when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_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_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( PX_APP_PKG_ID )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK /** * @desc Check that MEPM responds with an error when it receives * a request for retrieving a App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_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 )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_NF /** * @desc Check that MEPM service returns an application package subscription when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEPM_PKGM_SUBS, v_headers, m_http_message_body_json( m_body_json_pkgm_subscription( m_app_pkg_info_subscription( PX_CALLBACK_URI )))))); 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_pkgm_subscription_info( mw_app_pkg_subscription_info( -, -, PX_CALLBACK_URI )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_OK /** * @desc Check that MEPM service sends an error when it receives a * malformed request for creating a new subscription on AppPackages */ testcase TC_MEC_MEC010p2_MEPM_PKGM_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEPM_PKGM_SUBS, v_headers, m_http_message_body_json( m_body_json_pkgm_subscription( m_app_pkg_info_subscription( PX_CALLBACK_URI, "Invalid_field" )))))); 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 a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_BR /** * @desc Check that MEPM service returns the list of Application Package Subscriptions when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEPM_PKGM_SUBS, 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_pkgm_subscription_link_list // TODO )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_004_OK /** * @desc Check that MEPM service returns an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_pkgm_subscription_info( mw_app_pkg_subscription_info( PX_APP_PKG_ID, -, PX_CALLBACK_URI, m_app_pkg_link("") // TODO )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_OK /** * @desc Check that MEPM service returns an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_NF /** * @desc Check that MEPM service deletes an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_delete( PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_OK /** * @desc Check that MEPM service sends an error when it receives a deletion request for a subscription on AppPackages * with a wrong identifier */ testcase TC_MEC_MEC010p2_MEPM_PKGM_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_delete( PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_NF /** * @desc Check that the MEPM service sends a application package notification * if the MEPM service has an associated subscription and the event is generated */ testcase TC_MEC_MEC007p2_MEPM_PKGM_007_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_request( mw_http_request_post( PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed v_headers, mw_http_message_body_json( mw_body_json_app_package_notification( mw_app_pkg_notification // TODO To be refined ))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully sends notification info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC007p2_MEPM_PKGM_007_OK /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/appd", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_ok( ? // TODO To be refined ))) -> value v_response { tc_ac.stop; // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cf_01_http_up(); // Preamble f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/appd", 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 )) -> value v_response { tc_ac.stop; // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF } // End of group mepm_pkgmgt group mepm_lifcyclemgt { /** * @desc Check that MEC API provider has created the configuration information in AppD to the MEPM-V */ testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", v_headers, m_http_message_body_json( m_body_json_config_platform_for_app_request( m_config_platform_for_app_request( m_service_dependency( "", "" // TODO Add PIXITs ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_202_accepted )) -> value v_response { 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 } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK /** * @desc Check that MEC API provider sends an error when it receives a malformed request * for the configuration information in AppD to the MEPM-V */ testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", v_headers, m_http_message_body_json( m_body_json_config_platform_for_app_request( m_config_platform_for_app_request( m_service_dependency( "", "" // TODO Add PIXITs ))))))); 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 a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR /** * @desc Check that MEC API provider sends an error when it receives a request * for the configuration information in AppD to the MEPM-V with not valid app instance ID */ testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", v_headers, m_http_message_body_json( m_body_json_config_platform_for_app_request( m_config_platform_for_app_request( m_service_dependency( "", "" // TODO Add PIXITs ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found )) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF } // End of group mepm_lifcyclemgt group mex_lifcyclemgt { /** * @desc Check that MEC API provider retrieves the list of App instances when requested */ testcase TC_MEC_MEC010p2_MEX_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_APP_LCM_URI, v_headers, m_http_message_body_json( m_body_json_create_app_instance_request( m_create_app_instance_request( PX_APP_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_app_instance_info( mw_app_instance_info( -, PX_APP_ID )))))) -> value v_response { 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 } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK /** * @desc Check that MEC API provider sends an error when it receives a malformed request * for the creation of a new App Instance */ testcase TC_MEC_MEC010p2_MEX_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_APP_LCM_URI, v_headers, m_http_message_body_json( m_body_json_create_app_instance_request( m_create_app_instance_request( "" )))))); 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 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 } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK /** * @desc Check that MEC API provider retrieves the list of App instances when requested */ testcase TC_MEC_MEC010p2_MEX_LCM_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_APP_LCM_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_app_instance_info_list/*( (*, mw_app_instance_info(-, PX_APP_ID), *) */ )))) -> value v_response { 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 } // End of testcase TC_MEC_MEC010p2_MEX_LCM_02_OK /** * @desc Check that MEC API provider retrieves an App Package when requested */ testcase TC_MEC_MEC010p2_MEX_LCM_03_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_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_ok( mw_http_message_body_json( mw_body_json_app_instance_info( mw_app_instance_info( -, PX_APP_ID, -, -, -, -, -, -, mw_link( mw_link_type( PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8"))) ))))))) -> value v_response { 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 } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_OK /** * @desc Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId */ testcase TC_MEC_MEC010p2_MEX_LCM_03_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_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 )) -> value v_response { 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 } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_NF /** * @desc Check that MEC API provider service deletes an App Instance when requested */ testcase TC_MEC_MEC010p2_MEX_LCM_04_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_delete( PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content )) -> value v_response { 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 } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_OK /** * @desc Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId */ testcase TC_MEC_MEC010p2_MEX_LCM_04_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)){ log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT 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_delete( PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_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 )) -> value v_response { 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 } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_NF } // End of group mex_lifcyclemgt } // End of module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases