Loading ttcn/AtsESRP/AtsESRP_Functions.ttcn +18 −1 Original line number Diff line number Diff line Loading @@ -162,5 +162,22 @@ module AtsESRP_Functions { } } } function f_awaitingDequeueResponse(template LibItsHttp_TypesAndValues.Response p_response) runs on HttpComponent { alt { [] httpPort.receive( mw_http_response(p_response)) { tc_ac.stop; log("*** " & testcasename() & ": INFO: IUT successfully responsds with an error code***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } } } // End of group DequeueRegistration } ttcn/AtsESRP/AtsESRP_Pixits.ttcn +2 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ module AtsESRP_Pixits { modulepar charstring PX_ESRP_DEQUEUE_REGISTRATION_URI := "/esrp"; modulepar charstring PX_ESRP_DEQUEUE_REGISTRATION_QUEUE := "sip:queue@esinet.io"; modulepar charstring PX_ESRP_DEQUEUE_REGISTRATION_QUEUE_INVALID := "not-a-queue"; modulepar charstring PX_ESRP_DEQUEUE_REGISTRATION_DEQUEUER := "sip:target@esinet.io"; modulepar integer PX_ESRP_DEQUEUE_REGISTRATION_EXPIRATION := 3600; modulepar integer PX_ESRP_DEQUEUE_REGISTRATION_PREFERENCE := 5; Loading ttcn/AtsESRP/AtsESRP_TestCases.ttcn +33 −2 Original line number Diff line number Diff line Loading @@ -377,11 +377,42 @@ module AtsESRP_TestCases { // Test Body tc_ac.start; f_awaitingDequeueRegistrationResponse(mw_dequeue_response_ok(?,200)) f_awaitingDequeueRegistrationResponse(mw_dequeue_response_ok(?)) // Postamble f_cf_01_http_down(); } } // TC_ESRP_HTTP_DEQUEUE_REGISTRATION_TARGET_REGISTRATION_BV_01 /** * @desc "IUT sends correct error response for invalid Dequeue Registration" */ testcase TC_ESRP_HTTP_DEQUEUE_REGISTRATION_TARGET_REGISTRATION_BV_02() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ { name := "PICS_ESRP_TARGET_DEQUEUE_REGISTRATION_SUPPORT", val := PICS_ESRP_TARGET_DEQUEUE_REGISTRATION_SUPPORT } }) // Test component configuration f_cf_01_http_up(); // Preamble f_sendDequeueRegistration( m_dequeue_registration_request( PX_ESRP_DEQUEUE_REGISTRATION_QUEUE_INVALID, PX_ESRP_DEQUEUE_REGISTRATION_DEQUEUER, PX_ESRP_DEQUEUE_REGISTRATION_EXPIRATION ) ); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; f_awaitingDequeueResponse(mw_http_response_456_bad_queue) // Postamble f_cf_01_http_down(); } // End of TC_ESRP_HTTP_DEQUEUE_REGISTRATION_TARGET_REGISTRATION_BV_02 } // End of group DequeueRegistrationTarget group QueueState { Loading ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Templates.ttcn +22 −18 Original line number Diff line number Diff line Loading @@ -24,9 +24,11 @@ module LibNg112_Templates { } // LibItsHttp import from LibItsHttp_MessageBodyTypes all; import from LibItsHttp_JsonMessageBodyTypes all; import from LibItsHttp_JsonTemplates all; import from LibItsHttp_Templates all; import from LibItsHttp_TypesAndValues all; import from urn_ietf_params_xml_ns_pidf_geopriv10 all; // Json Loading Loading @@ -550,29 +552,31 @@ module LibNg112_Templates { ) := { DequeueRegistrationExpirationTime := p_DequeueRegistrationExpirationTime, DequeueRegistrationStatusCode := 0 } // End of template m_dequeue_registration_request template (present) DequeueRegistrationResponse mw_dequeue_response_ok( template (present) JSON.Integer p_DequeueRegistrationExpirationTime := ?, template (present) JSON.Integer p_DequeueRegistrationStatusCode := ? template (present) JSON.Integer p_DequeueRegistrationExpirationTime := ? ) := { DequeueRegistrationExpirationTime := p_DequeueRegistrationExpirationTime, DequeueRegistrationStatusCode := p_DequeueRegistrationStatusCode DequeueRegistrationStatusCode := ? } // End of template mw_dequeue_registration_request template (value) DequeueRegistrationResponse m_dequeue_response_ko( in template (value) JSON.Integer p_DequeueRegistrationExpirationTime, in template (value) JSON.Integer p_DequeueRegistrationStatusCode ) modifies m_dequeue_response_ok := { DequeueRegistrationStatusCode := p_DequeueRegistrationStatusCode } // End of template m_dequeue_response_ko template (present) DequeueRegistrationResponse mw_dequeue_response_ko( template (present) JSON.Integer p_DequeueRegistrationExpirationTime := ?, template (present) JSON.Integer p_DequeueRegistrationStatusCode := ? ) modifies mw_dequeue_response_ok := { DequeueRegistrationStatusCode := p_DequeueRegistrationStatusCode } // End of template mw_dequeue_response_ko template LibItsHttp_TypesAndValues.Response mw_http_response_456_bad_queue( template HttpMessageBody p_body := *, template (present) Headers p_header := ? ) modifies mw_http_response_ko := { statuscode := 456, statustext := ? } // End of template mw_http_response_456_bad_queue template LibItsHttp_TypesAndValues.Response mw_http_response_457_bad_dequeuePreference( template HttpMessageBody p_body := *, template (present) Headers p_header := ? ) modifies mw_http_response_ko := { statuscode := 457, statustext := ? } // End of template mw_http_response_457_bad_dequeuePreference } // End of group dequeue_register Loading ttcn/patch_lib_http/LibItsHttp_Templates.ttcn +11 −1 Original line number Diff line number Diff line Loading @@ -319,6 +319,16 @@ module LibItsHttp_Templates { statustext := "Precondition Failed" } // End of template mw_http_response_412_not_found template Response mw_http_response_4XX( template HttpMessageBody p_body := *, template (present) Headers p_header := ?, template (present) integer p_status_code := 400, template (present) charstring p_status_text := "Bad Request" ) modifies mw_http_response_ko := { statuscode := p_status_code, statustext := p_status_text } // End of template mw_http_response_4XX } // End of group http_responses group http_xml_body { Loading Loading
ttcn/AtsESRP/AtsESRP_Functions.ttcn +18 −1 Original line number Diff line number Diff line Loading @@ -162,5 +162,22 @@ module AtsESRP_Functions { } } } function f_awaitingDequeueResponse(template LibItsHttp_TypesAndValues.Response p_response) runs on HttpComponent { alt { [] httpPort.receive( mw_http_response(p_response)) { tc_ac.stop; log("*** " & testcasename() & ": INFO: IUT successfully responsds with an error code***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } } } // End of group DequeueRegistration }
ttcn/AtsESRP/AtsESRP_Pixits.ttcn +2 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ module AtsESRP_Pixits { modulepar charstring PX_ESRP_DEQUEUE_REGISTRATION_URI := "/esrp"; modulepar charstring PX_ESRP_DEQUEUE_REGISTRATION_QUEUE := "sip:queue@esinet.io"; modulepar charstring PX_ESRP_DEQUEUE_REGISTRATION_QUEUE_INVALID := "not-a-queue"; modulepar charstring PX_ESRP_DEQUEUE_REGISTRATION_DEQUEUER := "sip:target@esinet.io"; modulepar integer PX_ESRP_DEQUEUE_REGISTRATION_EXPIRATION := 3600; modulepar integer PX_ESRP_DEQUEUE_REGISTRATION_PREFERENCE := 5; Loading
ttcn/AtsESRP/AtsESRP_TestCases.ttcn +33 −2 Original line number Diff line number Diff line Loading @@ -377,11 +377,42 @@ module AtsESRP_TestCases { // Test Body tc_ac.start; f_awaitingDequeueRegistrationResponse(mw_dequeue_response_ok(?,200)) f_awaitingDequeueRegistrationResponse(mw_dequeue_response_ok(?)) // Postamble f_cf_01_http_down(); } } // TC_ESRP_HTTP_DEQUEUE_REGISTRATION_TARGET_REGISTRATION_BV_01 /** * @desc "IUT sends correct error response for invalid Dequeue Registration" */ testcase TC_ESRP_HTTP_DEQUEUE_REGISTRATION_TARGET_REGISTRATION_BV_02() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ { name := "PICS_ESRP_TARGET_DEQUEUE_REGISTRATION_SUPPORT", val := PICS_ESRP_TARGET_DEQUEUE_REGISTRATION_SUPPORT } }) // Test component configuration f_cf_01_http_up(); // Preamble f_sendDequeueRegistration( m_dequeue_registration_request( PX_ESRP_DEQUEUE_REGISTRATION_QUEUE_INVALID, PX_ESRP_DEQUEUE_REGISTRATION_DEQUEUER, PX_ESRP_DEQUEUE_REGISTRATION_EXPIRATION ) ); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; f_awaitingDequeueResponse(mw_http_response_456_bad_queue) // Postamble f_cf_01_http_down(); } // End of TC_ESRP_HTTP_DEQUEUE_REGISTRATION_TARGET_REGISTRATION_BV_02 } // End of group DequeueRegistrationTarget group QueueState { Loading
ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Templates.ttcn +22 −18 Original line number Diff line number Diff line Loading @@ -24,9 +24,11 @@ module LibNg112_Templates { } // LibItsHttp import from LibItsHttp_MessageBodyTypes all; import from LibItsHttp_JsonMessageBodyTypes all; import from LibItsHttp_JsonTemplates all; import from LibItsHttp_Templates all; import from LibItsHttp_TypesAndValues all; import from urn_ietf_params_xml_ns_pidf_geopriv10 all; // Json Loading Loading @@ -550,29 +552,31 @@ module LibNg112_Templates { ) := { DequeueRegistrationExpirationTime := p_DequeueRegistrationExpirationTime, DequeueRegistrationStatusCode := 0 } // End of template m_dequeue_registration_request template (present) DequeueRegistrationResponse mw_dequeue_response_ok( template (present) JSON.Integer p_DequeueRegistrationExpirationTime := ?, template (present) JSON.Integer p_DequeueRegistrationStatusCode := ? template (present) JSON.Integer p_DequeueRegistrationExpirationTime := ? ) := { DequeueRegistrationExpirationTime := p_DequeueRegistrationExpirationTime, DequeueRegistrationStatusCode := p_DequeueRegistrationStatusCode DequeueRegistrationStatusCode := ? } // End of template mw_dequeue_registration_request template (value) DequeueRegistrationResponse m_dequeue_response_ko( in template (value) JSON.Integer p_DequeueRegistrationExpirationTime, in template (value) JSON.Integer p_DequeueRegistrationStatusCode ) modifies m_dequeue_response_ok := { DequeueRegistrationStatusCode := p_DequeueRegistrationStatusCode } // End of template m_dequeue_response_ko template (present) DequeueRegistrationResponse mw_dequeue_response_ko( template (present) JSON.Integer p_DequeueRegistrationExpirationTime := ?, template (present) JSON.Integer p_DequeueRegistrationStatusCode := ? ) modifies mw_dequeue_response_ok := { DequeueRegistrationStatusCode := p_DequeueRegistrationStatusCode } // End of template mw_dequeue_response_ko template LibItsHttp_TypesAndValues.Response mw_http_response_456_bad_queue( template HttpMessageBody p_body := *, template (present) Headers p_header := ? ) modifies mw_http_response_ko := { statuscode := 456, statustext := ? } // End of template mw_http_response_456_bad_queue template LibItsHttp_TypesAndValues.Response mw_http_response_457_bad_dequeuePreference( template HttpMessageBody p_body := *, template (present) Headers p_header := ? ) modifies mw_http_response_ko := { statuscode := 457, statustext := ? } // End of template mw_http_response_457_bad_dequeuePreference } // End of group dequeue_register Loading
ttcn/patch_lib_http/LibItsHttp_Templates.ttcn +11 −1 Original line number Diff line number Diff line Loading @@ -319,6 +319,16 @@ module LibItsHttp_Templates { statustext := "Precondition Failed" } // End of template mw_http_response_412_not_found template Response mw_http_response_4XX( template HttpMessageBody p_body := *, template (present) Headers p_header := ?, template (present) integer p_status_code := 400, template (present) charstring p_status_text := "Bad Request" ) modifies mw_http_response_ko := { statuscode := p_status_code, statustext := p_status_text } // End of template mw_http_response_4XX } // End of group http_responses group http_xml_body { Loading