Loading ccsrc/Protocols/Json/json_codec.cc +6 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,12 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy // ..and create the decoding buffer TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); if (it->second.find("\"userInfo\"") != std::string::npos) { if (it->second.find("\"userList\"") != std::string::npos) { // Be carefull to the order // TODO To be refined, find("\"userList\"") is not optimal LocationAPI__TypesAndValues::UserList user_list; user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userList() = user_list; } else if (it->second.find("\"userInfo\"") != std::string::npos) { LocationAPI__TypesAndValues::UserInfo user_info; user_info.decode(LocationAPI__TypesAndValues::UserInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userInfo() = user_info; Loading etc/AtsMec/AtsMec_LocationAPI.cfg +6 −4 Original line number Diff line number Diff line Loading @@ -7,11 +7,13 @@ LibCommon_Time.PX_TAC := 30.0 LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.5" LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.1.140" #LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87" LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibMec_Pics.PICS_ME_APP_IUT := true LibMec_Pics.PICS_PLAT_IUT := true LibMec_Pics.PICS_RNIS_IUT := false [LOGGING] # In this section you can specify the name of the log file and the classes of events Loading @@ -29,7 +31,7 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.0.5,use_ssl=0)" system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.140,port=8081,use_ssl=0)" [DEFINE] # In this section you can create macro definitions, Loading ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn +11 −5 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ module AtsMec_LocationAPI_TestCases { /** * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeLocation/PlatUeLocation.tplan2 * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo */ testcase TC_MEC_PLAT_MP1_LOC_BV_001() runs on HttpComponent system HttpTestAdapter { // Local variables Loading @@ -62,7 +63,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( PICS_ME_APP_Q_ZONE_ID_URI & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), PICS_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), v_headers ) ) Loading @@ -76,9 +77,14 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_user_info( mw_user_info(-, -, PX_ZONE_ID) ))))) -> value v_response { mw_body_json_user_list( mw_user_list( { *, mw_user_info(PX_USER, PX_ACCESS_POINT_ID, PX_ZONE_ID, PX_RESOURCE_URL), * } )))))) -> value v_response { log("*** " & testcasename() & ": PASS: IUT successfully responds with a ZoneId ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } Loading ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ module AtsMec_RnisAPI_TestCases { * @desc Check that the RNIS service sends all RNIS subscriptions when requested * @see Check that the RNIS service sends all RNIS subscriptions when requested */ testcase TC_MEC025_RNI_SUBSCRIPTION_005() runs on HttpComponent system HttpTestAdapter { testcase TC_MEC025_RNIS_SUBSCRIPTION_005() runs on HttpComponent system HttpTestAdapter { // Local variables var HeaderLines v_headers; var HttpMessage v_response; Loading Loading @@ -90,7 +90,7 @@ module AtsMec_RnisAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC025_RNI_SUBSCRIPTION_005 } // End of testcase TC_MEC025_RNIS_SUBSCRIPTION_005 } // End of group me_app_role Loading ttcn/AtsMec/AtsMec_TestControl.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ module AtsMec_TestControl { if (PICS_UE_IDENTITY_API_SUPPORTED) { execute(TC_MEC_PLAT_MP1_UETAG_BV_001()); execute(TC_MEC_PLAT_MP1_UETAG_BV_002()); execute(TC_MEC_PLAT_MP1_UETAG_BV_003()); //execute(TC_MEC_PLAT_MP1_UETAG_BV_003()); } if (PICS_LOCATION_API_SUPPORTED) { execute(TC_MEC_PLAT_MP1_INF_BV_001()); Loading Loading
ccsrc/Protocols/Json/json_codec.cc +6 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,12 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy // ..and create the decoding buffer TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); if (it->second.find("\"userInfo\"") != std::string::npos) { if (it->second.find("\"userList\"") != std::string::npos) { // Be carefull to the order // TODO To be refined, find("\"userList\"") is not optimal LocationAPI__TypesAndValues::UserList user_list; user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userList() = user_list; } else if (it->second.find("\"userInfo\"") != std::string::npos) { LocationAPI__TypesAndValues::UserInfo user_info; user_info.decode(LocationAPI__TypesAndValues::UserInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userInfo() = user_info; Loading
etc/AtsMec/AtsMec_LocationAPI.cfg +6 −4 Original line number Diff line number Diff line Loading @@ -7,11 +7,13 @@ LibCommon_Time.PX_TAC := 30.0 LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.5" LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.1.140" #LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87" LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibMec_Pics.PICS_ME_APP_IUT := true LibMec_Pics.PICS_PLAT_IUT := true LibMec_Pics.PICS_RNIS_IUT := false [LOGGING] # In this section you can specify the name of the log file and the classes of events Loading @@ -29,7 +31,7 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.0.5,use_ssl=0)" system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.140,port=8081,use_ssl=0)" [DEFINE] # In this section you can create macro definitions, Loading
ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn +11 −5 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ module AtsMec_LocationAPI_TestCases { /** * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeLocation/PlatUeLocation.tplan2 * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo */ testcase TC_MEC_PLAT_MP1_LOC_BV_001() runs on HttpComponent system HttpTestAdapter { // Local variables Loading @@ -62,7 +63,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( PICS_ME_APP_Q_ZONE_ID_URI & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), PICS_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), v_headers ) ) Loading @@ -76,9 +77,14 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_user_info( mw_user_info(-, -, PX_ZONE_ID) ))))) -> value v_response { mw_body_json_user_list( mw_user_list( { *, mw_user_info(PX_USER, PX_ACCESS_POINT_ID, PX_ZONE_ID, PX_RESOURCE_URL), * } )))))) -> value v_response { log("*** " & testcasename() & ": PASS: IUT successfully responds with a ZoneId ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } Loading
ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ module AtsMec_RnisAPI_TestCases { * @desc Check that the RNIS service sends all RNIS subscriptions when requested * @see Check that the RNIS service sends all RNIS subscriptions when requested */ testcase TC_MEC025_RNI_SUBSCRIPTION_005() runs on HttpComponent system HttpTestAdapter { testcase TC_MEC025_RNIS_SUBSCRIPTION_005() runs on HttpComponent system HttpTestAdapter { // Local variables var HeaderLines v_headers; var HttpMessage v_response; Loading Loading @@ -90,7 +90,7 @@ module AtsMec_RnisAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC025_RNI_SUBSCRIPTION_005 } // End of testcase TC_MEC025_RNIS_SUBSCRIPTION_005 } // End of group me_app_role Loading
ttcn/AtsMec/AtsMec_TestControl.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ module AtsMec_TestControl { if (PICS_UE_IDENTITY_API_SUPPORTED) { execute(TC_MEC_PLAT_MP1_UETAG_BV_001()); execute(TC_MEC_PLAT_MP1_UETAG_BV_002()); execute(TC_MEC_PLAT_MP1_UETAG_BV_003()); //execute(TC_MEC_PLAT_MP1_UETAG_BV_003()); } if (PICS_LOCATION_API_SUPPORTED) { execute(TC_MEC_PLAT_MP1_INF_BV_001()); Loading