From e423439fcdd73e35b6bbdd39f8c7d1ff483d9402 Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Thu, 11 Jul 2019 01:35:27 -0700 Subject: [PATCH] Review TC_MEC_SRV_UEINFLOOK_001_BR TC_MEC_SRV_UEINFLOOK_001_OK TC_MEC_SRV_UEINFLOOK_001_NF --- TODO.md | 47 +++-- ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn | 163 ++++++++++++++++++ ttcn/AtsMec/AtsMec_TestControl.ttcn | 5 +- .../AtsMec_UEinformation_TestCases.ttcn | 7 +- .../LocationAPI/ttcn/LocationAPI_Pixits.ttcn | 2 + 5 files changed, 200 insertions(+), 24 deletions(-) diff --git a/TODO.md b/TODO.md index a1c5c6e..57f0e1c 100644 --- a/TODO.md +++ b/TODO.md @@ -39,18 +39,29 @@ This file provides the list of the TODOs related to the STF 569. ### UEINFLOOK +Draft ETSI GS MEC 013 V2.0.3 (2018-10) + +https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 + +- TC_MEC_SRV_UEINFLOOK_001_OK To be tested + +- TC_MEC_SRV_UEINFLOOK_001_BR To be tested + +- TC_MEC_SRV_UEINFLOOK_001_NF To be tested + ### UEINFSUB ### UELOC + Draft ETSI GS MEC 013 V2.0.3 (2018-10) https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 -- TC_MEC_SRV_UELOC_001_OK Done +- TC_MEC_SRV_UELOC_001_OK Done -- TC_MEC_SRV_UELOC_001_BR To be tested +- TC_MEC_SRV_UELOC_001_BR To be tested -- TC_MEC_SRV_UELOC_001_NF To be tested +- TC_MEC_SRV_UELOC_001_NF To be tested ### UELOCSUB @@ -58,13 +69,13 @@ Draft ETSI GS MEC 013 V2.0.3 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 -- TC_MEC_SRV_UELOCSUB_001_OK Done +- TC_MEC_SRV_UELOCSUB_001_OK Done -- TC_MEC_SRV_UELOCSUB_001_BR Done +- TC_MEC_SRV_UELOCSUB_001_BR Done -- TC_MEC_SRV_UELOCSUB_002_OK Done +- TC_MEC_SRV_UELOCSUB_002_OK Done -- TC_MEC_SRV_UELOCSUB_002_NF Done +- TC_MEC_SRV_UELOCSUB_002_NF Done ### UETAG @@ -72,19 +83,19 @@ ETSI GS MEC 014 V1.1.1 (2018-02) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/UETAG/PlatUeIdentity.tplan2 -- TC_MEC_SRV_UETAG_001_OK To be tested +- TC_MEC_SRV_UETAG_001_OK To be tested -- TC_MEC_SRV_UETAG_001_BR To be tested +- TC_MEC_SRV_UETAG_001_BR To be tested -- TC_MEC_SRV_UETAG_001_NF To be tested +- TC_MEC_SRV_UETAG_001_NF To be tested -- TC_MEC_SRV_UETAG_002_OK To be tested +- TC_MEC_SRV_UETAG_002_OK To be tested -- TC_MEC_SRV_UETAG_002_BR To be tested +- TC_MEC_SRV_UETAG_002_BR To be tested -- TC_MEC_SRV_UETAG_002_NF Done +- TC_MEC_SRV_UETAG_002_NF Done -- TC_MEC_SRV_UETAG_002_PF Done +- TC_MEC_SRV_UETAG_002_PF Done ### UETRACKSUB @@ -92,11 +103,11 @@ Draft ETSI GS MEC 013 V2.0.3 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 -- TC_MEC_SRV_UETRACKSUB_001_OK To be tested +- TC_MEC_SRV_UETRACKSUB_001_OK To be tested -- TC_MEC_SRV_UETRACKSUB_001_BR To be tested +- TC_MEC_SRV_UETRACKSUB_001_BR To be tested -- TC_MEC_SRV_UETRACKSUB_002_OK To be tested +- TC_MEC_SRV_UETRACKSUB_002_OK To be tested -- TC_MEC_SRV_UETRACKSUB_002_NF To be tested +- TC_MEC_SRV_UETRACKSUB_002_NF To be tested diff --git a/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn index 1368df4..cb1af2c 100644 --- a/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn @@ -665,4 +665,167 @@ module AtsMec_LocationAPI_TestCases { } // End of group ueTrackSub + group ueInfLook { + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application + * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 + */ + testcase TC_MEC_SRV_UEINFLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_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_user_list( + mw_user_list(-, ?) + ))))) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_SRV_UEINFLOOK_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 + */ + testcase TC_MEC_SRV_UEINFLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "/invalid/" & oct2char(unichar2oct(PX_USER, "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 + )) { + log("*** " & testcasename() & ": PASS: IUT successfully responds 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_SRV_UEINFLOOK_001_BR + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 + */ + testcase TC_MEC_SRV_UEINFLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "/" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_SRV_UEINFLOOK_001_NF + + } // End of group ueInfLook + } // End of module AtsMec_LocationAPI_TestCases diff --git a/ttcn/AtsMec/AtsMec_TestControl.ttcn b/ttcn/AtsMec/AtsMec_TestControl.ttcn index d4689ef..3822a14 100644 --- a/ttcn/AtsMec/AtsMec_TestControl.ttcn +++ b/ttcn/AtsMec/AtsMec_TestControl.ttcn @@ -15,7 +15,6 @@ module AtsMec_TestControl { // AtsMec import from AtsMec_LocationAPI_TestCases all; import from AtsMec_UEidentityAPI_TestCases all; - import from AtsMec_UEinformation_TestCases all; import from AtsMec_RadioNodeLocationAPI_TestCases all; import from AtsMec_RnisAPI_TestCases all; import from AtsMec_BwManagementAPI_TestCases all; @@ -45,7 +44,9 @@ module AtsMec_TestControl { execute(TC_MEC_SRV_UETRACKSUB_002_OK()); execute(TC_MEC_SRV_UETRACKSUB_002_NF()); - execute(TC_MEC_PLAT_INFLOOK_001_OK()); + execute(TC_MEC_SRV_UEINFLOOK_001_OK()); + execute(TC_MEC_SRV_UEINFLOOK_001_BR()); + execute(TC_MEC_SRV_UEINFLOOK_001_NF()); execute(TC_MEC_PLAT_RLOC_001_OK()); } diff --git a/ttcn/AtsMec/AtsMec_UEinformation_TestCases.ttcn b/ttcn/AtsMec/AtsMec_UEinformation_TestCases.ttcn index 3e16539..b542b19 100644 --- a/ttcn/AtsMec/AtsMec_UEinformation_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_UEinformation_TestCases.ttcn @@ -38,10 +38,9 @@ module AtsMec_UEinformation_TestCases { /** * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeInformation/PlatUeInformation.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserList + * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 */ - testcase TC_MEC_PLAT_INFLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_SRV_UEINFLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var HeaderLines v_headers; var HttpMessage v_response; @@ -91,7 +90,7 @@ module AtsMec_UEinformation_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_PLAT_INFLOOK_001_OK + } // End of testcase TC_MEC_SRV_UEINFLOOK_001_OK } // End of group me_app_role diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn index 1bc3230..d5c8ac3 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn @@ -8,6 +8,8 @@ module LocationAPI_Pixits { modulepar Address PX_USER := "acr:192.0.0.1"; + modulepar Address PX_USER_UNKNOWN := "acr:192.0.0.200"; + modulepar ClientCorrelator PX_CLIENT_ID := "0123"; modulepar ClientCorrelator PX_CLIENT_ID_UNKNOWN := "0666"; -- GitLab