This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dongxiaoyan-tsg-autotest/01-TestCase/tsg_ui/ui_security/Ui_InterceptHttpCase.robot

175 lines
7.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

*** Settings ***
Force Tags tsg-ui Policies Security
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 ***
################################################################################################################################
SecurityInterceptHTTP001
[Tags] Intercept Http FQDN
#新建对象fqdn
Comment 新建对象fqdn
CreatePage FQDN single ${TEST NAME}${tag}_FQDN keywordtext=$poplar.ru
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
${sourceAddIpList} Create List ${sip1}
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
${hostname} create list ${TEST NAME}${tag}_FQDN
${filter} create list Host
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Intercept ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
PoliciesDelete
SecurityInterceptHTTP002
[Tags] Intercept Http FQDN
#新建对象fqdn
Comment 新建对象fqdn
CreatePage FQDN single ${TEST NAME}${tag}_FQDN keywordtext=*environment.com
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
${sourceAddIpList} Create List ${sip1}
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
${hostname} create list ${TEST NAME}${tag}_FQDN
${filter} create list Host
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Intercept ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
PoliciesDelete
SecurityInterceptHTTP003
[Tags] Intercept Http FQDN
#新建对象fqdn
Comment 新建对象fqdn
CreatePage FQDN single ${TEST NAME}${tag}_FQDN1 keywordtext=$mil.qianlong.com
#新建对象fqdn
Comment 新建对象fqdn
CreatePage FQDN single ${TEST NAME}${tag}_FQDN2 keywordtext=*.com
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
${sourceAddIpList} Create List ${sip1}
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
${hostname} create list ${TEST NAME}${tag}_FQDN1 ${TEST NAME}${tag}_FQDN2
${filter} create list Host
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Intercept ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
PoliciesDelete
SecurityInterceptHTTP004
[Tags] Intercept Http FQDN
#新建对象fqdn
Comment 新建对象fqdn
CreatePage FQDN single ${TEST NAME}${tag}_FQDN1 keywordtext=$mil.qianlong.com
#新建对象fqdn
Comment 新建对象fqdn
CreatePage FQDN single ${TEST NAME}${tag}_FQDN2 keywordtext=*.com
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
${sourceAddIpList} Create List ${sip1}
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
${hostname} create list ${TEST NAME}${tag}_FQDN1 ${TEST NAME}${tag}_FQDN2
${filter} create list Host
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Intercept ApplicationSearch=HTTP PolicyLogSession=close PolicyEnabled=1
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
PoliciesDelete
SecurityInterceptHTTP006
[Tags] Intercept Http Category
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
${sourceAddIpList} Create List ${sip1}
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
${hostname} create list recreation
${filter} create list Host
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname} Hosttype=Category
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Intercept ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
PoliciesDelete
#007和008自动化创建不了需要手工测试
SecurityInterceptHTTP009
[Tags] Intercept Http FQDN
#新建对象fqdn
Comment 新建对象fqdn
CreatePage FQDN single ${TEST NAME}${tag}_FQDN keywordtext=$poplar.ru
${hostname} create list ${TEST NAME}${tag}_FQDN
${filter} create list Host
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Intercept ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
UIPolicies ${policyInfo} FilterInfo=${filterInfo}
PoliciesDelete
SecurityInterceptHTTP010
[Tags] Intercept Http Category
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=163.171.198.89 Port=1-65535
${destinationAddIpList} Create List ${dip1}
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Intercept ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
UIPolicies ${policyInfo} DestinationInfo=${destinationInfo}
PoliciesDelete
################################################################################################################################