Loading ccsrc/Protocols/Json/json_codec.cc +5 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,11 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy LocationAPI__TypesAndValues::AccessPointList access_point_list; access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.accessPointList() = access_point_list; } else if (it->second.find("\"SubscriptionLinkList\"") != std::string::npos) { // Be carefull to the order // TODO To be refined, find("\"accessPointList\"") is not optimal RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.subscriptionLinkList() = subscription_link_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); Loading etc/AtsMec/AtsMec_LocationAPI.cfg→etc/AtsMec/AtsMec.cfg +5 −6 Original line number Diff line number Diff line Loading @@ -7,14 +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.1.140" LibItsHttp_Pics.PICS_HEADER_HOST := "172.16.3.114" #LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87" LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87" #LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibMec_Pics.PICS_PLAT_IUT := true LibMec_Pics.PICS_RNIS_IUT := false LibMec_Pics.PICS_MEC_PLAT := true LibMec_Pics.PICS_RNIS := true [LOGGING] # In this section you can specify the name of the log file and the classes of events Loading @@ -32,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=172.16.3.114,port=8081,use_ssl=0)" system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=172.28.4.87,port=8081,use_ssl=0)" [DEFINE] # In this section you can create macro definitions, Loading ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn +3 −3 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ module AtsMec_LocationAPI_TestCases { var HttpMessage v_response; // Test control if (not(PICS_PLAT_IUT) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_PLAT_IUT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); if (not(PICS_MEC_PLAT) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } Loading @@ -63,7 +63,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( PICS_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), v_headers ) ) Loading ttcn/AtsMec/AtsMec_RadioNodeLocationAPI_TestCases.ttcn +3 −3 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases { var HttpMessage v_response; // Test control if (not(PICS_PLAT_IUT) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_PLAT_IUT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); if (not(PICS_MEC_PLAT) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } Loading @@ -63,7 +63,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( PICS_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", v_headers ) ) Loading ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn +10 −7 Original line number Diff line number Diff line Loading @@ -38,7 +38,8 @@ 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 * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/App/Mp1/Rnis/RnisAllSubscriptions_BV.tplan2 * @see */ testcase TC_MEC025_RNIS_SUBSCRIPTION_005() runs on HttpComponent system HttpTestAdapter { // Local variables Loading @@ -46,8 +47,8 @@ module AtsMec_RnisAPI_TestCases { var HttpMessage v_response; // Test control if (not(PICS_RNIS_IUT) or not(PICS_RNIS_ALL_SUBSCRIPTIONS)) { log("*** " & testcasename() & ": PICS_RNIS_IUT and PICS_RNIS_ALL_SUBSCRIPTIONS required for executing the TC ***"); if (not(PICS_RNIS) or not(PICS_RNIS_ALL_SUBSCRIPTIONS)) { log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_ALL_SUBSCRIPTIONS required for executing the TC ***"); setverdict(inconc); stop; } Loading @@ -62,7 +63,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( PICS_RNIS_SUBSCRITIONS_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), PX_RNIS_SUBSCRITIONS_URI, v_headers ) ) Loading @@ -76,9 +77,11 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_cell_change_subscription( mw_cell_change_subscription ))))) -> value v_response { mw_body_json_subscriptions_list( mw_subscriptions_list( PX_LINKS_SELF, ? )))))) -> value v_response { log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } Loading Loading
ccsrc/Protocols/Json/json_codec.cc +5 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,11 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy LocationAPI__TypesAndValues::AccessPointList access_point_list; access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.accessPointList() = access_point_list; } else if (it->second.find("\"SubscriptionLinkList\"") != std::string::npos) { // Be carefull to the order // TODO To be refined, find("\"accessPointList\"") is not optimal RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.subscriptionLinkList() = subscription_link_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); Loading
etc/AtsMec/AtsMec_LocationAPI.cfg→etc/AtsMec/AtsMec.cfg +5 −6 Original line number Diff line number Diff line Loading @@ -7,14 +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.1.140" LibItsHttp_Pics.PICS_HEADER_HOST := "172.16.3.114" #LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87" LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87" #LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibMec_Pics.PICS_PLAT_IUT := true LibMec_Pics.PICS_RNIS_IUT := false LibMec_Pics.PICS_MEC_PLAT := true LibMec_Pics.PICS_RNIS := true [LOGGING] # In this section you can specify the name of the log file and the classes of events Loading @@ -32,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=172.16.3.114,port=8081,use_ssl=0)" system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=172.28.4.87,port=8081,use_ssl=0)" [DEFINE] # In this section you can create macro definitions, Loading
ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn +3 −3 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ module AtsMec_LocationAPI_TestCases { var HttpMessage v_response; // Test control if (not(PICS_PLAT_IUT) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_PLAT_IUT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); if (not(PICS_MEC_PLAT) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } Loading @@ -63,7 +63,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( PICS_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), v_headers ) ) Loading
ttcn/AtsMec/AtsMec_RadioNodeLocationAPI_TestCases.ttcn +3 −3 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases { var HttpMessage v_response; // Test control if (not(PICS_PLAT_IUT) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_PLAT_IUT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); if (not(PICS_MEC_PLAT) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } Loading @@ -63,7 +63,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( PICS_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", v_headers ) ) Loading
ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn +10 −7 Original line number Diff line number Diff line Loading @@ -38,7 +38,8 @@ 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 * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/App/Mp1/Rnis/RnisAllSubscriptions_BV.tplan2 * @see */ testcase TC_MEC025_RNIS_SUBSCRIPTION_005() runs on HttpComponent system HttpTestAdapter { // Local variables Loading @@ -46,8 +47,8 @@ module AtsMec_RnisAPI_TestCases { var HttpMessage v_response; // Test control if (not(PICS_RNIS_IUT) or not(PICS_RNIS_ALL_SUBSCRIPTIONS)) { log("*** " & testcasename() & ": PICS_RNIS_IUT and PICS_RNIS_ALL_SUBSCRIPTIONS required for executing the TC ***"); if (not(PICS_RNIS) or not(PICS_RNIS_ALL_SUBSCRIPTIONS)) { log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_ALL_SUBSCRIPTIONS required for executing the TC ***"); setverdict(inconc); stop; } Loading @@ -62,7 +63,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( PICS_RNIS_SUBSCRITIONS_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), PX_RNIS_SUBSCRITIONS_URI, v_headers ) ) Loading @@ -76,9 +77,11 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_cell_change_subscription( mw_cell_change_subscription ))))) -> value v_response { mw_body_json_subscriptions_list( mw_subscriptions_list( PX_LINKS_SELF, ? )))))) -> value v_response { log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } Loading