Loading ttcn/AtsECRF/AtsECRF_Functions.ttcn +26 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ module AtsECRF_Functions { import from LibItsHttp_Functions all; import from LibItsHttp_TypesAndValues all; import from LibItsHttp_XmlTemplates all; import from LibItsHttp_MessageBodyTypes all; import from LibCommon_Sync all; Loading Loading @@ -116,6 +117,30 @@ module AtsECRF_Functions { } function f_sendRawRequest(template (value) TextBody p_text_body) 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, { text_body := p_text_body} ) ) ); } function f_receiveResponse(template HttpMessage p_message) runs on HttpComponent return HttpMessage { var HttpMessage v_response; Loading ttcn/AtsECRF/AtsECRF_Pixits.ttcn +2 −0 Original line number Diff line number Diff line Loading @@ -127,4 +127,6 @@ module AtsECRF_Pixits { modulepar XSD.String PX_DISPLAY_NAME_FIRE_G1 := "Fire G1"; modulepar XSD.AnyURI PX_SOURCE_ID_FIRE_G1 := "1d2af31b-4f75-4277-871a-dd3fad15b002"; modulepar charstring PX_INVALID_REQUEST := "<?xml version=\"1.0\" encoding=\"UTF-8\"?><invalid>xml"; } // End of module AtsECRF_Pixits ttcn/AtsECRF/AtsECRF_TestCases.ttcn +33 −1 Original line number Diff line number Diff line Loading @@ -1086,7 +1086,39 @@ module AtsECRF_TestCases { ); // Postamble f_cf_01_http_down(); } // End of testcase TC_ECRF_LOST_BV_10 } // End of testcase TC_ECRF_LOST_BI_02 /** * @desc "IUT responds to a findServiceRequest with an badRequest error response" */ testcase TC_ECRF_LOST_BI_03() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ { name := "PICS_ECRF_FIND_SERVICE", val := PICS_ECRF_FIND_SERVICE } }) // Test component configuration f_cf_01_http_up(); // Preamble f_sendRawRequest(PX_INVALID_REQUEST); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; f_receiveResponse(mw_http_find_service_response_error( mw_exception_badRequest( PX_ECRF_NAPTR, mw_basic_exception ) ) ); // Postamble f_cf_01_http_down(); } } Loading ttcn/patch_lib_http/LibItsHttp_XmlTemplates.ttcn +11 −1 Original line number Diff line number Diff line Loading @@ -723,7 +723,17 @@ module LibItsHttp_XmlTemplates { source := p_source, choice_list := { { loop := p_loop } }, notLost_list := p_notLost_list } // End of template mw_exception_locationProfileUnrecognized } // End of template mw_exception_loop template (present) ExceptionContainer mw_exception_badRequest( template (present) AppUniqueString p_source := ?, template (present) BadRequest p_bad := ?, template (present) ExceptionContainer.notLost_list p_notLost_list := ? ) := { source := p_source, choice_list := { { badRequest := p_bad } }, notLost_list := p_notLost_list } // End of template mw_exception_badRequest template (value) LocationUsed m_location_used( in template (value) XSD.Token p_id Loading Loading
ttcn/AtsECRF/AtsECRF_Functions.ttcn +26 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ module AtsECRF_Functions { import from LibItsHttp_Functions all; import from LibItsHttp_TypesAndValues all; import from LibItsHttp_XmlTemplates all; import from LibItsHttp_MessageBodyTypes all; import from LibCommon_Sync all; Loading Loading @@ -116,6 +117,30 @@ module AtsECRF_Functions { } function f_sendRawRequest(template (value) TextBody p_text_body) 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, { text_body := p_text_body} ) ) ); } function f_receiveResponse(template HttpMessage p_message) runs on HttpComponent return HttpMessage { var HttpMessage v_response; Loading
ttcn/AtsECRF/AtsECRF_Pixits.ttcn +2 −0 Original line number Diff line number Diff line Loading @@ -127,4 +127,6 @@ module AtsECRF_Pixits { modulepar XSD.String PX_DISPLAY_NAME_FIRE_G1 := "Fire G1"; modulepar XSD.AnyURI PX_SOURCE_ID_FIRE_G1 := "1d2af31b-4f75-4277-871a-dd3fad15b002"; modulepar charstring PX_INVALID_REQUEST := "<?xml version=\"1.0\" encoding=\"UTF-8\"?><invalid>xml"; } // End of module AtsECRF_Pixits
ttcn/AtsECRF/AtsECRF_TestCases.ttcn +33 −1 Original line number Diff line number Diff line Loading @@ -1086,7 +1086,39 @@ module AtsECRF_TestCases { ); // Postamble f_cf_01_http_down(); } // End of testcase TC_ECRF_LOST_BV_10 } // End of testcase TC_ECRF_LOST_BI_02 /** * @desc "IUT responds to a findServiceRequest with an badRequest error response" */ testcase TC_ECRF_LOST_BI_03() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ { name := "PICS_ECRF_FIND_SERVICE", val := PICS_ECRF_FIND_SERVICE } }) // Test component configuration f_cf_01_http_up(); // Preamble f_sendRawRequest(PX_INVALID_REQUEST); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; f_receiveResponse(mw_http_find_service_response_error( mw_exception_badRequest( PX_ECRF_NAPTR, mw_basic_exception ) ) ); // Postamble f_cf_01_http_down(); } } Loading
ttcn/patch_lib_http/LibItsHttp_XmlTemplates.ttcn +11 −1 Original line number Diff line number Diff line Loading @@ -723,7 +723,17 @@ module LibItsHttp_XmlTemplates { source := p_source, choice_list := { { loop := p_loop } }, notLost_list := p_notLost_list } // End of template mw_exception_locationProfileUnrecognized } // End of template mw_exception_loop template (present) ExceptionContainer mw_exception_badRequest( template (present) AppUniqueString p_source := ?, template (present) BadRequest p_bad := ?, template (present) ExceptionContainer.notLost_list p_notLost_list := ? ) := { source := p_source, choice_list := { { badRequest := p_bad } }, notLost_list := p_notLost_list } // End of template mw_exception_badRequest template (value) LocationUsed m_location_used( in template (value) XSD.Token p_id Loading