diff --git a/TODO.md b/TODO.md index 806d70551b9f53b688fadba5f40be2a30ae577c8..e9fa9cfb922bc4c918403d7a214ef778a89c0ed5 100644 --- a/TODO.md +++ b/TODO.md @@ -6,6 +6,48 @@ This file provides the list of the TODOs related to the STF 569. ## SRV ### AMS +Early draft ETSI GS MEC 021 2.0.8 + +https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/AMS/Ams_BV.tplan2 +https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/AMS/Ams_BO_BI.tplan2 + + +- TP_MEC_SRV_AMS_001_OK To be tested + +- TP_MEC_SRV_AMS_001_BR To be tested + +- TP_MEC_SRV_AMS_002_OK To be tested + +- TP_MEC_SRV_AMS_002_BR To be tested + +- TP_MEC_SRV_AMS_003_OK To be tested + +- TP_MEC_SRV_AMS_003_BR To be tested + +- TP_MEC_SRV_AMS_004_OK To be tested + +- TP_MEC_SRV_AMS_004_BR To be tested + +- TP_MEC_SRV_AMS_005_OK To be tested + +- TP_MEC_SRV_AMS_005_NF To be tested + +- TP_MEC_SRV_AMS_006_OK To be tested + +- TP_MEC_SRV_AMS_006_NF To be tested + +- TP_MEC_SRV_AMS_007_OK To be tested + +- TP_MEC_SRV_AMS_007_BR To be tested + +- TP_MEC_SRV_AMS_007_NF To be tested + +- TP_MEC_SRV_AMS_008_OK To be tested + +- TP_MEC_SRV_AMS_008_OK To be tested + +- TP_MEC_SRV_AMS_010_OK To be tested + ### APPSAQ diff --git a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn index 519f7d42790c01365bdb1df1f9fdc1d4f146343d..376f80d43af913aa70c3a88db15fa8b28e055e65 100644 --- a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn @@ -76,7 +76,6 @@ import from LibMec_Pixits all; ) } )))))) -> value v_response { - // TODO Need to check Location header var boolean v_header_matched := false; tc_ac.stop; @@ -155,389 +154,7 @@ import from LibMec_Pixits all; } // End of 'alt' statement } // End of testcase TP_MEC_SRV_AMS_001_BR - -/* - - testcase TP_MEC_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { - var HeaderLines v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request({ - m_service_consumer_id(PX_APP_INS_IP, *), - *, - * - } - ) - ) - ) - ) - ) - ); - 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_mobility_service_info( - mw_app_mobility_service_info( - { - mw_registration_info({ - mw_service_consumer_id(PX_APP_INS_ID, *), - *, - * - }), - * - } - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } - - -testcase TP_MEC_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { - var HeaderLines v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request({ - m_service_consumer(PX_APP_INS_IP, *), - *, - * - } - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_ams_problem_details( - mw_problem_details( - { - -, -, 400 - } - ) - ) - ) - ) - ) - ) - { - 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 - - } - -} - -group appMobilityServicesSubscriptions { - - testcase TP_MEC_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { - var HeaderLines v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & oct2char(unichar2oct(PX_SUBSCRIPTION_TYPE, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription(PX_SUBSCRIPTION_TYPE, *, *, *, *) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } - - - testcase TP_MEC_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { - var HeaderLines v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionTyp=" & oct2char(unichar2oct(PX_SUBSCRIPTION_TYPE, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_ams_problem_details( - mw_problem_details( - { - -, -, 400 - } - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } - - - testcase TP_MEC_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { - var HeaderLines v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions({*, - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE - ) - }, *) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - { *, mw_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE - ), - * - } - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } - - -testcase TP_MEC_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { - var HeaderLines v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription_error( - PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_ams_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - 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 group appMobilityServices + } // End of group ams_notifications } // End of module AtsMec_Ams_TestCases diff --git a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn index 56eade52b81497a5b8e46ff166ea7ea75e60be3b..547721abb49eaeaa655e0891cbc7cd3495764cc9 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn @@ -31,6 +31,8 @@ module LibMec_Pics { modulepar boolean PICS_RNIS_NOTIFICATIONS := false; modulepar boolean PICS_AMS := true; + + modulepar boolean PICS_AMS_NOTIFICATIONS := false; modulepar charstring PICS_ROOT_API := "exampleAPI";