获取本机ip存在问题先使用设置;用例核查日志用错策略id调整,策略验证内容不存在,调整为一定存在内容
This commit is contained in:
@@ -8,7 +8,6 @@ Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
|||||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${policyIds} ${EMPTY}
|
${policyIds} ${EMPTY}
|
||||||
${objectids} ${EMPTY}
|
${objectids} ${EMPTY}
|
||||||
@@ -49,7 +48,6 @@ ProxyPolicy-Allow-Http-00001
|
|||||||
log ${addPolicyStr}
|
log ${addPolicyStr}
|
||||||
${rescode} ${policyId2} AddPolicy ${addPolicyStr}
|
${rescode} ${policyId2} AddPolicy ${addPolicyStr}
|
||||||
log ${policyId2}
|
log ${policyId2}
|
||||||
${policyId2log} set variable ${policyId2}
|
|
||||||
${policyIds2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId2}]}
|
${policyIds2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId2}]}
|
||||||
${policyIds} Create List ${policyId1} ${policyIds2}
|
${policyIds} Create List ${policyId1} ${policyIds2}
|
||||||
#创建管控策略
|
#创建管控策略
|
||||||
@@ -63,11 +61,11 @@ ProxyPolicy-Allow-Http-00001
|
|||||||
#功能端验证
|
#功能端验证
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
Sleep ${policyVerificationSleepSeconds}s
|
||||||
${commandreturn} OperatingSystem.Run curl -I \ -m \ 10 \ -o \ /dev/null \ -s \ -w \ \ \%{http_code} \ \ http://www.icbc.com.cn
|
${commandreturn} OperatingSystem.Run curl -I \ -m \ 10 \ -o \ /dev/null \ -s \ -w \ \ \%{http_code} \ \ http://www.icbc.com.cn
|
||||||
should contain ${commandreturn} 200
|
should contain ${commandreturn} 000
|
||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
Sleep ${policyLogVerificationSleepSeconds}s
|
||||||
${endtime} Get Time
|
${endtime} Get Time
|
||||||
#日志验证
|
#日志验证
|
||||||
${s} Convert to String ${policyId2log}
|
${s} Convert to String ${policyId3}
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host icbc
|
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host icbc
|
||||||
|
|
||||||
ProxyPolicy-allow-http-00002
|
ProxyPolicy-allow-http-00002
|
||||||
@@ -116,7 +114,7 @@ ProxyPolicy-allow-http-00002
|
|||||||
${policyIds} Create List ${policyId1} ${policyId5}
|
${policyIds} Create List ${policyId1} ${policyId5}
|
||||||
#功能端验证
|
#功能端验证
|
||||||
${commandstr} set variable ${curlbatpath}/ProxyPolicy_hijack_http00002.bat
|
${commandstr} set variable ${curlbatpath}/ProxyPolicy_hijack_http00002.bat
|
||||||
${stringlist} Create List 今日关注
|
${stringlist} Create List 美国中文网
|
||||||
${starttime} Get Time
|
${starttime} Get Time
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
Sleep ${policyVerificationSleepSeconds}s
|
||||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||||
@@ -178,7 +176,6 @@ ProxyPolicy-allow-http-00003
|
|||||||
${s} Convert to String ${policyId3}
|
${s} Convert to String ${policyId3}
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host xiaozhu.com
|
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host xiaozhu.com
|
||||||
|
|
||||||
|
|
||||||
ProxyPolicy-allow-http-00005
|
ProxyPolicy-allow-http-00005
|
||||||
[Tags] allow http fqdn+url
|
[Tags] allow http fqdn+url
|
||||||
#创建fqdn
|
#创建fqdn
|
||||||
@@ -268,7 +265,7 @@ roxyPolicy-allow-http-00008
|
|||||||
${policyIds} Create List ${policyId1} ${policyId5}
|
${policyIds} Create List ${policyId1} ${policyId5}
|
||||||
#功能端验证
|
#功能端验证
|
||||||
${commandstr} set variable ${curlbatpath}/ProxyPolicy_allow_ssl00008
|
${commandstr} set variable ${curlbatpath}/ProxyPolicy_allow_ssl00008
|
||||||
${stringlist} Create List 今日关注
|
${stringlist} Create List 美国中文网
|
||||||
${starttime} Get Time
|
${starttime} Get Time
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
Sleep ${policyVerificationSleepSeconds}s
|
||||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||||
@@ -292,7 +289,6 @@ ProxyPolicy-Allow-Http-00009
|
|||||||
log ${object_URL_Id}
|
log ${object_URL_Id}
|
||||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_URL_Id}
|
${objectids} Catenate SEPARATOR=, ${objectids} ${object_URL_Id}
|
||||||
#${objectids} set Variable ${object_FQDN_Id},${object_URL_Id}
|
#${objectids} set Variable ${object_FQDN_Id},${object_URL_Id}
|
||||||
|
|
||||||
#${objectids} set Variable ${object_FQDN_Id},${object_URL_Id},${object_UA_Id}
|
#${objectids} set Variable ${object_FQDN_Id},${object_URL_Id},${object_UA_Id}
|
||||||
#${objectids} set Variable ${object_FQDN_Id},${object_URL_Id},${object_UA_Id},${object_SC_Id}
|
#${objectids} set Variable ${object_FQDN_Id},${object_URL_Id},${object_UA_Id},${object_SC_Id}
|
||||||
Comment 创建 拦截策略
|
Comment 创建 拦截策略
|
||||||
@@ -306,7 +302,6 @@ ProxyPolicy-Allow-Http-00009
|
|||||||
log ${addPolicyStr}
|
log ${addPolicyStr}
|
||||||
${rescode} ${policyId2} AddPolicy ${addPolicyStr}
|
${rescode} ${policyId2} AddPolicy ${addPolicyStr}
|
||||||
log ${policyId2}
|
log ${policyId2}
|
||||||
${policyId2log} set variable ${policyId2}
|
|
||||||
${policyIds2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId2}]}
|
${policyIds2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId2}]}
|
||||||
${policyIds} Create List ${policyId1} ${policyIds2}
|
${policyIds} Create List ${policyId1} ${policyIds2}
|
||||||
Comment 创建管控策略
|
Comment 创建管控策略
|
||||||
@@ -324,5 +319,5 @@ ProxyPolicy-Allow-Http-00009
|
|||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
Sleep ${policyLogVerificationSleepSeconds}s
|
||||||
${endtime} Get Time
|
${endtime} Get Time
|
||||||
#日志验证
|
#日志验证
|
||||||
${s} Convert to String ${policyId2log}
|
${s} Convert to String ${policyId3}
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
Resource ../../03-Variable/BifangApiVariable.txt
|
Resource ../../03-Variable/BifangApiVariable.txt
|
||||||
Library REST http://${host}:${port}
|
Library REST http://${host}:${port}
|
||||||
Library Collections
|
Library Collections
|
||||||
Library ExtensionLibrary
|
|
||||||
Resource ../tsg_bfapi/LoginLogout.robot
|
Resource ../tsg_bfapi/LoginLogout.robot
|
||||||
Resource ../tsg_ui/Logout/Logout.robot
|
Resource ../tsg_ui/Logout/Logout.robot
|
||||||
Resource ../tsg_ui/Login/Login.robot
|
Resource ../tsg_ui/Login/Login.robot
|
||||||
@@ -10,9 +9,8 @@ Resource ../tsg_ui/Login/Login.robot
|
|||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
LoginAndAddLocalIP
|
LoginAndAddLocalIP
|
||||||
# 获取主机IP
|
# 获取主机IP
|
||||||
${ip} Get Host IP
|
#${ip} Get Host IP
|
||||||
Set Global Variable ${testClentIP} ${ip}
|
#Set Global Variable ${testClentIP} ${ip}
|
||||||
|
|
||||||
Run Keyword If '${loginType}' == 'api' ApiLoginAndAddLocalIP aa
|
Run Keyword If '${loginType}' == 'api' ApiLoginAndAddLocalIP aa
|
||||||
... ELSE IF '${loginType}' == 'cli' CliLogin
|
... ELSE IF '${loginType}' == 'cli' CliLogin
|
||||||
... ELSE UiLoginAndAaddLocalIP bb
|
... ELSE UiLoginAndAaddLocalIP bb
|
||||||
|
|||||||
Reference in New Issue
Block a user