Loading ttcn/AtsECRF/AtsECRF_Functions.ttcn +24 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,29 @@ module AtsECRF_Functions { ); } function f_sendListServicesRequest(template (value) ListServices 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_request(p_request)) ) ) ); } function f_receiveResponse(template HttpMessage p_message) runs on HttpComponent return HttpMessage { Loading ttcn/AtsECRF/AtsECRF_Pics.ttcn +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,10 @@ module AtsECRF_Pics { */ modulepar boolean PICS_ECRF_GEOMETRY_CIRCLE := true; /** * @desc Does the IUT support ListServices ? */ modulepar boolean PICS_ECRF_LIST_SERVICES := true; /** Loading ttcn/AtsECRF/AtsECRF_Pixits.ttcn +5 −1 Original line number Diff line number Diff line Loading @@ -23,10 +23,14 @@ module AtsECRF_Pixits { extension "File:../xsd/geometryBasic2d.xsd"; } modulepar XSD.AnyURI PX_E_UNKNOWN_SERVICE_URN := "urn:service:sos.unknown"; type record of XSD.String StringList; 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" }; // Polygon (Lat/Lon) Loading ttcn/AtsECRF/AtsECRF_Templates.ttcn +5 −0 Original line number Diff line number Diff line Loading @@ -17,4 +17,9 @@ module AtsECRF_Templates { template HttpMessage mw_http_find_service_response_error( in template ExceptionContainer p_error ) := mw_http_response(mw_http_response_ok(mw_http_message_body_xml(mw_body_xml_find_service_response_error(p_error)))) template HttpMessage mw_http_list_services_response( 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)))) } ttcn/AtsECRF/AtsECRF_TestCases.ttcn +32 −0 Original line number Diff line number Diff line Loading @@ -559,6 +559,38 @@ module AtsECRF_TestCases { f_cf_01_http_down(); } /** * @desc "IUT successfully responds with configured service types for a ListServices request" */ testcase TC_ECRF_LOST_BV_09() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ { name := "PICS_ECRF_LIST_SERVICES", val := PICS_ECRF_LIST_SERVICES } }) // 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); // Test Body tc_ac.start; f_receiveResponse(mw_http_list_services_response( mw_list_services_response( PX_CONFIGURED_SERVICES, LibItsHttp_XmlTemplates.mw_path({ LibItsHttp_XmlTemplates.mw_via(PX_ECRF_VIA) }) ) ) ); // Postamble f_cf_01_http_down(); } // End of testcase TC_ECRF_HTTP_POST_BV_09 } // End of group LOST } // End of module AtsECRF_TestCases Loading
ttcn/AtsECRF/AtsECRF_Functions.ttcn +24 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,29 @@ module AtsECRF_Functions { ); } function f_sendListServicesRequest(template (value) ListServices 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_request(p_request)) ) ) ); } function f_receiveResponse(template HttpMessage p_message) runs on HttpComponent return HttpMessage { Loading
ttcn/AtsECRF/AtsECRF_Pics.ttcn +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,10 @@ module AtsECRF_Pics { */ modulepar boolean PICS_ECRF_GEOMETRY_CIRCLE := true; /** * @desc Does the IUT support ListServices ? */ modulepar boolean PICS_ECRF_LIST_SERVICES := true; /** Loading
ttcn/AtsECRF/AtsECRF_Pixits.ttcn +5 −1 Original line number Diff line number Diff line Loading @@ -23,10 +23,14 @@ module AtsECRF_Pixits { extension "File:../xsd/geometryBasic2d.xsd"; } modulepar XSD.AnyURI PX_E_UNKNOWN_SERVICE_URN := "urn:service:sos.unknown"; type record of XSD.String StringList; 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" }; // Polygon (Lat/Lon) Loading
ttcn/AtsECRF/AtsECRF_Templates.ttcn +5 −0 Original line number Diff line number Diff line Loading @@ -17,4 +17,9 @@ module AtsECRF_Templates { template HttpMessage mw_http_find_service_response_error( in template ExceptionContainer p_error ) := mw_http_response(mw_http_response_ok(mw_http_message_body_xml(mw_body_xml_find_service_response_error(p_error)))) template HttpMessage mw_http_list_services_response( 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)))) }
ttcn/AtsECRF/AtsECRF_TestCases.ttcn +32 −0 Original line number Diff line number Diff line Loading @@ -559,6 +559,38 @@ module AtsECRF_TestCases { f_cf_01_http_down(); } /** * @desc "IUT successfully responds with configured service types for a ListServices request" */ testcase TC_ECRF_LOST_BV_09() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ { name := "PICS_ECRF_LIST_SERVICES", val := PICS_ECRF_LIST_SERVICES } }) // 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); // Test Body tc_ac.start; f_receiveResponse(mw_http_list_services_response( mw_list_services_response( PX_CONFIGURED_SERVICES, LibItsHttp_XmlTemplates.mw_path({ LibItsHttp_XmlTemplates.mw_via(PX_ECRF_VIA) }) ) ) ); // Postamble f_cf_01_http_down(); } // End of testcase TC_ECRF_HTTP_POST_BV_09 } // End of group LOST } // End of module AtsECRF_TestCases