diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot new file mode 100644 index 0000000..bec0781 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot @@ -0,0 +1,195 @@ +*** Settings *** +Force Tags tsg_adc_wp security_policy adc_verify +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_adc/FileOperation.robot + +*** Test Cases *** +SecurityPolicy-Deny-Http-00001 + [Tags] fqdn + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00001.bat + ... ELSE set variable curl http://webalta.ru/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset + ... ELSE Create List Connection reset by peer + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime ${starttime} deny_http_endtime ${endtime} + +SecurityPolicy-Deny-Http-00002 + [Tags] cat + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00002.bat + ... ELSE set variable curl http://www.nymbler.com/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset + ... ELSE Create List Connection reset by peer + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime1 ${starttime} deny_http_endtime1 ${endtime} + +SecurityPolicy-Deny-Http-00003 + [Tags] url + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00003.bat + ... ELSE set variable curl http://www.icbc.com.cn/icbc/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime2 ${starttime} deny_http_endtime2 ${endtime} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00003_1.bat + ... ELSE set variable curl http://www.ccb.com/cn/home/indexv3.html + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime3 ${starttime} deny_http_endtime3 ${endtime} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00003_2.bat + ... ELSE set variable curl http://www.gotohoroscope.com/daily-horoscope.html + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime4 ${starttime} deny_http_endtime4 ${endtime} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00003_3.bat + ... ELSE set variable curl http://government.ru/news/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime5 ${starttime} deny_http_endtime5 ${endtime} + +SecurityPolicy-Deny-Http-00004 + [Tags] 请求头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00004.bat + ... ELSE set variable curl http://www.tsutmb.ru/sveden + ${stringlist} run keyword if '${systemType}'=='Windows' Create List yyyyy + ... ELSE Create List yyyyy + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime6 ${starttime} deny_http_endtime6 ${endtime} + +SecurityPolicy-Deny-Http-00005 + [Tags] 请求头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00005.bat + ... ELSE set variable curl http://www.abchina.com/cn/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset + ... ELSE Create List Connection reset by peer + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime7 ${starttime} deny_http_endtime7 ${endtime} + +SecurityPolicy-Deny-Http-00006 + [Tags] 请求头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00006.bat + ... ELSE set variable curl http://egypt.travel/ru + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 网站被阻断 + ... ELSE Create List 网站被阻断 + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime8 ${starttime} deny_http_endtime8 ${endtime} + +SecurityPolicy-Deny-Http-00007 + [Tags] 请求头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00007.bat + ... ELSE set variable curl http://www.destination360.com/travel/destinations + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 + ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime9 ${starttime} deny_http_endtime9 ${endtime} + +SecurityPolicy-Deny-Http-00008 + [Tags] 应答头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00001.bat + ... ELSE set variable curl http://www.cmbchina.com/CmbQuesInfo/index.aspx + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset + ... ELSE Create List Connection reset by peer + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime10 ${starttime} deny_http_endtime10 ${endtime} + +SecurityPolicy-Deny-Http-00009 + [Tags] 应答头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00001.bat + ... ELSE set variable curl http://www.bankcomm.com/BankCommSite/default.shtml + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset + ... ELSE Create List Connection reset by peer + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime11 ${starttime} deny_http_endtime11 ${endtime} + +SecurityPolicy-Deny-Http-00010 + [Tags] 应答头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00001.bat + ... ELSE set variable curl http://www.thg.ru/technews/hot_news.html + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset + ... ELSE Create List Connection reset by peer + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime12 ${starttime} deny_http_endtime12 ${endtime} + +SecurityPolicy-Deny-Http-00011 + [Tags] 应答头 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00001.bat + ... ELSE set variable curl http://www.hitlistapp.com/about/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset + ... ELSE Create List Connection reset by peer + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommands ${commandstr} ${stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + insert_time_to_file1 deny_http_starttime13 ${starttime} deny_http_endtime13 ${endtime}