Loading ttcn/AtsLIS/AtsLIS_TestCases.ttcn +152 −24 Original line number Diff line number Diff line Loading @@ -603,7 +603,7 @@ module AtsLIS_TestCases { group Subscriptions { /** * @desc "IUT responds to a SIP Subscribe for presence event package with an 200 OK" * @desc "IUT responds to a SIP Subscribe for presence event package with an 200 OK and NOTIFY" */ testcase TC_LIS_SIP_BV_01() runs on HttpSipComponent system TestAdapter { // Local variables Loading Loading @@ -645,7 +645,7 @@ module AtsLIS_TestCases { v_response := f_receiveResponsePreamble(mw_http_location_response(mdw_location_response)); v_subscription_target := f_initSipUrlFromCharstring(f_findLocationUri(v_response.response.body.xml_body.locationResponse.locationUriSet.locationURI_list, "sip")); // Step 2: Subscribe for Presence LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); template SUBSCRIBE_Request request := m_SUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit Loading @@ -658,26 +658,7 @@ module AtsLIS_TestCases { f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); template Point mw_expected_point := mw_point_1((PX_DEVICE_NUMBER_POINT_POS[0] - PX_DOUBLE_CMP_EPSILON .. PX_DEVICE_NUMBER_POINT_POS[0] + PX_DOUBLE_CMP_EPSILON), (PX_DEVICE_NUMBER_POINT_POS[1] - PX_DOUBLE_CMP_EPSILON .. PX_DEVICE_NUMBER_POINT_POS[1] + PX_DOUBLE_CMP_EPSILON)); template Presence mw_presence := { entity := ?, tuple_list := { { id := ?, status := { basic := *, geopriv := mw_geopriv({ point := mw_expected_point}), elem_list := { * } }, elem_list := ?, contact := *, note_list := ?, timestamp_ := * } }, note_list := ?, elem_list := ? } template Presence mw_expected_presence := mw_Presence_Base(mw_geopriv({ point := mw_expected_point})); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); Loading Loading @@ -705,6 +686,153 @@ module AtsLIS_TestCases { f_cf_01_down(); } // End of testcase TC_LIS_SIP_BV_01 /** * @desc "IUT responds to a SIP "Unsubscribe" for presence event package with an 200 OK and NOTIFY" */ testcase TC_LIS_SIP_BV_02() runs on HttpSipComponent system TestAdapter { // Local variables var HttpMessage v_response; var SipUrl v_subscription_target; var NOTIFY_Request v_msg_recv; var CSeq v_cSeq_s := { fieldName := CSEQ_E, seqNumber := 0, method := "SUBSCRIBE" }; // Test control f_check_pics({ values := {PICS_LIS_SIP_SUBSCRIPTION, PICS_LIS_HELD_BY_REFERENCE, PICS_LIS_GEOMETRY_POINT}, names := {"PICS_LIS_SIP_SUBSCRIPTION", "PICS_LIS_HELD_BY_REFERENCE", "PICS_LIS_GEOMETRY_POINT"}}); // Test component configuration f_cf_01_up(); f_init_userprofile(c_userProfile_ESINetSubscriber); f_init_interfaceprofile(c_interfaceProfile_SUT_LIS); // Preamble f_sendRequest(m_locationRequest( {encvalue_unichar(valueof(m_device({ PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_POINT] })))}, m_locationTypeType( m_locationTypeBase_locationUri, true ) ) ) template LocationResponseType mdw_location_response modifies mw_location_response := { locationUriSet := { expires := ?, locationURI_list := ? length (1 .. infinity) }, presence := omit } v_response := f_receiveResponsePreamble(mw_http_location_response(mdw_location_response)); v_subscription_target := f_initSipUrlFromCharstring(f_findLocationUri(v_response.response.body.xml_body.locationResponse.locationUriSet.locationURI_list, "sip")); LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); template SUBSCRIBE_Request request := m_SUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit ); f_SendSUBSCRIBE(request); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); f_SendSUBSCRIBE(m_UNSUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit ) ); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); // Postamble f_cf_01_down(); } // End of testcase TC_LIS_SIP_BV_02 /** * @desc "IUT sends a SIP NOTIFY when the location changes" */ testcase TC_LIS_SIP_BV_03() runs on HttpSipComponent system TestAdapter { // Local variables var HttpMessage v_response; var SipUrl v_subscription_target; var NOTIFY_Request v_msg_recv; var CSeq v_cSeq_s := { fieldName := CSEQ_E, seqNumber := 0, method := "SUBSCRIBE" }; // Test control f_check_pics({ values := {PICS_LIS_SIP_SUBSCRIPTION, PICS_LIS_HELD_BY_REFERENCE, PICS_LIS_GEOMETRY_POINT}, names := {"PICS_LIS_SIP_SUBSCRIPTION", "PICS_LIS_HELD_BY_REFERENCE", "PICS_LIS_GEOMETRY_POINT"}}); // Test component configuration f_cf_01_up(); f_init_userprofile(c_userProfile_ESINetSubscriber); f_init_interfaceprofile(c_interfaceProfile_SUT_LIS); // Preamble f_sendRequest(m_locationRequest( {encvalue_unichar(valueof(m_device({ PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_POINT] })))}, m_locationTypeType( m_locationTypeBase_locationUri, true ) ) ) template LocationResponseType mdw_location_response modifies mw_location_response := { locationUriSet := { expires := ?, locationURI_list := ? length (1 .. infinity) }, presence := omit } v_response := f_receiveResponsePreamble(mw_http_location_response(mdw_location_response)); v_subscription_target := f_initSipUrlFromCharstring(f_findLocationUri(v_response.response.body.xml_body.locationResponse.locationUriSet.locationURI_list, "sip")); LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); template SUBSCRIBE_Request request := m_SUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit ); f_SendSUBSCRIBE(request); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Manually Trigger Location Change f_checkUserInfo("Update Location Information for " & PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_POINT], 1.0); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); // Postamble LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); f_SendSUBSCRIBE(m_UNSUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit ) ); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); f_cf_01_down(); } // End of testcase TC_LIS_SIP_BV_03 } Loading ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Templates.ttcn +36 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ module LibNg112_Templates { import from LibItsHttp_XmlMessageBodyTypes all; import from LibItsHttp_XmlTemplates all; import from urn_ietf_params_xml_ns_pidf_geopriv10 all; // LibNg112 import from LibNg112_TypesAndValues all; Loading Loading @@ -436,6 +438,40 @@ module LibNg112_Templates { timestamp_ := p_timestamp } // end of template m_tuple template(present) Presence mw_Presence_Base( template (present) Geopriv p_geopriv ) modifies mw_Presence_Dummy := { tuple_list := { { status := { geopriv := p_geopriv } } } } template(present) Presence mw_Presence_Dummy := { entity := ?, tuple_list := { { id := ?, status := { basic := *, geopriv := ?, elem_list := { * } } , elem_list := ?, contact := *, note_list := ?, timestamp_ := * } }, note_list := ?, elem_list := ? } } // End of group ng112_presence group dequeue_register { Loading Loading
ttcn/AtsLIS/AtsLIS_TestCases.ttcn +152 −24 Original line number Diff line number Diff line Loading @@ -603,7 +603,7 @@ module AtsLIS_TestCases { group Subscriptions { /** * @desc "IUT responds to a SIP Subscribe for presence event package with an 200 OK" * @desc "IUT responds to a SIP Subscribe for presence event package with an 200 OK and NOTIFY" */ testcase TC_LIS_SIP_BV_01() runs on HttpSipComponent system TestAdapter { // Local variables Loading Loading @@ -645,7 +645,7 @@ module AtsLIS_TestCases { v_response := f_receiveResponsePreamble(mw_http_location_response(mdw_location_response)); v_subscription_target := f_initSipUrlFromCharstring(f_findLocationUri(v_response.response.body.xml_body.locationResponse.locationUriSet.locationURI_list, "sip")); // Step 2: Subscribe for Presence LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); template SUBSCRIBE_Request request := m_SUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit Loading @@ -658,26 +658,7 @@ module AtsLIS_TestCases { f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); template Point mw_expected_point := mw_point_1((PX_DEVICE_NUMBER_POINT_POS[0] - PX_DOUBLE_CMP_EPSILON .. PX_DEVICE_NUMBER_POINT_POS[0] + PX_DOUBLE_CMP_EPSILON), (PX_DEVICE_NUMBER_POINT_POS[1] - PX_DOUBLE_CMP_EPSILON .. PX_DEVICE_NUMBER_POINT_POS[1] + PX_DOUBLE_CMP_EPSILON)); template Presence mw_presence := { entity := ?, tuple_list := { { id := ?, status := { basic := *, geopriv := mw_geopriv({ point := mw_expected_point}), elem_list := { * } }, elem_list := ?, contact := *, note_list := ?, timestamp_ := * } }, note_list := ?, elem_list := ? } template Presence mw_expected_presence := mw_Presence_Base(mw_geopriv({ point := mw_expected_point})); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); Loading Loading @@ -705,6 +686,153 @@ module AtsLIS_TestCases { f_cf_01_down(); } // End of testcase TC_LIS_SIP_BV_01 /** * @desc "IUT responds to a SIP "Unsubscribe" for presence event package with an 200 OK and NOTIFY" */ testcase TC_LIS_SIP_BV_02() runs on HttpSipComponent system TestAdapter { // Local variables var HttpMessage v_response; var SipUrl v_subscription_target; var NOTIFY_Request v_msg_recv; var CSeq v_cSeq_s := { fieldName := CSEQ_E, seqNumber := 0, method := "SUBSCRIBE" }; // Test control f_check_pics({ values := {PICS_LIS_SIP_SUBSCRIPTION, PICS_LIS_HELD_BY_REFERENCE, PICS_LIS_GEOMETRY_POINT}, names := {"PICS_LIS_SIP_SUBSCRIPTION", "PICS_LIS_HELD_BY_REFERENCE", "PICS_LIS_GEOMETRY_POINT"}}); // Test component configuration f_cf_01_up(); f_init_userprofile(c_userProfile_ESINetSubscriber); f_init_interfaceprofile(c_interfaceProfile_SUT_LIS); // Preamble f_sendRequest(m_locationRequest( {encvalue_unichar(valueof(m_device({ PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_POINT] })))}, m_locationTypeType( m_locationTypeBase_locationUri, true ) ) ) template LocationResponseType mdw_location_response modifies mw_location_response := { locationUriSet := { expires := ?, locationURI_list := ? length (1 .. infinity) }, presence := omit } v_response := f_receiveResponsePreamble(mw_http_location_response(mdw_location_response)); v_subscription_target := f_initSipUrlFromCharstring(f_findLocationUri(v_response.response.body.xml_body.locationResponse.locationUriSet.locationURI_list, "sip")); LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); template SUBSCRIBE_Request request := m_SUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit ); f_SendSUBSCRIBE(request); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); f_SendSUBSCRIBE(m_UNSUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit ) ); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); // Postamble f_cf_01_down(); } // End of testcase TC_LIS_SIP_BV_02 /** * @desc "IUT sends a SIP NOTIFY when the location changes" */ testcase TC_LIS_SIP_BV_03() runs on HttpSipComponent system TestAdapter { // Local variables var HttpMessage v_response; var SipUrl v_subscription_target; var NOTIFY_Request v_msg_recv; var CSeq v_cSeq_s := { fieldName := CSEQ_E, seqNumber := 0, method := "SUBSCRIBE" }; // Test control f_check_pics({ values := {PICS_LIS_SIP_SUBSCRIPTION, PICS_LIS_HELD_BY_REFERENCE, PICS_LIS_GEOMETRY_POINT}, names := {"PICS_LIS_SIP_SUBSCRIPTION", "PICS_LIS_HELD_BY_REFERENCE", "PICS_LIS_GEOMETRY_POINT"}}); // Test component configuration f_cf_01_up(); f_init_userprofile(c_userProfile_ESINetSubscriber); f_init_interfaceprofile(c_interfaceProfile_SUT_LIS); // Preamble f_sendRequest(m_locationRequest( {encvalue_unichar(valueof(m_device({ PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_POINT] })))}, m_locationTypeType( m_locationTypeBase_locationUri, true ) ) ) template LocationResponseType mdw_location_response modifies mw_location_response := { locationUriSet := { expires := ?, locationURI_list := ? length (1 .. infinity) }, presence := omit } v_response := f_receiveResponsePreamble(mw_http_location_response(mdw_location_response)); v_subscription_target := f_initSipUrlFromCharstring(f_findLocationUri(v_response.response.body.xml_body.locationResponse.locationUriSet.locationURI_list, "sip")); LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); template SUBSCRIBE_Request request := m_SUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit ); f_SendSUBSCRIBE(request); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Manually Trigger Location Change f_checkUserInfo("Update Location Information for " & PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_POINT], 1.0); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); // Postamble LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, v_subscription_target, f_initSipUrl(c_serviceProfile_SUBSCRIBER)); f_SendSUBSCRIBE(m_UNSUBSCRIBE_Presence_Request_Event( v_subscription_target, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit ) ); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_Base(vc_callId), v_msg_recv); f_cf_01_down(); } // End of testcase TC_LIS_SIP_BV_03 } Loading
ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Templates.ttcn +36 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ module LibNg112_Templates { import from LibItsHttp_XmlMessageBodyTypes all; import from LibItsHttp_XmlTemplates all; import from urn_ietf_params_xml_ns_pidf_geopriv10 all; // LibNg112 import from LibNg112_TypesAndValues all; Loading Loading @@ -436,6 +438,40 @@ module LibNg112_Templates { timestamp_ := p_timestamp } // end of template m_tuple template(present) Presence mw_Presence_Base( template (present) Geopriv p_geopriv ) modifies mw_Presence_Dummy := { tuple_list := { { status := { geopriv := p_geopriv } } } } template(present) Presence mw_Presence_Dummy := { entity := ?, tuple_list := { { id := ?, status := { basic := *, geopriv := ?, elem_list := { * } } , elem_list := ?, contact := *, note_list := ?, timestamp_ := * } }, note_list := ?, elem_list := ? } } // End of group ng112_presence group dequeue_register { Loading