diff --git a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn index 8955d72a5096f33d7b13d8864676bd77815d8885..2e0005e3681536bc5ed4923587d8b46e3e18c3da 100644 --- a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn @@ -299,6 +299,528 @@ } // End of testcase TP_MEC_SRV_AMS_002_BR } // End of group appMobilityServices + + + group individualAppMobilityService{ + + /** + * @desc Check that the AMS service returns information about this individual application mobility service + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 + */ + testcase TP_MEC_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // 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 & oct2char(unichar2oct(PX_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_ok( + mw_http_message_body_json( + mw_body_json_app_mobility_service_info( + mw_app_mobility_service_info( + -, + PX_APP_MOBILITY_SERVICE_ID + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); + 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 TP_MEC_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 + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 + */ + testcase TP_MEC_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines 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 & "/" & 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 a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TP_MEC_SRV_AMS_011_NF + + + + /** + * @desc Check that the AMS service modifies the individual application mobility service when requested + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 + */ + testcase TP_MEC_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // 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_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_request( + m_registration_request( + 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_ok( + mw_http_message_body_json( + mw_body_json_app_mobility_service_info( + mw_app_mobility_service_info({ + *, + mw_app_mobility_registration_info( + mw_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ), + *}, + - + ) + ) + ) + ))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); + 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 TP_MEC_SRV_AMS_012_OK + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 + */ + testcase TP_MEC_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines 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_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_request( + m_registration_request( + 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_404_not_found( + ))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TP_MEC_SRV_AMS_012_NF + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 + */ + testcase TP_MEC_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines 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_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_request_with_error( + m_registration_request_with_error( + m_service_consumer_id_with_error( + 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 a 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TP_MEC_SRV_AMS_012_BR + + + /** + * @desc Check that the AMS service de-register the individual application mobility service and delete the resource + * that represents the individual application mobility service + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 + */ + testcase TP_MEC_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // 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_delete( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_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_204_no_content( + ))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 204 No Content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } // End of testcase TP_MEC_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 + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 + */ + testcase TP_MEC_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines 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_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 responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TP_MEC_SRV_AMS_013_NF + + } + + group appMobilityServiceDeregisterTask { + + /** + * @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service + * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 + */ + testcase TP_MEC_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // 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 & oct2char(unichar2oct(PX_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_ok( + mw_http_message_body_json( + mw_body_json_app_mobility_service_info( + mw_app_mobility_service_info({ + *, + mw_app_mobility_registration_info( + mw_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ), + *}, + - + ) + ) + ) + ))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); + 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 TP_MEC_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 + * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 + */ + testcase TP_MEC_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // 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 & 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( + ))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } // End of testcase TP_MEC_SRV_AMS_012_OK + + + } group appMobilityServicesSubscriptions { diff --git a/ttcn/AtsMec/AtsMec_AppEnablementAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_AppEnablementAPI_TestCases.ttcn index 0b0d52e0128c2b9f4f9c17ddc62ee77bdb33ddde..c383f11325571f21247e36eafb600dfe0c863f7b 100644 --- a/ttcn/AtsMec/AtsMec_AppEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_AppEnablementAPI_TestCases.ttcn @@ -733,7 +733,7 @@ module AtsMec_AppEnablementAPI_TestCases { /* * Application Subscriptions (APPSUB) */ - group appSub { + group app_sub { /** * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application @@ -1207,14 +1207,14 @@ module AtsMec_AppEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TP_MEC_SRV_APPSUB_004_NF - } // End of group appSub + } // End of group app_sub /* * DNS rules (DNS) */ - group appDns { + group app_dns { /** * @desc Check that the IUT responds with a list of active DNS rules when queried by a MEC Application @@ -1255,7 +1255,7 @@ module AtsMec_AppEnablementAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_dsn_rule_list + mw_body_json_dns_rule_list )))) { tc_ac.stop; @@ -1311,7 +1311,7 @@ module AtsMec_AppEnablementAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_dsn_rule_list( + mw_body_json_dns_rule_list( { *, mw_dns_rule(PX_DNS_RULE_ID), * } ))))) { tc_ac.stop; @@ -1414,8 +1414,7 @@ module AtsMec_AppEnablementAPI_TestCases { m_http_message_body_json( m_body_json_dns_rule( m_dns_rule( - PX_DNS_RULE_NAME, - PX_DNS_RULE_IP_ADDRESS + PX_DNS_RULE_ID ) ) ) @@ -1433,9 +1432,8 @@ module AtsMec_AppEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_dns_rule( mw_dns_rule( - PX_DNS_RULE_NAME, // dnsRuleId - PX_DNS_RULE_IP_ADDRESS // ipAddress - )))))) { + PX_DNS_RULE_ID + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a DnsRule ***"); @@ -1482,11 +1480,12 @@ module AtsMec_AppEnablementAPI_TestCases { v_headers, m_http_message_body_json( m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_NAME, // dnsRuleId - PX_INVALID_VALUE // state - ) - ) + m_dns_rule( + PX_DNS_RULE_ID, + -, -, -, -, + PX_DNS_INVALID_STATE + ) + ) ) ) ) @@ -1498,7 +1497,7 @@ module AtsMec_AppEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request() + mw_http_response_400_bad_request )) { tc_ac.stop; @@ -1545,11 +1544,12 @@ module AtsMec_AppEnablementAPI_TestCases { v_headers, m_http_message_body_json( m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_NAME, // dnsRuleId - PX_DNS_RULE_IP_ADDRESS // ipAddress - ) - ) + m_dns_rule( + PX_DNS_RULE_ID, + -, -, + PX_INVALID_IP_ADDRESS + ) + ) ) ) ) @@ -1561,7 +1561,7 @@ module AtsMec_AppEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found() + mw_http_response_404_not_found )) { tc_ac.stop; @@ -1608,11 +1608,12 @@ module AtsMec_AppEnablementAPI_TestCases { v_headers, m_http_message_body_json( m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_NAME, // dnsRuleId - PX_DNS_RULE_IP_ADDRESS // ipAddress - ) - ) + m_dns_rule( + PX_DNS_RULE_ID, + -, -, + PX_IP_ADDRESS + ) + ) ) ) ) @@ -1641,9 +1642,7 @@ module AtsMec_AppEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TP_MEC_SRV_DNS_003_PF - } // End of group appDns - - + } // End of group app_dns /* * Service Availability Query (SAQ) @@ -1675,7 +1674,7 @@ module AtsMec_AppEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_MEC_SVC_MGMT_SVC_URI, + "/" & PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI, v_headers ) ) @@ -1688,9 +1687,9 @@ module AtsMec_AppEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_ok( - mw_body_json_service_info_list( - mw_service_info_list(*) // TODO don't care about the content - )))) { + mw_http_message_body_json( + mw_body_json_service_info_list + )))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); @@ -1732,7 +1731,7 @@ module AtsMec_AppEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_MEC_SVC_MGMT_SVC_URI, + "/" & PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI, v_headers ) ) @@ -1786,7 +1785,7 @@ module AtsMec_AppEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_MEC_SVC_MGMT_SVC_URI & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), + "/" & PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), v_headers ) ) @@ -1799,10 +1798,11 @@ module AtsMec_AppEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_ok( - mw_body_json_service_info( - mw_service_info(SERVICE_ID // serInstanceId - ) - )))) { + mw_http_message_body_json( + mw_body_json_service_info( + mw_service_info( + PX_SERVICE_ID + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); @@ -1843,7 +1843,7 @@ module AtsMec_AppEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_MEC_SVC_MGMT_SVC_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), + "/" & PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers ) ) @@ -1855,7 +1855,7 @@ module AtsMec_AppEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found() + mw_http_response_404_not_found )) { tc_ac.stop; @@ -1874,12 +1874,10 @@ module AtsMec_AppEnablementAPI_TestCases { } // End of group saq - - /* * Service Subscriptions (SRVSUB) */ - group srvSub { + group srv_sub { /** * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application @@ -1919,9 +1917,9 @@ module AtsMec_AppEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_ok( - mw_body_json_subscription_link_list( - mw_mp1_subscription_link_list(*) // TODO don't care about the content - )))) { + mw_http_message_body_json( + mw_body_json_subscription_link_list + )))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a Mp1SubscriptionLinkList ***"); @@ -2020,9 +2018,9 @@ module AtsMec_AppEnablementAPI_TestCases { v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( - m_srv_avail_notif_subscription( - PX_SRV_AVAIL_NOTIF_SUBSCRIPTION, //subscriptionType - PX_SRV_AVAIL_NOTIF_CALLBACK_URI // callbackReference + m_srv_avail_notif_subscription( + PX_SRV_AVAIL_NOTIF_SUBSCRIPTION, + PX_SRV_AVAIL_NOTIF_CALLBACK_URIce ) ) ) @@ -2348,9 +2346,7 @@ module AtsMec_AppEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TP_MEC_SRV_SRVSUB_004_NF - } // End of group appSub - - + } // End of group srv_sub /* * Timing capabilities (TIME) @@ -2475,7 +2471,7 @@ module AtsMec_AppEnablementAPI_TestCases { /* * Traffic rules (TRAF) */ - group trafficRules { + group traffic_rules { /** * @desc Check that the IUT responds with a list of available traffic rules when queried by a MEC Application @@ -2902,12 +2898,12 @@ module AtsMec_AppEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TP_MEC_SRV_TRAF_003_PF - } // End of group trafficRules + } // End of group traffic_rules /* * Transport (TRANS) */ - group transportRules { + group transport_rules { /** * @desc Check that the IUT responds with a list of available transports when queried by a MEC Application @@ -2965,6 +2961,6 @@ module AtsMec_AppEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_SRV_TRANS_001_OK - } // End of group transportRules + } // End of group transport_rules } // End of module AtsMec_AppEnablementAPI_TestCases \ No newline at end of file diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn index 3c96472470178cdd67b588ebe55adb6ad703c9fb..9874e63f5e20f51a34b8c297999976086568f8b8 100644 --- a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn +++ b/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn @@ -16,6 +16,8 @@ module Ams_Pixits { modulepar JSON.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID" + modulepar JSON.String PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID := "PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID" + modulepar JSON.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback" modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback" diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn index 329232ebf5da702ea49a1cfc0adf518b1ec5927f..a4ed7daac7655c986d38a0b44522974af808e448 100644 --- a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn +++ b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn @@ -55,6 +55,14 @@ module Ams_Templates { mepId := p_mepId } + template (omit) ServiceConsumerIdWithError m_service_consumer_id_with_error( + in template (omit) String p_appId := omit, + in template (omit) String p_mepId := omit + ) := { + appId := p_appId, + mepId := p_mepId + } + template (omit) ServiceConsumer m_service_consumer_error( in template (omit) String p_appInstance := omit, in template (omit) String p_mepId := omit @@ -82,6 +90,17 @@ module Ams_Templates { } + template (omit) RegistrationRequestWithError m_registration_request_with_error ( + in template (omit) ServiceConsumerIdWithError p_service_consumer_id_with_error := omit, + in template (omit) DeviceInformations p_device_info := omit, + in template (omit) UInt32 p_expire_time := omit + ) := { + serviceConsumerIdWithError := p_service_consumer_id_with_error, + deviceInformation := p_device_info, + expiryTime := p_expire_time + } + + template (omit) RegistrationRequest m_registration_request_error ( in template (omit) ServiceConsumer p_service_consumer := omit, in template (omit) DeviceInformations p_device_info := omit, diff --git a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn index ef4fa83b7ee406719c0552325763a42d09c333d9..70d5600fbfc70f52d77ba4add7bbeb2415527ca3 100644 --- a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn +++ b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn @@ -28,12 +28,24 @@ type record RegistrationRequest { } +type record RegistrationRequestWithError { + ServiceConsumerIdWithError serviceConsumerIdWithError, + DeviceInformations deviceInformation optional, + UInt32 expiryTime optional +} + + type record of ServiceConsumerId ServiceConsumerIds; type record ServiceConsumerId { String appInstanceId optional, String mepId optional } +type record ServiceConsumerIdWithError { + String appId optional, + String mepId optional +} + // Erroneous parameter: appInstance should be appInstanceId type record of ServiceConsumer ServiceConsumers; type record ServiceConsumer { diff --git a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Pixits.ttcn b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Pixits.ttcn index 368d576834e92fa205cf372bede1bab6f5e8b63c..6738277fd23906013e1a712887380b87adec1e1e 100644 --- a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Pixits.ttcn +++ b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Pixits.ttcn @@ -33,7 +33,21 @@ module AppEnablementAPI_Pixits { modulepar Href PX_NON_EXISTENT_SUBSCRIPTION_ID := ""; - modulepar DnsRule_Id PX_DNS_RULE_ID := ""; + modulepar DnsRule_Id PX_DNS_RULE_ID := "route2home"; + + modulepar DnsRule_Id PX_NON_EXISTENT_DNS_RULE_ID := "unknownRoute"; + + modulepar DomainName PX_DOMAIN_NAME := "etsi.org"; + + modulepar DnsRule_IpAddressType PX_IP_ADDRESS_TYPE := IP_V4; + + modulepar DnsRule_IpAddress PX_IP_ADDRESS := "10.10.0.2"; + + modulepar DnsRule_IpAddress PX_INVALID_IP_ADDRESS := "10.10.0.255"; + + modulepar Ttl PX_TTL := 0; + + modulepar DnsRule_State PX_DNS_INVALID_STATE := UNKNOWN_VALUE; modulepar TrafficRule_Id PX_TRAFFIC_RULE_ID := "trafficRuleId01"; diff --git a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn index cf0d69ff41f281136a910df8c1eb81c3bda2c094..23fc1473651f38063634aea518ecd2d7f427f31b 100644 --- a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn @@ -161,11 +161,11 @@ module AppEnablementAPI_Templates { } // End of template mw_transport_info template (value) DnsRule m_dns_rule( - in DnsRule_Id p_dnsRuleId, - in DomainName p_domainName, - in DnsRule_IpAddressType p_ipAddressType, - in DnsRule_IpAddress p_ipAddress, - in Ttl p_ttl, + in DnsRule_Id p_dnsRuleId := PX_DNS_RULE_ID, + in DomainName p_domainName := PX_DOMAIN_NAME, + in DnsRule_IpAddressType p_ipAddressType := PX_IP_ADDRESS_TYPE, + in DnsRule_IpAddress p_ipAddress := PX_IP_ADDRESS, + in Ttl p_ttl := PX_TTL, in DnsRule_State p_state := ACTIVE ) := { dnsRuleId := p_dnsRuleId, diff --git a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn index 5d9fdeede0b58570a167f8e841fb6da61389f796..0b8ed2e5094a602497c518526b95f09e746b27f2 100644 --- a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn @@ -177,7 +177,8 @@ module AppEnablementAPI_TypesAndValues { */ type enumerated DnsRule_State { ACTIVE, - INACTIVE + INACTIVE, + UNKNOWN_VALUE } /** diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 3f2dd7e389a158d16c0c11039d239d88704974cc..40b96acb1f2f59415e6f11bace400b1609aa0505 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -54,4 +54,6 @@ module LibMec_Pixits { modulepar charstring PX_ME_APP_SUPPORT_URI := ""; + modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "/mec_service_mgmt/v1/services"; + } // End of module LibMec_Pixits diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn index 772fabcd4e6ad574a3cb6748667fbf29b4d7c402..e032a834cdfa60a6cde22eddee59158d9bcfd7fa 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn @@ -108,6 +108,7 @@ module LibItsHttp_JsonMessageBodyTypes { AppLCM_TypesAndValues.Notification lcmNotification, AppContext appContext, AppInfo appInfo, + Ams_TypesAndValues.RegistrationRequestWithError registrationRequestWithError_ams, UEAppInterfaceAPI_TypesAndValues.ProblemDetails problemDetails_ue_app_ctxt, ServiceInfoList serviceInfoList, ServiceInfo serviceInfo, diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn index 30dba782b0e9c9ca117601fbd0fbcf1ea01ab2af..58a05158af89be5396a07f9f9b72cefe51a19693 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn @@ -353,6 +353,11 @@ group ams_api { registrationRequest_ams := p_registrationRequest } // End of template m_body_json_ue_identity_problem_details + template (value) JsonBody m_body_json_ams_registration_request_with_error( + in template (value) Ams_TypesAndValues.RegistrationRequestWithError p_registrationRequestWithError + ) := { + registrationRequestWithError_ams := p_registrationRequestWithError + } // End of template m_body_json_ue_identity_problem_details template (present) JsonBody mw_body_json_ams_subscriptions( template (present) Ams_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? @@ -746,39 +751,39 @@ group ams_api { transportInfoList := p_transportInfoList } // End of template mw_body_json_transport_info_list - template (value) JsonBody m_body_json_dsn_rule_list( - in template (value) DnsRuleList p_dnsRuleList - ) := { - dnsRuleList := p_dnsRuleList - } // End of template m_body_json_dsn_rule_list - - template (present) JsonBody mw_body_json_dsn_rule_list( - template (present) DnsRuleList p_dnsRuleList := ? - ) := { - dnsRuleList := p_dnsRuleList - } // End of template mw_body_json_dsn_rule_list - - template (value) JsonBody m_body_json_dsn_rule( + template (value) JsonBody m_body_json_dns_rule( in template (value) DnsRule p_dnsRule ) := { dnsRule := p_dnsRule - } // End of template m_body_json_dsn_rule + } // End of template m_body_json_dns_rule - template (present) JsonBody mw_body_json_dsn_rule( + template (present) JsonBody mw_body_json_dns_rule( template (present) DnsRule p_dnsRule := ? ) := { dnsRule := p_dnsRule - } // End of template mw_body_json_dsn_rule + } // End of template mw_body_json_dns_rule + + template (value) JsonBody m_body_json_dns_rule_list( + in template (value) DnsRuleList p_dnsRuleList + ) := { + dnsRuleList := p_dnsRuleList + } // End of template m_body_json_dns_rule_list + + template (present) JsonBody mw_body_json_dns_rule_list( + template (present) DnsRuleList p_dnsRuleList := ? + ) := { + dnsRuleList := p_dnsRuleList + } // End of template mw_body_json_dns_rule_list template (value) JsonBody m_body_json_traffic_rule( in template (value) TrafficRule p_trafficRule - ) := { + ) := { trafficRule := p_trafficRule } // End of template m_body_json_traffic_rule template (present) JsonBody mw_body_json_traffic_rule( - template (present) TrafficRule p_trafficRule := ? - ) := { + template (present) TrafficRule p_trafficRule := ? + ) := { trafficRule := p_trafficRule } // End of template mw_body_json_traffic_rule