Loading ttcn/AtsECRF/AtsECRF_Functions.ttcn +24 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,30 @@ module AtsECRF_Functions { ); } function f_sendListServicesByLocationRequest(template (value) ListServicesByLocation p_request) runs on HttpComponent { var boolean c_debug := true; // Local variables var Headers v_headers; f_init_default_headers_list(-, -, v_headers); f_remove_headers_list({ c_header_accept, c_header_authorization }, v_headers); if (c_debug) { f_set_headers_list({ "X-TestcaseName"},{ testcasename()},v_headers); } httpPort.send( m_http_request( m_http_request_post( PICS_ECRF_URI, v_headers, m_http_message_body_xml(m_body_xml_list_services_by_location_request(p_request)) ) ) ); } function f_receiveResponse(template HttpMessage p_message) runs on HttpComponent return HttpMessage { var HttpMessage v_response; Loading ttcn/AtsECRF/AtsECRF_Pics.ttcn +5 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,11 @@ module AtsECRF_Pics { */ modulepar boolean PICS_ECRF_LIST_SERVICES := true; /** * @desc Does the IUT support ListServicesByLocation ? */ modulepar boolean PICS_ECRF_LIST_SERVICES_BY_LOCATION := true; /** * @desc HTTP POST Uris Loading ttcn/AtsECRF/AtsECRF_Pixits.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -23,14 +23,14 @@ module AtsECRF_Pixits { extension "File:../xsd/geometryBasic2d.xsd"; } type record of XSD.String StringList; type set of XSD.String StringSet; modulepar XSD.AnyURI PX_E_UNKNOWN_SERVICE_URN := "urn:service:sos.unknown"; // ECRF Configurations modulepar XSD.String PX_ECRF_SOURCE := "ecrf1.gridgears.plugtests.net"; modulepar XSD.String PX_ECRF_VIA := "ecrf1.gridgears.plugtests.net"; // Should usually be the same as PX_ECRF_SOURCE modulepar StringList PX_CONFIGURED_SERVICES := { "urn:service:sos", "urn:service:sos.ambulance", "urn:service:sos.fire", "urn:service:sos.police" }; modulepar StringSet PX_CONFIGURED_SERVICES := { "urn:service:sos", "urn:service:sos.ambulance", "urn:service:sos.fire", "urn:service:sos.police" }; // Polygon (Lat/Lon) Loading ttcn/AtsECRF/AtsECRF_Templates.ttcn +4 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,8 @@ module AtsECRF_Templates { in template (present) ListServicesResponse p_list_services_response ) := mw_http_response(mw_http_response_ok(mw_http_message_body_xml(mw_body_xml_list_services_response(p_list_services_response)))) template HttpMessage mw_http_list_services_by_location_response( in template (present) ListServicesByLocationResponse p_list_services_by_location_response ) := mw_http_response(mw_http_response_ok(mw_http_message_body_xml(mw_body_xml_list_services_by_location_response(p_list_services_by_location_response)))) } ttcn/AtsECRF/AtsECRF_TestCases.ttcn +49 −3 Original line number Diff line number Diff line Loading @@ -571,8 +571,6 @@ module AtsECRF_TestCases { // Test component configuration f_cf_01_http_up(); // Test adapter configuration // Preamble f_sendListServicesRequest(m_list_services(-,"urn:service:sos")) f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); Loading @@ -591,6 +589,54 @@ module AtsECRF_TestCases { f_cf_01_http_down(); } // End of testcase TC_ECRF_HTTP_POST_BV_09 /** * @desc "IUT successfully responds with configured service types for a ListServicesByLocation request" */ testcase TC_ECRF_LOST_BV_10() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ { name := "PICS_ECRF_LIST_SERVICES_BY_LOCATION", val := PICS_ECRF_LIST_SERVICES_BY_LOCATION } }) // Test component configuration f_cf_01_http_up(); // Preamble f_sendListServicesByLocationRequest( m_list_services_by_location( { m_location( PX_LOCATION_ID, { m_extension_point(encvalue_unichar(valueof(m_point(PX_POINT_IN_E_POLICE_SERVICE_BOUNDARY, PX_SRS_NAME, "point1")))) }, "geodetic-2d" // TODO Use a Pixit ) }, -, "urn:service:sos" ) ); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; f_receiveResponse(mw_http_list_services_by_location_response( mw_list_services_by_location_response( { "urn:service:sos.fire", "urn:service:sos.police" }, LibItsHttp_XmlTemplates.mw_path({ LibItsHttp_XmlTemplates.mw_via(PX_ECRF_VIA) }), -, mw_location_used(PX_LOCATION_ID) ) ) ); // Postamble f_cf_01_http_down(); } // End of testcase TC_ECRF_LOST_BV_10 } // End of group LOST } // End of module AtsECRF_TestCases Loading
ttcn/AtsECRF/AtsECRF_Functions.ttcn +24 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,30 @@ module AtsECRF_Functions { ); } function f_sendListServicesByLocationRequest(template (value) ListServicesByLocation p_request) runs on HttpComponent { var boolean c_debug := true; // Local variables var Headers v_headers; f_init_default_headers_list(-, -, v_headers); f_remove_headers_list({ c_header_accept, c_header_authorization }, v_headers); if (c_debug) { f_set_headers_list({ "X-TestcaseName"},{ testcasename()},v_headers); } httpPort.send( m_http_request( m_http_request_post( PICS_ECRF_URI, v_headers, m_http_message_body_xml(m_body_xml_list_services_by_location_request(p_request)) ) ) ); } function f_receiveResponse(template HttpMessage p_message) runs on HttpComponent return HttpMessage { var HttpMessage v_response; Loading
ttcn/AtsECRF/AtsECRF_Pics.ttcn +5 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,11 @@ module AtsECRF_Pics { */ modulepar boolean PICS_ECRF_LIST_SERVICES := true; /** * @desc Does the IUT support ListServicesByLocation ? */ modulepar boolean PICS_ECRF_LIST_SERVICES_BY_LOCATION := true; /** * @desc HTTP POST Uris Loading
ttcn/AtsECRF/AtsECRF_Pixits.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -23,14 +23,14 @@ module AtsECRF_Pixits { extension "File:../xsd/geometryBasic2d.xsd"; } type record of XSD.String StringList; type set of XSD.String StringSet; modulepar XSD.AnyURI PX_E_UNKNOWN_SERVICE_URN := "urn:service:sos.unknown"; // ECRF Configurations modulepar XSD.String PX_ECRF_SOURCE := "ecrf1.gridgears.plugtests.net"; modulepar XSD.String PX_ECRF_VIA := "ecrf1.gridgears.plugtests.net"; // Should usually be the same as PX_ECRF_SOURCE modulepar StringList PX_CONFIGURED_SERVICES := { "urn:service:sos", "urn:service:sos.ambulance", "urn:service:sos.fire", "urn:service:sos.police" }; modulepar StringSet PX_CONFIGURED_SERVICES := { "urn:service:sos", "urn:service:sos.ambulance", "urn:service:sos.fire", "urn:service:sos.police" }; // Polygon (Lat/Lon) Loading
ttcn/AtsECRF/AtsECRF_Templates.ttcn +4 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,8 @@ module AtsECRF_Templates { in template (present) ListServicesResponse p_list_services_response ) := mw_http_response(mw_http_response_ok(mw_http_message_body_xml(mw_body_xml_list_services_response(p_list_services_response)))) template HttpMessage mw_http_list_services_by_location_response( in template (present) ListServicesByLocationResponse p_list_services_by_location_response ) := mw_http_response(mw_http_response_ok(mw_http_message_body_xml(mw_body_xml_list_services_by_location_response(p_list_services_by_location_response)))) }
ttcn/AtsECRF/AtsECRF_TestCases.ttcn +49 −3 Original line number Diff line number Diff line Loading @@ -571,8 +571,6 @@ module AtsECRF_TestCases { // Test component configuration f_cf_01_http_up(); // Test adapter configuration // Preamble f_sendListServicesRequest(m_list_services(-,"urn:service:sos")) f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); Loading @@ -591,6 +589,54 @@ module AtsECRF_TestCases { f_cf_01_http_down(); } // End of testcase TC_ECRF_HTTP_POST_BV_09 /** * @desc "IUT successfully responds with configured service types for a ListServicesByLocation request" */ testcase TC_ECRF_LOST_BV_10() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ { name := "PICS_ECRF_LIST_SERVICES_BY_LOCATION", val := PICS_ECRF_LIST_SERVICES_BY_LOCATION } }) // Test component configuration f_cf_01_http_up(); // Preamble f_sendListServicesByLocationRequest( m_list_services_by_location( { m_location( PX_LOCATION_ID, { m_extension_point(encvalue_unichar(valueof(m_point(PX_POINT_IN_E_POLICE_SERVICE_BOUNDARY, PX_SRS_NAME, "point1")))) }, "geodetic-2d" // TODO Use a Pixit ) }, -, "urn:service:sos" ) ); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; f_receiveResponse(mw_http_list_services_by_location_response( mw_list_services_by_location_response( { "urn:service:sos.fire", "urn:service:sos.police" }, LibItsHttp_XmlTemplates.mw_path({ LibItsHttp_XmlTemplates.mw_via(PX_ECRF_VIA) }), -, mw_location_used(PX_LOCATION_ID) ) ) ); // Postamble f_cf_01_http_down(); } // End of testcase TC_ECRF_LOST_BV_10 } // End of group LOST } // End of module AtsECRF_TestCases