diff --git a/01-TestCase/tsg_ui/ui_proxy/A_ProxyAllowCase.robot b/01-TestCase/tsg_ui/ui_proxy/A_ProxyAllowCase.robot new file mode 100644 index 0000000..1dd46e6 --- /dev/null +++ b/01-TestCase/tsg_ui/ui_proxy/A_ProxyAllowCase.robot @@ -0,0 +1,324 @@ +*** Settings *** +Force Tags tsg-ui Policies Proxy +Library Selenium2Library +Resource ../../../02-Keyword/tsg_ui/objects/NewObjectPages.robot +Resource ../../../02-Keyword/tsg_ui/objects/NewObject.robot +Resource ../../../02-Keyword/tsg_ui/Menu.robot +Resource ../../../03-Variable/PolicyObjectDefault.txt +Resource ../../../02-Keyword/tsg_ui/policy/UIPolicy.robot + +*** Test Cases *** + +Proxy-Allow-001 + [Tags] Positive UI Proxy Allow 代理无Filter + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*google.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} + +Proxy-Allow-002 + [Tags] Positive UI Proxy Allow 源使用subid + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*facebook.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=SUBID CreateOrSearch=Create Add=Address Name=${TEST NAME}_Subid Keywordtext=${testSubscriberID} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} + +Proxy-Allow-003 + [Tags] Positive UI Proxy Allow 源使用Geography + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*twitter.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + ${Country} create list China + ${City} create list Beijing + ${Proxysip} Create Dictionary Sordtype=Source Type1=Geography CreateOrSearch=Create Add=Address Name=${TEST NAME}_Geo Country=${Country} City=${City} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} + +Proxy-Allow-004 + [Tags] Positive UI Proxy Allow filter选择host(右匹配) + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*youtube.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + ${Proxyfilter} Create list Host + ${Host} Create list ${TEST NAME}SNI + ${ProxyfilterInfo} Create Dictionary Filter=${Proxyfilter} Hostname=${Host} + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} FilterInfo=${ProxyfilterInfo} + +Proxy-Allow-005 + [Tags] Positive UI Proxy Allow filter选择host(Category) + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*bridgehunter.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + ${Proxyfilter} Create list Host + ${Host} Create list webradio + ${ProxyfilterInfo} Create Dictionary Filter=${Proxyfilter} Hostname=${Host} Hosttype=Category + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} FilterInfo=${ProxyfilterInfo} + +Proxy-Allow-006 + [Tags] Positive UI Proxy Allow filter选择URL + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*egouz.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + CreatePage URL single ${TEST NAME}URL keywordtext=$www.egouz.com/ + ${Proxyfilter} Create list URL + ${URL} Create list ${TEST NAME}URL + ${ProxyfilterInfo} Create Dictionary Filter=${Proxyfilter} URLname=${URL} + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} FilterInfo=${ProxyfilterInfo} + +Proxy-Allow-007 + [Tags] Positive UI Proxy Allow filter选择Request Header-User-Agent  + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*blackberry.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + CreatePage HTTPSignature single ${TEST NAME}RequestHeader reqrestype=req reqresheader=ua keywordtext=Mozilla/5* + ${Proxyfilter} Create list Request Header + ${User-Agent} Create list ${TEST NAME}RequestHeader + ${ProxyfilterInfo} Create Dictionary Filter=${Proxyfilter} Request Headername=${User-Agent} + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} FilterInfo=${ProxyfilterInfo} + +Proxy-Allow-008 + [Tags] Positive UI Proxy Allow filter选择Request Header-Cookie  + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*abduzeedo.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + CreatePage HTTPSignature single ${TEST NAME}RequestHeader reqrestype=req reqresheader=ck keywordtext=fsbotchecked + ${Proxyfilter} Create list Request Header + ${Cookie} Create list ${TEST NAME}RequestHeader + ${ProxyfilterInfo} Create Dictionary Filter=${Proxyfilter} Request Headername=${Cookie} + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} FilterInfo=${ProxyfilterInfo} + +Proxy-Allow-009 + [Tags] Positive UI Proxy Allow filter选择Response Header-Set-Cookie + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*regions.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + CreatePage HTTPSignature single ${TEST NAME}ResponseHeader reqrestype=res reqresheader=sck keywordtext=HttpOnly + ${Proxyfilter} Create list Response Header + ${Set-Cookie} Create list ${TEST NAME}ResponseHeader + ${ProxyfilterInfo} Create Dictionary Filter=${Proxyfilter} Response Headername=${Set-Cookie} + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} FilterInfo=${ProxyfilterInfo} + +Proxy-Allow-0010 + [Tags] Positive UI Proxy Allow filter选择Response Header-Content-Type + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*jnj.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + CreatePage HTTPSignature single ${TEST NAME}ResponseHeader reqrestype=res reqresheader=ct keywordtext=text/html;charset=UTF-8 + ${Proxyfilter} Create list Response Header + ${Content-Type} Create list ${TEST NAME}ResponseHeader + ${ProxyfilterInfo} Create Dictionary Filter=${Proxyfilter} Response Headername=${Content-Type} + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} FilterInfo=${ProxyfilterInfo} + +Proxy-Allow-0011 + [Tags] Positive UI Proxy Allow 最大组合1 + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=$www.investor.vanguard.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + CreatePage FQDN single ${TEST NAME}HOST keywordtext=$www.investor.vanguard.com + CreatePage URL single ${TEST NAME}URL keywordtext=investor.vanguard + CreatePage HTTPSignature single ${TEST NAME}RequestHeader reqrestype=req reqresheader=ua keywordtext=Mozilla/5.0 + CreatePage HTTPSignature single ${TEST NAME}ResponseHeader reqrestype=res reqresheader=sck keywordtext=Secure + ${Proxyfilter} Create list Host URL Request Header Response Header + ${URL} Create list ${TEST NAME}URL + ${Host} Create list ${TEST NAME}HOST + ${Request Header} Create list ${TEST NAME}RequestHeader + ${Response Header} Create list ${TEST NAME}ResponseHeader + ${ProxyfilterInfo} Create Dictionary Filter=${Proxyfilter} URLname=${URL} Hostname=${Host} Request Headername=${Request Header} Response Headername=${Response Header} + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} FilterInfo=${ProxyfilterInfo} + +Proxy-Allow-0012 + [Tags] Positive UI Proxy Allow 最大组合2 + Comment 创建安全策略数据 + CreatePage FQDN single ${TEST NAME}SNI keywordtext=*lifewire.com + ${SNI} Create list ${TEST NAME}SNI + ${Securityfilter} create list SNI + ${SecurityfilterInfo} Create Dictionary Filter=${Securityfilter} SSLSNIname=${SNI} + ${Securitysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME} Ipclienttext1=${testClentIP} Port=1-65535 + ${SecuritysourceAddIpList} Create List ${Securitysip} + ${SecuritysourceInfo} Create Dictionary sourceAddIpList=${SecuritysourceAddIpList} + ${SecurityInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=open + Comment 创建代理策略数据 + CreatePage FQDN single ${TEST NAME}HOST keywordtext=$www.lifewire.com + CreatePage URL single ${TEST NAME}URL keywordtext=ifewire + CreatePage HTTPSignature single ${TEST NAME}RequestHeader reqrestype=req reqresheader=ck keywordtext=sailthru_pageviews + CreatePage HTTPSignature single ${TEST NAME}ResponseHeader reqrestype=res reqresheader=ct keywordtext=charset=utf-8 + ${Proxyfilter} Create list Host URL Request Header Response Header + ${URL} Create list ${TEST NAME}URL + ${Host} Create list ${TEST NAME}HOST + ${Request Header} Create list ${TEST NAME}RequestHeader + ${Response Header} Create list ${TEST NAME}ResponseHeader + ${ProxyfilterInfo} Create Dictionary Filter=${Proxyfilter} URLname=${URL} Hostname=${Host} Request Headername=${Request Header} Response Headername=${Response Header} + ${ip_name} create list ${TEST NAME} + ${Proxysip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name} + ${ProxysourceAddIpList} Create list ${Proxysip} + ${ProxysourceInfo} Create Dictionary sourceAddIpList=${ProxysourceAddIpList} + ${ProxypolicyInfo} Create Dictionary PolicyType=Proxy Policy CreateorEdit=Create PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=open + Comment 创建安全策略 + UIPolicies ${SecurityInfo} SourceInfo=${SecuritysourceInfo} FilterInfo=${SecurityfilterInfo} + Comment 创建代理策略 + UIPolicies ${ProxypolicyInfo} SourceInfo=${ProxysourceInfo} FilterInfo=${ProxyfilterInfo} + + + \ No newline at end of file diff --git a/02-Keyword/tsg_ui/policy/UIPolicy.robot b/02-Keyword/tsg_ui/policy/UIPolicy.robot index e8bc6ee..8ea976b 100644 --- a/02-Keyword/tsg_ui/policy/UIPolicy.robot +++ b/02-Keyword/tsg_ui/policy/UIPolicy.robot @@ -273,7 +273,8 @@ CreateSources1 log ${var} ${tempValue} Get From List ${AddList} ${var} CreateSource ${tempValue} - END + END + sleep ${sleep} CreateEditDeleteDestination [Arguments] ${DestinationInfoDict} [Documentation] 策略源条件处理、包括增加:create、search,update、delete几个列表; @@ -723,7 +724,7 @@ Create-Filter-SecurityOrProxy ... ${Response Contentname} ${SSLSNIname} ${CNname} ${SANname} ${QNAMEname} ${Subjectname} ${MAILContentname} ${Attachment Namename} ... ${Attachment Contentname} ${Fromname} ${Toname} ${MAILAccountname} ${URIname} ${FTPContentname} ${FTPAccountname} ${QUICSNIname} run keyword if "${PolicyType}"=="Proxy Policy" and "${PolicyAction}" == "Redirect" Create_Proxy_RedirectFilter ${Application} ${Filter} ${Hostname} ${Hosttype} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ${Response Contentname} ${QNAMEname} ${DohHostname} - ... ELSE Create-ProxyFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ${Response Contentname} ${QNAMEname} ${DohHostname} + ... ELSE Create-ProxyFilter ${Application} ${Filter} ${Hostname} ${Hosttype} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ${Response Contentname} ${QNAMEname} ${DohHostname} Create-SecurityFilter-judge [Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${Hosttype}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null @@ -828,7 +829,7 @@ Create-SecurityFilter END Create-ProxyFilter - [Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null + [Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${Hosttype}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null ... ${Response Contentname}=null ${QNAMEname}=null ${DohHostname}=null [Documentation] 调用次关键字前需要添加必填参数: ... ${Application}:填入是Application的内容,例如SSL或HTTP @@ -842,7 +843,7 @@ Create-ProxyFilter sleep ${sleep} run keyword if "${Application}"=="HTTP" and "${i}"=="Host" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")] - ... AND Create-Object-Proxy-Search ${Hostname} ${i} + ... AND Create-Object-Proxy-Search ${Hostname} ${i} ${Hosttype} run keyword if "${Application}"=="HTTP" and "${i}"=="URL" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")] ... AND Create-Object-Proxy-Search ${URLname} ${i}