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/02-Keyword/tsg_ui/policy/Testcase-UIPolicy.robot
2021-02-20 17:08:43 +08:00

32 lines
2.8 KiB
Plaintext

*** Settings ***
Library Selenium2Library
Resource ../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 ***
Test-UIAddPolicies
#log ${TEST NAME}
${policyInfo} Create Dictionary policyType=Security Policy policyName=${TEST NAME} policyAction=deny policySubAction=drop ApplicationSearch=HTTP,SSL policyLogSession=1 policyEnabled=open operation=Create/Update
${sip1} Create Dictionary type1=Ip CreateOrSearch=Create Add=Address name=${TEST NAME}_IP1 ipclienttext1=192.168.40.11-192.168.40.110 port=1-65535
${sip2} Create Dictionary type1=Ip CreateOrSearch=Create Add=Group name=${TEST NAME}_IPGroup1 object_name=${TEST NAME}_IP1
${sgeo1} Create Dictionary type1=Geography CreateOrSearch=Search Add=Address name=${TEST NAME}_Geo1 geo=Africa country=Botswana city=Dekar
${sgeo2} Create Dictionary type1=Geography CreateOrSearch=Search Add=Group name=${TEST NAME}_GeoGroup1 object_name=${TEST NAME}_Geo1
${slearn1} Create Dictionary type1=IPLearning CreateOrSearch=Create Add=Address name=${TEST NAME}_Learn1 Protocols1=HTTP Degree=2 Degrees limits=10000 numbers=1 times=10000
${slearn2} Create Dictionary type1=IPLearning CreateOrSearch=Create Add=Address name=${TEST NAME}_Learn2 Protocols1=HTTP,SSL Degree=12 Degrees limits=10000 numbers=1 times=72
${ssub1} Create Dictionary type1=SUBID CreateOrSearch=Create Add=Address name=${TEST NAME}_Subid1 keywordtext=$test25
${ssub2} Create Dictionary type1=SUBID CreateOrSearch=Search Add=Group name=${TEST NAME}_Subid1 object_name=${TEST NAME}_Subid1
${sourceAddIpList} Create List ${sip1} ${sip2} ${slearn1} ${slearn2} ${ssub1} ${ssub2} ${sgeo1} ${sgeo2}
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList} sourceDelList=(list)obj1 obj2
${dip1} Create Dictionary type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.11 port=1
${destinationInfo} Create Dictionary destinationAddIpList=${dip1} destinationDelList=(list)obj1 obj2
${url} Create Dictionary
${urlAddList} Create List ${url}
${url2} Create Dictionary
${urlDelList} Create List ${url2}
${filterInfo} Create Dictionary ${urlAddList} ${urlDelList} (其他filed对象)......
UIAddPolicies ${policyInfo} ${sourceInfo} ${destinationInfo} ${filterInfo}