Loading ttcn/AtsLIS/AtsLIS_Functions.ttcn +18 −3 Original line number Diff line number Diff line Loading @@ -60,9 +60,24 @@ module AtsLIS_Functions { ); } function f_dereference(charstring v_params, template (omit) LocationRequest p_request) runs on HttpComponent { function f_sendAdvancedMobileLocation(charstring p_params) 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_content_type, c_header_accept, c_header_authorization }, v_headers); f_set_headers_list({ c_header_content_type }, { "application/x-www-form-urlencoded" }, v_headers); if (c_debug) { f_set_headers_list({ "X-TestcaseName"},{ testcasename()},v_headers); } httpPort.send(m_http_request(m_http_request_post(PICS_LIS_AML_URI & "?" & p_params, v_headers))); } function f_dereference(charstring v_params, template (omit) LocationRequest p_request) runs on HttpComponent { // Local variables var Headers v_headers; Loading ttcn/AtsLIS/AtsLIS_Pics.ttcn +15 −0 Original line number Diff line number Diff line Loading @@ -33,14 +33,29 @@ module AtsLIS_Pics { */ modulepar boolean PICS_LIS_CIVIC := true; /** * @desc Does the IUT support SIP Subscriptions? */ modulepar boolean PICS_LIS_SIP_SUBSCRIPTION := true; /** * @desc Does the IUT support AML via HTTP? */ modulepar boolean PICS_LIS_AML_HTTP := true /** * @desc HTTP post URI for LIS protocol */ modulepar charstring PICS_LIS_URI := "/"; /** * @desc HTTP post URI for AML */ modulepar charstring PICS_LIS_AML_URI := "/aml"; /** * @desc Does the IUT support HELD protocol? */ Loading ttcn/AtsLIS/AtsLIS_TestCases.ttcn +48 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,13 @@ module AtsLIS_TestCases { import from LibItsHttp_XmlTemplates all; import from LibItsHttp_TestSystem all; // LibSip import from LibSip_SIPTypesAndValues all; import from LibSip_SDPTypes all; import from LibSip_Steps all; import from LibSip_Templates all; import from LibSip_Interface all; // LibIms import from LibIms_SIPTypesAndValues all; import from LibIms_Steps all; Loading Loading @@ -591,6 +598,47 @@ module AtsLIS_TestCases { f_cf_01_http_down(); } // End of testcase TC_LIS_HELD_BI_02 } // End of Group Errors group AdvancedMobileLocation { /** * @desc "IUT responds with an 200 OK response when it receives a AML via HTTP" */ testcase TC_LIS_AML_BV_01() runs on HttpComponent system TestAdapter { // Test control f_check_pics({ values := {PICS_LIS_AML_HTTP}, names := {"PICS_LIS_AML_HTTP"}}); // Test component configuration f_cf_01_http_up(); // Preamble var charstring url_params := "&v=3&device_number=%2B447477593102&location_latitude=55.85732&location_longitude=-4.26325&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_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; f_receiveResponse(mw_http_response( { version_major := 1, version_minor := 1, statuscode := 200, statustext := ?, header := ?, body := omit, tls := *, mutual_tls := * } )); // Postamble f_cf_01_http_down(); } // End of testcase TC_LIS_HELD_BI_01 } } // End of module AtsLIS_TestCases Loading
ttcn/AtsLIS/AtsLIS_Functions.ttcn +18 −3 Original line number Diff line number Diff line Loading @@ -60,9 +60,24 @@ module AtsLIS_Functions { ); } function f_dereference(charstring v_params, template (omit) LocationRequest p_request) runs on HttpComponent { function f_sendAdvancedMobileLocation(charstring p_params) 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_content_type, c_header_accept, c_header_authorization }, v_headers); f_set_headers_list({ c_header_content_type }, { "application/x-www-form-urlencoded" }, v_headers); if (c_debug) { f_set_headers_list({ "X-TestcaseName"},{ testcasename()},v_headers); } httpPort.send(m_http_request(m_http_request_post(PICS_LIS_AML_URI & "?" & p_params, v_headers))); } function f_dereference(charstring v_params, template (omit) LocationRequest p_request) runs on HttpComponent { // Local variables var Headers v_headers; Loading
ttcn/AtsLIS/AtsLIS_Pics.ttcn +15 −0 Original line number Diff line number Diff line Loading @@ -33,14 +33,29 @@ module AtsLIS_Pics { */ modulepar boolean PICS_LIS_CIVIC := true; /** * @desc Does the IUT support SIP Subscriptions? */ modulepar boolean PICS_LIS_SIP_SUBSCRIPTION := true; /** * @desc Does the IUT support AML via HTTP? */ modulepar boolean PICS_LIS_AML_HTTP := true /** * @desc HTTP post URI for LIS protocol */ modulepar charstring PICS_LIS_URI := "/"; /** * @desc HTTP post URI for AML */ modulepar charstring PICS_LIS_AML_URI := "/aml"; /** * @desc Does the IUT support HELD protocol? */ Loading
ttcn/AtsLIS/AtsLIS_TestCases.ttcn +48 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,13 @@ module AtsLIS_TestCases { import from LibItsHttp_XmlTemplates all; import from LibItsHttp_TestSystem all; // LibSip import from LibSip_SIPTypesAndValues all; import from LibSip_SDPTypes all; import from LibSip_Steps all; import from LibSip_Templates all; import from LibSip_Interface all; // LibIms import from LibIms_SIPTypesAndValues all; import from LibIms_Steps all; Loading Loading @@ -591,6 +598,47 @@ module AtsLIS_TestCases { f_cf_01_http_down(); } // End of testcase TC_LIS_HELD_BI_02 } // End of Group Errors group AdvancedMobileLocation { /** * @desc "IUT responds with an 200 OK response when it receives a AML via HTTP" */ testcase TC_LIS_AML_BV_01() runs on HttpComponent system TestAdapter { // Test control f_check_pics({ values := {PICS_LIS_AML_HTTP}, names := {"PICS_LIS_AML_HTTP"}}); // Test component configuration f_cf_01_http_up(); // Preamble var charstring url_params := "&v=3&device_number=%2B447477593102&location_latitude=55.85732&location_longitude=-4.26325&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_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; f_receiveResponse(mw_http_response( { version_major := 1, version_minor := 1, statuscode := 200, statustext := ?, header := ?, body := omit, tls := *, mutual_tls := * } )); // Postamble f_cf_01_http_down(); } // End of testcase TC_LIS_HELD_BI_01 } } // End of module AtsLIS_TestCases