Loading ttcn/AtsLIS/AtsLIS_TestCases.ttcn +123 −0 Original line number Diff line number Diff line Loading @@ -600,6 +600,68 @@ module AtsLIS_TestCases { } // End of Group Errors group Subscriptions { function f_TC_LIS_SIP_BV_01() runs on ImsComponent { var CSeq v_cSeq_s := { fieldName := CSEQ_E, seqNumber := 5, method := "SUBSCRIBE" }; // Test component configuration f_init_userprofile(c_userProfile_UE1atSUThome); f_initSipUrl(c_userProfile_UE1atSUThome); f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_BCF); LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, f_initSipUrl(c_userProfile_UE1atSUThome), f_initSipUrl(c_serviceProfile_EMERGENCY)); // Preamble template SUBSCRIBE_Request request := m_SUBSCRIBE_Request_Event( vc_requestUri, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit, m_Event_presence ); log("gg-request:"); log(request); f_SendSUBSCRIBE(request); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); // Postamble f_clientSyncAndVerdictPostamble(c_poDone, e_success); } /** * @desc "IUT responds to a SIP Subscribe for presence event package with an 200 OK" */ testcase TC_LIS_SIP_BV_01() runs on HttpImsComponent system TestAdapter { // Local variables var ImsComponent v_subscriber; // Test control f_check_pics({ values := {PICS_LIS_SIP_SUBSCRIPTION}, names := {"PICS_LIS_SIP_SUBSCRIPTION"}}); // Test component configuration f_cf_01_sip_up(v_subscriber); // Preamble v_subscriber.start(f_TC_LIS_SIP_BV_01()); // Test Body f_serverSyncNClientsAndStop(1, {c_prDone, c_tbDone, c_poDone}); // Postamble f_cf_01_sip_down(v_subscriber); } // End of testcase TC_LIS_HELD_BI_02 } group AdvancedMobileLocation { /** Loading Loading @@ -638,6 +700,67 @@ module AtsLIS_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_LIS_HELD_BI_01 /** * @desc "IUT successfully responds with a Circle for provided AML Data " */ testcase TC_LIS_AML_BV_02() runs on HttpComponent system TestAdapter { // Test control f_check_pics({ values := {PICS_LIS_AML_HTTP, PICS_LIS_HELD_BY_VALUE, PICS_LIS_GEOMETRY_CIRCLE }, names := {"PICS_LIS_AML_HTTP", "PICS_LIS_HELD_BY_VALUE", "PICS_LIS_GEOMETRY_CIRCLE"}}); // Test component configuration f_cf_01_http_up(); // Preamble var charstring v_device_number := "&device_number=" & PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_CIRCLE]; var charstring v_location_latitude := "&location_latitude=" & float2str(PX_CIRCLE_POS[0]); var charstring v_location_longitude := "&location_longitude=" & float2str(PX_CIRCLE_POS[1]); var charstring url_params := "&v=3" & v_device_number & v_location_latitude & v_location_longitude & "&location_time=1476189444435&location_accuracy=10.4&location_source=GPS&location_certainty=83&device_imei=354773072099116&device_imsi=234159176307582&cell_network_mcc=234&cell_network_mnc=15" f_sendAdvancedMobileLocation(url_params); f_receiveResponse(mw_http_response( { version_major := 1, version_minor := 1, statuscode := 200, statustext := ?, header := ?, body := omit, tls := *, mutual_tls := * } )); f_sendRequest(m_locationRequest({encvalue_unichar(valueof(m_device({ PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_CIRCLE] })))})) f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; template Circle mw_expected_circle := mw_circle(mw_center_group_pos_1((PX_CIRCLE_POS[0] - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_POS[0] + PX_DOUBLE_CMP_EPSILON), (PX_CIRCLE_POS[1] - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_POS[1] + PX_DOUBLE_CMP_EPSILON)), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME); template LocationResponseType mdw_location_response modifies mw_location_response := { locationUriSet := omit, presence := { tuple_list := { { status := { geopriv := mw_geopriv({ circle := mw_expected_circle}) } } } } } f_receiveResponse(mw_http_location_response(mdw_location_response)); // Postamble f_cf_01_http_down(); } // End of testcase TC_LIS_AML_BV_02 } Loading ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Functions.ttcn +22 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,16 @@ module LibNg112_Functions { } // End of function f_cf_01_http_up function f_cf_01_sip_up( out ImsComponent p_subscriber ) runs on HttpImsComponent { p_subscriber := ImsComponent.create("Subscriber") alive; // Connect connect(p_subscriber:syncPort, self:syncPort); map(p_subscriber:SIPP, system:SIPP); } // End of function f_cf_01__sip_up function f_cf_02_up( out ImsComponent p_caller, out ImsComponent p_call_taker Loading Loading @@ -101,6 +111,18 @@ module LibNg112_Functions { deactivate; } // End of function f_cf_01_http_down function f_cf_01_sip_down( inout ImsComponent p_subscriber ) runs on HttpImsComponent { disconnect(p_subscriber:syncPort, self:syncPort); unmap(p_subscriber:SIPP, system:SIPP); p_subscriber.done; deactivate; } // End of function f_cf_02_down function f_cf_02_down( inout ImsComponent p_caller, inout ImsComponent p_call_taker Loading Loading
ttcn/AtsLIS/AtsLIS_TestCases.ttcn +123 −0 Original line number Diff line number Diff line Loading @@ -600,6 +600,68 @@ module AtsLIS_TestCases { } // End of Group Errors group Subscriptions { function f_TC_LIS_SIP_BV_01() runs on ImsComponent { var CSeq v_cSeq_s := { fieldName := CSEQ_E, seqNumber := 5, method := "SUBSCRIBE" }; // Test component configuration f_init_userprofile(c_userProfile_UE1atSUThome); f_initSipUrl(c_userProfile_UE1atSUThome); f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_BCF); LibIms_Steps.f_setHeadersSUBSCRIBE(v_cSeq_s, f_initSipUrl(c_userProfile_UE1atSUThome), f_initSipUrl(c_serviceProfile_EMERGENCY)); // Preamble template SUBSCRIBE_Request request := m_SUBSCRIBE_Request_Event( vc_requestUri, vc_callId ,v_cSeq_s, vc_from, vc_to, vc_via, omit, m_Event_presence ); log("gg-request:"); log(request); f_SendSUBSCRIBE(request); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); // Postamble f_clientSyncAndVerdictPostamble(c_poDone, e_success); } /** * @desc "IUT responds to a SIP Subscribe for presence event package with an 200 OK" */ testcase TC_LIS_SIP_BV_01() runs on HttpImsComponent system TestAdapter { // Local variables var ImsComponent v_subscriber; // Test control f_check_pics({ values := {PICS_LIS_SIP_SUBSCRIPTION}, names := {"PICS_LIS_SIP_SUBSCRIPTION"}}); // Test component configuration f_cf_01_sip_up(v_subscriber); // Preamble v_subscriber.start(f_TC_LIS_SIP_BV_01()); // Test Body f_serverSyncNClientsAndStop(1, {c_prDone, c_tbDone, c_poDone}); // Postamble f_cf_01_sip_down(v_subscriber); } // End of testcase TC_LIS_HELD_BI_02 } group AdvancedMobileLocation { /** Loading Loading @@ -638,6 +700,67 @@ module AtsLIS_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_LIS_HELD_BI_01 /** * @desc "IUT successfully responds with a Circle for provided AML Data " */ testcase TC_LIS_AML_BV_02() runs on HttpComponent system TestAdapter { // Test control f_check_pics({ values := {PICS_LIS_AML_HTTP, PICS_LIS_HELD_BY_VALUE, PICS_LIS_GEOMETRY_CIRCLE }, names := {"PICS_LIS_AML_HTTP", "PICS_LIS_HELD_BY_VALUE", "PICS_LIS_GEOMETRY_CIRCLE"}}); // Test component configuration f_cf_01_http_up(); // Preamble var charstring v_device_number := "&device_number=" & PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_CIRCLE]; var charstring v_location_latitude := "&location_latitude=" & float2str(PX_CIRCLE_POS[0]); var charstring v_location_longitude := "&location_longitude=" & float2str(PX_CIRCLE_POS[1]); var charstring url_params := "&v=3" & v_device_number & v_location_latitude & v_location_longitude & "&location_time=1476189444435&location_accuracy=10.4&location_source=GPS&location_certainty=83&device_imei=354773072099116&device_imsi=234159176307582&cell_network_mcc=234&cell_network_mnc=15" f_sendAdvancedMobileLocation(url_params); f_receiveResponse(mw_http_response( { version_major := 1, version_minor := 1, statuscode := 200, statustext := ?, header := ?, body := omit, tls := *, mutual_tls := * } )); f_sendRequest(m_locationRequest({encvalue_unichar(valueof(m_device({ PX_DEVICE_NUMBER[PX_DEVICE_NUMBER_CIRCLE] })))})) f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; template Circle mw_expected_circle := mw_circle(mw_center_group_pos_1((PX_CIRCLE_POS[0] - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_POS[0] + PX_DOUBLE_CMP_EPSILON), (PX_CIRCLE_POS[1] - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_POS[1] + PX_DOUBLE_CMP_EPSILON)), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME); template LocationResponseType mdw_location_response modifies mw_location_response := { locationUriSet := omit, presence := { tuple_list := { { status := { geopriv := mw_geopriv({ circle := mw_expected_circle}) } } } } } f_receiveResponse(mw_http_location_response(mdw_location_response)); // Postamble f_cf_01_http_down(); } // End of testcase TC_LIS_AML_BV_02 } Loading
ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Functions.ttcn +22 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,16 @@ module LibNg112_Functions { } // End of function f_cf_01_http_up function f_cf_01_sip_up( out ImsComponent p_subscriber ) runs on HttpImsComponent { p_subscriber := ImsComponent.create("Subscriber") alive; // Connect connect(p_subscriber:syncPort, self:syncPort); map(p_subscriber:SIPP, system:SIPP); } // End of function f_cf_01__sip_up function f_cf_02_up( out ImsComponent p_caller, out ImsComponent p_call_taker Loading Loading @@ -101,6 +111,18 @@ module LibNg112_Functions { deactivate; } // End of function f_cf_01_http_down function f_cf_01_sip_down( inout ImsComponent p_subscriber ) runs on HttpImsComponent { disconnect(p_subscriber:syncPort, self:syncPort); unmap(p_subscriber:SIPP, system:SIPP); p_subscriber.done; deactivate; } // End of function f_cf_02_down function f_cf_02_down( inout ImsComponent p_caller, inout ImsComponent p_call_taker Loading