diff --git a/01-TestCase/tsg_adc/selfserver/Api_Proxy/Monitor_Http_Tests.robot b/01-TestCase/tsg_adc/selfserver/Api_Proxy/Monitor_Http_Tests.robot index 37fe5e4..4249540 100644 --- a/01-TestCase/tsg_adc/selfserver/Api_Proxy/Monitor_Http_Tests.robot +++ b/01-TestCase/tsg_adc/selfserver/Api_Proxy/Monitor_Http_Tests.robot @@ -14,7 +14,7 @@ ${objectids} ${EMPTY} *** Test Cases *** ProxyPolicy-Monitor-Http-00001 - [Tags] selfserver ip http Monitor + [Tags] selfserver ip http monitor Comment 创建目标IP ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0 ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -26,7 +26,7 @@ ProxyPolicy-Monitor-Http-00001 ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} ${policyIds} Create List ${policyId1} Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00001 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR + ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00001 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"monitor","protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} @@ -46,7 +46,7 @@ ProxyPolicy-Monitor-Http-00001 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00002 - [Tags] selfserver ip+fqdn完整匹配 http Monitor + [Tags] selfserver ip+fqdn完整匹配 http monitor Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -58,7 +58,7 @@ ProxyPolicy-Monitor-Http-00002 ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} ${policyIds} Create List ${policyId1} Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00002 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_HOST + ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00002 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"monitor","protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_HOST ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} @@ -78,7 +78,7 @@ ProxyPolicy-Monitor-Http-00002 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00003 - [Tags] selfserver ip+cat右匹配 http Monitor + [Tags] selfserver ip+cat右匹配 http monitor Comment 创建cat ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -90,7 +90,7 @@ ProxyPolicy-Monitor-Http-00003 ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} ${policyIds} Create List ${policyId1} Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00003 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_HOST + ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00003 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"monitor","protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_HOST ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} @@ -110,7 +110,7 @@ ProxyPolicy-Monitor-Http-00003 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00004 - [Tags] selfserver http Monitor ip+url右匹配 + [Tags] selfserver http monitor ip+url右匹配 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -122,7 +122,7 @@ ProxyPolicy-Monitor-Http-00004 ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} ${policyIds} Create List ${policyId1} Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00004 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL + ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00004 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"monitor","protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} @@ -142,7 +142,7 @@ ProxyPolicy-Monitor-Http-00004 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00005 - [Tags] selfserver http Monitor ip+url字串匹配 + [Tags] selfserver http monitor ip+url字串匹配 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -174,7 +174,7 @@ ProxyPolicy-Monitor-Http-00005 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00006 - [Tags] selfserver http Monitor ip+url完整匹配 + [Tags] selfserver http monitor ip+url完整匹配 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -192,10 +192,10 @@ ProxyPolicy-Monitor-Http-00006 ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} ${policyIds} Create List ${policyId1} ${policyId2} Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat - ... ELSE set variable curl http://open.node.com/test/nationalbank/nationalbank.html - ${stringlist} run keyword if '${systemType}'=='Windows' Create List switch=kazakh - ... ELSE Create List switch=kazakh + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Allow-HTTP-0001.bat + ... ELSE set variable curl \ http://open.node.com/test/tengrinews/tengrinews.html + ${stringlist} run keyword if '${systemType}'=='Windows' Create List экономике + ... ELSE Create List экономике ${starttime} Get Time Sleep ${policyVerificationSleepSeconds}s ${rescode} SystemCommands ${commandstr} ${stringlist} @@ -206,7 +206,7 @@ ProxyPolicy-Monitor-Http-00006 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00007 - [Tags] selfserver http Monitor ip+url左匹配 + [Tags] selfserver http monitor ip+url左匹配 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node* ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -238,7 +238,7 @@ ProxyPolicy-Monitor-Http-00007 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00008 - [Tags] selfserver http Monitor ip+请求头右匹配 + [Tags] selfserver http monitor ip+请求头右匹配 Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -270,7 +270,7 @@ ProxyPolicy-Monitor-Http-00008 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00009 - [Tags] selfserver http Monitor ip+请求头字串匹配 + [Tags] selfserver http monitor ip+请求头字串匹配 Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -302,7 +302,7 @@ ProxyPolicy-Monitor-Http-00009 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00010 - [Tags] selfserver http Monitor ip+请求头完整匹配 + [Tags] selfserver http monitor ip+请求头完整匹配 Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -334,7 +334,7 @@ ProxyPolicy-Monitor-Http-00010 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00011 - [Tags] selfserver http Monitor ip+请求头左匹配 + [Tags] selfserver http monitor ip+请求头左匹配 Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -366,7 +366,7 @@ ProxyPolicy-Monitor-Http-00011 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00012 - [Tags] selfserver http Monitor ip+cookie字串匹配 + [Tags] selfserver http monitor ip+cookie字串匹配 Comment 创建cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -398,7 +398,7 @@ ProxyPolicy-Monitor-Http-00012 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00013 - [Tags] selfserver http Monitor ip+应答头右匹配 + [Tags] selfserver http monitor ip+应答头右匹配 Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -430,7 +430,7 @@ ProxyPolicy-Monitor-Http-00013 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00014 - [Tags] selfserver http Monitor ip+应答头字串匹配 + [Tags] selfserver http monitor ip+应答头字串匹配 Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -462,7 +462,7 @@ ProxyPolicy-Monitor-Http-00014 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00015 - [Tags] selfserver http Monitor ip+应答头完整匹配 + [Tags] selfserver http monitor ip+应答头完整匹配 Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -494,7 +494,7 @@ ProxyPolicy-Monitor-Http-00015 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00016 - [Tags] selfserver http Monitor ip+应答头左匹配 + [Tags] selfserver http monitor ip+应答头左匹配 Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -526,7 +526,7 @@ ProxyPolicy-Monitor-Http-00016 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00017 - [Tags] selfserver http Monitor ip+set-cookie右匹配 + [Tags] selfserver http monitor ip+set-cookie右匹配 Comment 创建set-cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -558,7 +558,7 @@ ProxyPolicy-Monitor-Http-00017 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00018 - [Tags] selfserver http Monitor ip+set-cookie字串匹配 + [Tags] selfserver http monitor ip+set-cookie字串匹配 Comment 创建set-cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -590,7 +590,7 @@ ProxyPolicy-Monitor-Http-00018 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00019 - [Tags] selfserver http Monitor ip+set-cookie完整匹配 + [Tags] selfserver http monitor ip+set-cookie完整匹配 Comment 创建set-cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -622,7 +622,7 @@ ProxyPolicy-Monitor-Http-00019 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00020 - [Tags] selfserver http Monitor ip+set-cookie左匹配 + [Tags] selfserver http monitor ip+set-cookie左匹配 Comment 创建set-cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -654,7 +654,7 @@ ProxyPolicy-Monitor-Http-00020 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00021 - [Tags] selfserver http Monitor ip+请求体字串匹配 + [Tags] selfserver http monitor ip+请求体字串匹配 Comment 创建请求体 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -686,7 +686,7 @@ ProxyPolicy-Monitor-Http-00021 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00022 - [Tags] selfserver http Monitor ip+应答体字串匹配 + [Tags] selfserver http monitor ip+应答体字串匹配 Comment 创建应答体 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response Body ${rescode} ${objectId} AddObject2 ${1} ${objectDict} @@ -718,7 +718,7 @@ ProxyPolicy-Monitor-Http-00022 GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com ProxyPolicy-Monitor-Http-00023 - [Tags] selfserver 最大组合 http Monitor + [Tags] selfserver 最大组合 http monitor Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}