summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author董晓燕 <[email protected]>2020-02-16 21:27:56 +0800
committer董晓燕 <[email protected]>2020-02-16 21:27:56 +0800
commit476a262d038a8a2227a564aadfa39e86ed0a8609 (patch)
tree2cd5b034d58c0dde573bbff44efa7b3dc003c16d
parent9d062936512dbf40fe3d7954a7f32a4d8d01429c (diff)
Upload New File
-rw-r--r--AautotestTsg/01-TestCase/tsg_adc/AllFlow.robot49
1 files changed, 49 insertions, 0 deletions
diff --git a/AautotestTsg/01-TestCase/tsg_adc/AllFlow.robot b/AautotestTsg/01-TestCase/tsg_adc/AllFlow.robot
new file mode 100644
index 0000000..5ddf664
--- /dev/null
+++ b/AautotestTsg/01-TestCase/tsg_adc/AllFlow.robot
@@ -0,0 +1,49 @@
+*** Settings ***
+Test Setup Login
+Test Teardown Logout
+Resource ../../02-Keyword/tsg-adc/systemcommand.txt
+Resource ../../02-Keyword/tsg-bifang/policyobject.txt
+Resource ../../02-Keyword/tsg-bifang/loginlogout.txt
+
+*** Test Cases ***
+allflow
+ #登录 放到setup
+ #Login
+ #创建对象
+ ${rescode} ${objectId} AddObject { \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "objectList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "objectType":"IP", \ \ \ \ \ \ \ \ \ \ \ \ "objectName":"dxytestip", \ \ \ \ \ \ \ \ \ \ \ \ "objectDesc":"dxytestip", \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0, \ \ \ \ \ \ \ \ \ \ \ \ "isExclusion":0, \ \ \ \ \ \ \ \ \ \ \ \ "subObjectIds":[], \ \ \ \ \ \ \ \ \ \ \ \ "addItemList":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemName":"dxytestip", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemDesc":"dxytestip", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "addrType":4, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "clientIpFormat":"mask", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "clientIp1":"111.111.111.111", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "clientIp2":"255.255.255.255", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "clientPortFormat":"mask", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "clientPort1":"0", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "clientPort2":"65535", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "serverIpFormat":"range", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "serverIp1":"222.222.222.222", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "serverIp2":"255.255.255.0", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "serverPortFormat":"mask", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "serverPort1":"0", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "serverPort2":"65535", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":0, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "direction":1, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "updateItemList":[ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "deleteItemIds":[ \ \ \ \ \ \ \ \ \ \ \ \ ] \ \ \ \ \ \ \ \ } \ \ \ \ ] }
+ log ${rescode}
+ #log 1111
+ #Integer ${rescode} 200
+ #Should Be Equal As Strings ${rescode} 200
+ #log 22222
+ log ${objectId}
+ #log 333333
+ #${objid} Get From List ${objectId} 0
+ #创建策略
+ ${rescode} ${policyId} AddPolicy {"opAction":"add","returnData":1,"policyList":{"action":"allow","appObjectIdArray":[1600,1596,1597,1598,1599],"doLog":1,"isValid":0,"opTime":"2020-02-12 10:01:43","opUser":981,"opUserName":"uitest","policyDesc":"dxytest","policyName":"dxytest","policyType":"tsg_security","referenceObject":[{"objectId": ${objectId},"protocolFields":[]}],"scheduleId":[],"userTags":"","groupNum":null,"effectiveRange":null}}
+ log ${rescode}
+ log ${policyId}
+ #Integer ${rescode} 200
+ #功能端验证
+ ${commandstr} set variable nslookup -d www.jd.com
+ @{stringlist} set variable www.jd.com, type = AAAA, class = IN www.jd.com.gslb.qianxun.com ttl =
+ ${starttime} Get Time
+ ${rescode} SystemCommand ${commandstr} @{stringlist}
+ ${endtime} Get Time
+ log ${rescode}
+ #Integer ${rescode} 200
+ #日志验证
+ #${rescode} SecurityEventLogs ${starttime} ${endtime} ${policyid} ${clientip} ${key} ${value}
+ #Integer ${rescode} 200
+ #清理环境 放Teardown
+ #删除策略
+ log toDeletePolicy
+ ${rescode} DeletePolicy ${policyId}
+ Integer ${rescode} 200
+ #删除对象
+ log todeleteobj
+ ${rescode} DeleteObject ${objectId}
+ Integer ${rescode} 200
+ #清理日志?
+ #退出登录 放到teardown
+ #最为彻底的清理方式是每次重新初始化数据库