diff --git a/01-TestCase/tsg-ui/ui-objects/Object-HTTPSignature-Case.robot b/01-TestCase/tsg-ui/ui-objects/Object-HTTPSignature-Case.robot deleted file mode 100644 index eac5ec4..0000000 --- a/01-TestCase/tsg-ui/ui-objects/Object-HTTPSignature-Case.robot +++ /dev/null @@ -1,190 +0,0 @@ -*** Settings *** -Resource ../../../03-Variable/bifangapivariable.txt -Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot -Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot -Library OperatingSystem - -*** Test Cases *** -create-HTTPSignature-Request-User-Agent-prefix-001 - #新建user-agent - CreatePage ReqRes create-HTTPSignature-Request-User-Agent-prefix-001 reqrestype=req reqresheader=ua keywordtext=Mozilla/5.0* - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Request-User-Agent-prefix-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-prefix-001 - #删除对象 - objects-delete - -create-HTTPSignature-Request-User-Agent-sub-002 - #新建user-agent - CreatePage ReqRes create-HTTPSignature-Request-User-Agent-sub-002 reqrestype=req reqresheader=ua keywordtext=Mozilla/5. - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Request-User-Agent-sub-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-sub-002 - #删除对象 - objects-delete - -create-HTTPSignature-Request-User-Agent-exactly-003 - #新建user-agent - CreatePage ReqRes create-HTTPSignature-Request-User-Agent-exactly-003 reqrestype=req reqresheader=ua keywordtext=$Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36 - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Request-User-Agent-exactly-003 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-exactly-003 - #删除对象 - objects-delete - -create-HTTPSignature-Request-User-Agent-suffix-004 - #新建user-agent - CreatePage ReqRes create-HTTPSignature-Request-User-Agent-suffix-004 reqrestype=req reqresheader=ua keywordtext=*Safari/537.36 - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Request-User-Agent-suffix-004 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-suffix-004 - #删除对象 - objects-delete - -create-HTTPSignature-Request-Cookie-prefix-005 - #新建cookie - CreatePage ReqRes create-HTTPSignature-Request-Cookie-prefix-005 reqrestype=req reqresheader=ck keywordtext=cookie* - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Request-Cookie-prefix-005 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Request-Cookie-prefix-005 - #删除对象 - objects-delete - -create-HTTPSignature-Request-Cookie-sub-006 - #新建cookie - CreatePage ReqRes create-HTTPSignature-Request-Cookie-sub-006 reqrestype=req reqresheader=ck keywordtext=cookie - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Request-Cookie-sub-006 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Request-Cookie-sub-006 - #删除对象 - objects-delete - -create-HTTPSignature-Request-Cookie-exactly-007 - #新建cookie - CreatePage ReqRes create-HTTPSignature-Request-Cookie-exactly-007 reqrestype=req reqresheader=ck keywordtext=$cookie - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Request-Cookie-exactly-007 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Request-Cookie-exactly-007 - #删除对象 - objects-delete - -create-HTTPSignature-Request-Cookie-suffix-008 - #新建cookie - CreatePage ReqRes create-HTTPSignature-Request-Cookie-suffix-008 reqrestype=req reqresheader=ck keywordtext=*cookie - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Request-Cookie-suffix-008 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Request-Cookie-suffix-008 - #删除对象 - objects-delete - -create-HTTPSignature-Response-Set-Cookie-prefix-009 - #新建set-cookie - CreatePage ReqRes create-HTTPSignature-Response-Set-Cookie-prefix-009 reqrestype=res reqresheader=sck keywordtext=set-cookie* - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Response-Set-Cookie-prefix-009 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Response-Set-Cookie-prefix-009 - #删除对象 - objects-delete - -create-HTTPSignature-Response-Set-Cookie-sub-010 - #新建set-cookie - CreatePage ReqRes create-HTTPSignature-Response-Set-Cookie-sub-010 reqrestype=res reqresheader=sck keywordtext=set-cookie - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Response-Set-Cookie-sub-010 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Response-Set-Cookie-sub-010 - #删除对象 - objects-delete - -create-HTTPSignature-Response-Set-Cookie-exactly-011 - #新建set-cookie - CreatePage ReqRes create-HTTPSignature-Response-Set-Cookie-exactly-011 reqrestype=res reqresheader=sck keywordtext=$set-cookie - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Response-Set-Cookie-exactly-011 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Response-Set-Cookie-exactly-011 - #删除对象 - objects-delete - -create-HTTPSignature-Response-Set-Cookie-suffix-012 - #新建set-cookie - CreatePage ReqRes create-HTTPSignature-Response-Set-Cookie-suffix-012 reqrestype=res reqresheader=sck keywordtext=*set-cookie - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Response-Set-Cookie-suffix-012 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Response-Set-Cookie-suffix-012 - #删除对象 - objects-delete - -create-HTTPSignature-Response-Content-Type-prefix-0013 - #新建content-type - CreatePage ReqRes create-HTTPSignature-Response-Content-Type-prefix-0013 reqrestype=res reqresheader=ct keywordtext=Content-Type* - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Response-Content-Type-prefix-0013 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Response-Content-Type-prefix-0013 - #删除对象 - objects-delete - -create-HTTPSignature-Response-Content-Type-sub-0014 - #新建content-type - CreatePage ReqRes create-HTTPSignature-Response-Content-Type-sub-0014 reqrestype=res reqresheader=ct keywordtext=Content-Type - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Response-Content-Type-sub-0014 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Response-Content-Type-sub-0014 - #删除对象 - objects-delete - -create-HTTPSignature-Response-Content-Type-exactly-0015 - #新建content-type - CreatePage ReqRes create-HTTPSignature-Response-Content-Type-exactly-0015 reqrestype=res reqresheader=ct keywordtext=$Content-Type - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Response-Content-Type-exactly-0015 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Response-Content-Type-exactly-0015 - #删除对象 - objects-delete - -create-HTTPSignature-Response-Content-Type-suffix-0016 - #新建content-type - CreatePage ReqRes create-HTTPSignature-Response-Content-Type-suffix-0016 reqrestype=res reqresheader=ct keywordtext=*Content-Type - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Response-Content-Type-suffix-0016 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Response-Content-Type-suffix-0016 - #删除对象 - objects-delete - -edit-HTTPSignature-017 - #新建user-agent - CreatePage ReqRes create-HTTPSignature-Request-User-Agent-prefix-001 reqrestype=req reqresheader=ua keywordtext=Mozilla/5.0* - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-Request-User-Agent-prefix-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-prefix-001 - #修改对象 - object-edit-HTTPSignature edit-HTTPSignature-017 res sck 8f6c 6362 31 36 8fdb 5236 hex=open - #查询修改对象 - ui-object-search-name edit-HTTPSignature-017 - #删除对象 - objects-delete - -create-HTTPSignature-open-16-hex-0018 - #新建content-type - CreatePage ReqRes create-HTTPSignature-open-16-hex-0018 reqrestype=res reqresheader=ct keywordtext=*63 6f 6e 74 65 6e 74 hex=open - #验证新建是否成功 - ui-object-search-name create-HTTPSignature-open-16-hex-0018 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-HTTPSignature-open-16-hex-0018 - #删除对象 - objects-delete diff --git a/01-TestCase/tsg-ui/ui-objects/Object_Account_Case.robot b/01-TestCase/tsg-ui/ui-objects/Object_Account_Case.robot deleted file mode 100644 index 48528f6..0000000 --- a/01-TestCase/tsg-ui/ui-objects/Object_Account_Case.robot +++ /dev/null @@ -1,61 +0,0 @@ -*** Settings *** -Force Tags tsg-ui objects account -Resource ../../../03-Variable/bifangapivariable.txt -Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot -Library OperatingSystem -Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot - -*** Test Cases *** -create-account-prefix-001 - #新建Account - CreatePage Account create-account-prefix-001 keywordtext=www.* - #验证新建是否成功 - ui-object-search-name create-account-prefix-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-account-prefix-001 - #删除对象 - objects-delete - -create-account-sub-002 - #新建Account - CreatePage Account create-account-sub-002 keywordtext=1234 - #验证新建是否成功 - ui-object-search-name create-account-sub-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span - log ${text} - #删除对象 - objects-delete - -create-account-exactly-003 - #新建Account - CreatePage Account create-account-exactly-003 keywordtext=$1234567 - #验证新建是否成功 - ui-object-search-name create-account-exactly-003 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span - log ${text} - #删除对象 - objects-delete - -create-account-suffix-004 - #新建Account - CreatePage Account create-account-suffix-004 keywordtext=*1234567 - #验证新建是否成功 - ui-object-search-name create-account-suffix-004 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span - log ${text} - #删除对象 - objects-delete - -edit-account-005 - #新建Account - CreatePage Account create-account-suffix-004 keywordtext=*1234567 - #验证新建是否成功 - ui-object-search-name create-account-suffix-004 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span - log ${text} - #修改对象 - object-edit-account deit-account-005 $www.baidu.com - #查询修改对象 - ui-object-search-name deit-account-005 - #删除对象 - objects-delete diff --git a/01-TestCase/tsg-ui/ui-objects/Object_Category_Case.robot b/01-TestCase/tsg-ui/ui-objects/Object_Category_Case.robot deleted file mode 100644 index d5b753a..0000000 --- a/01-TestCase/tsg-ui/ui-objects/Object_Category_Case.robot +++ /dev/null @@ -1,41 +0,0 @@ -*** Settings *** -Force Tags tsg-ui objects category -Resource ../../../03-Variable/bifangapivariable.txt -Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot -Library OperatingSystem -Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot - -*** Test Cases *** -create-category-exactly-001 - #新建Category - CreatePage Category create-category-exactly-001 keywordtext=$www.baidu.com - #验证新建是否成功 - ui-object-search-name create-category-exactly-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-category-exactly-001 - #删除对象 - objects-delete - -create-category-suffix-002 - #新建Category - CreatePage Category create-category-suffix-002 keywordtext=*baidu.com - #验证新建是否成功 - ui-object-search-name create-category-suffix-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-category-suffix-002 - #删除对象 - objects-delete - -edit-category-003 - #新建Category - CreatePage Category create-category-suffix-002 keywordtext=*baidu.com - #验证新建是否成功 - ui-object-search-name create-category-suffix-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-category-suffix-002 - #修改对象 - object-edit-fqdn deit-category-003 $open.node.com - #查询修改对象 - ui-object-search-name deit-category-003 - #删除对象 - objects-delete diff --git a/01-TestCase/tsg-ui/ui-objects/Object_Fqdn_Case.robot b/01-TestCase/tsg-ui/ui-objects/Object_Fqdn_Case.robot deleted file mode 100644 index b4026e5..0000000 --- a/01-TestCase/tsg-ui/ui-objects/Object_Fqdn_Case.robot +++ /dev/null @@ -1,51 +0,0 @@ -*** Settings *** -Force Tags tsg-ui objects fqdn -Resource ../../../03-Variable/bifangapivariable.txt -Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot -Library OperatingSystem -Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot - -*** Test Cases *** -create-fqdn-exactly-001 - #新建fqdn,exactly - CreatePage Fqdn create-fqdn-exactly-001 keywordtext=$open.node.com - #验证新建是否成功 - ui-object-search-name create-fqdn-exactly-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-fqdn-exactly-001 - #删除对象 - objects-delete - -create-fqdn-suffix-002 - #新建fqdn,exactly - CreatePage Fqdn create-fqdn-suffix-002 keywordtext=*open.node.com - #验证新建是否成功 - ui-object-search-name create-fqdn-suffix-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-fqdn-suffix-002 - #删除对象 - objects-delete - -create-fqdn-suffix-003 - #新建fqdn,exactly - CreatePage Fqdn create-fqdn-suffix-003 keywordtext=*123-456_abc - #验证新建是否成功 - ui-object-search-name create-fqdn-suffix-003 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-fqdn-suffix-003 - #删除对象 - objects-delete - -deit-fqdn-003 - #新建fqdn,exactly - CreatePage Fqdn create-fqdn-suffix-002 keywordtext=*open.node.com - #验证新建是否成功 - ui-object-search-name create-fqdn-suffix-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-fqdn-suffix-002 - #修改对象 - object-edit-fqdn deit-fqdn-003 $open.node.com - #查询修改对象 - ui-object-search-name deit-fqdn-003 - #删除对象 - objects-delete diff --git a/01-TestCase/tsg-ui/ui-objects/Object_Ip_Case.robot b/01-TestCase/tsg-ui/ui-objects/Object_Ip_Case.robot deleted file mode 100644 index d1790be..0000000 --- a/01-TestCase/tsg-ui/ui-objects/Object_Ip_Case.robot +++ /dev/null @@ -1,164 +0,0 @@ -*** Settings *** -Force Tags tsg-ui objects ip -Resource ../../../03-Variable/bifangapivariable.txt -Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot -Library OperatingSystem -Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot - -*** Test Cases *** -create-ipv4-range-001 - #新建ip,range - CreatePage Ip create-ipv4-range-001 ipads=ipv4 ipclient=range ipclienttext1=192.168.1.1 ipclienttext2=192.168.1.1 - ... post=0/0 - #验证新建是否成功 - ui-object-search-name create-ipv4-range-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv4-range-001 - #删除对象 - objects-delete - -create-ipv4-cidr-002 - #新建ip,cidr - CreatePage Ip create-ipv4-cidr-002 ipads=ipv4 ipclient=cidr ipclienttext1=192.168.1.1 ipclienttext2=24 - ... post=65535/65535 - #验证新建是否成功 - ui-object-search-name create-ipv4-cidr-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv4-cidr-002 - #删除对象 - objects-delete - -create-ipv4-masks-003 - #新建ip,masks - CreatePage Ip create-ipv4-masks-003 ipads=ipv4 ipclient=masks ipclienttext1=192.168.1.1 ipclienttext2=255.255.255.0 - ... post=1/1 - #验证新建是否成功 - ui-object-search-name create-ipv4-masks-003 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv4-masks-003 - #删除对象 - objects-delete - -create-ipv6-range-004 - #新建ip,range - CreatePage Ip create-ipv6-range-004 ipads=ipv6 ipclient=range ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF - ... post=65535/65535 - #验证新建是否成功 - ui-object-search-name create-ipv6-range-004 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv6-range-004 - #删除对象 - objects-delete - -create-ipv6-cidr-005 - #新建ip,cidr - CreatePage Ip create-ipv6-cidr-005 ipads=ipv6 ipclient=cidr ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=64 - ... post=1/1 - #验证新建是否成功 - ui-object-search-name create-ipv6-cidr-005 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv6-cidr-005 - #删除对象 - objects-delete - -create-ipv6-masks-006 - #新建ip,masks - CreatePage Ip create-ipv6-masks-006 ipads=ipv6 ipclient=masks ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=0:0:0:0:0:0:0:0 - ... post=65535/65535 - #验证新建是否成功 - ui-object-search-name create-ipv6-masks-006 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv6-masks-006 - #删除对象 - objects-delete - -edit-ip-007 - #新建ip,masks - CreatePage Ip create-ipv6-masks-007 ipads=ipv6 ipclient=masks ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=0:0:0:0:0:0:0:0 - #验证新建是否成功 - ui-object-search-name create-ipv6-masks-007 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv6-masks-007 - #修改对象 - object-edit-ip edit-ip-007 ipv4 range 192.168.100.1 192.168.100.1 post=0/0 - #查询修改对象 - ui-object-search-name edit-ip-007 - #删除对象 - objects-delete - -create-ipv6-range-008 - #新建ip,range - CreatePage Ip create-ipv6-range-008 ipads=ipv6 ipclient=range ipclienttext1=:: ipclienttext2=::1 - ... post=0/0 - #验证新建是否成功 - ui-object-search-name create-ipv6-range-008 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv6-range-008 - #删除对象 - objects-delete - -create-ipv4-range-009 - #新建ip,range - CreatePage Ip create-ipv4-range-009 ipads=ipv6 ipclient=range ipclienttext1=0.0.0.0 ipclienttext2=255.255.255.255 - ... post=65535/65535 - #验证新建是否成功 - ui-object-search-name create-ipv4-range-009 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv4-range-009 - #删除对象 - objects-delete - -create-ipv4-cidr-010 - #新建ip,cidr - CreatePage Ip create-ipv4-cidr-010 ipads=ipv6 ipclient=cidr ipclienttext1=0.0.0.0 ipclienttext2=0 - ... post=0/0 - #验证新建是否成功 - ui-object-search-name create-ipv4-cidr-010 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv4-cidr-010 - #删除对象 - objects-delete - -create-ipv4-cidr-011 - #新建ip,cidr - CreatePage Ip create-ipv4-cidr-011 ipads=ipv6 ipclient=cidr ipclienttext1=255.255.255.255 ipclienttext2=32 - ... post=65535/65535 - #验证新建是否成功 - ui-object-search-name create-ipv4-cidr-011 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv4-cidr-011 - #删除对象 - objects-delete - -create-ipv6-range-012 - #新建ip,range - CreatePage Ip create-ipv6-range-012 ipads=ipv6 ipclient=range ipclienttext1=:: ipclienttext2=FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF - ... post=0/0 - #验证新建是否成功 - ui-object-search-name create-ipv6-range-012 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv6-range-012 - #删除对象 - objects-delete - -create-ipv6-cidr-013 - #新建ip,range - CreatePage Ip create-ipv6-cidr-013 ipads=ipv6 ipclient=cidr ipclienttext1=:: ipclienttext2=0 - ... post=0/0 - #验证新建是否成功 - ui-object-search-name create-ipv6-cidr-013 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv6-cidr-013 - #删除对象 - objects-delete - -create-ipv6-cidr-014 - #新建ip,range - CreatePage Ip create-ipv6-cidr-014 ipads=ipv6 ipclient=cidr ipclienttext1=FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF ipclienttext2=128 - ... post=65535/65535 - #验证新建是否成功 - ui-object-search-name create-ipv6-cidr-014 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-ipv6-cidr-014 - #删除对象 - objects-delete diff --git a/01-TestCase/tsg-ui/ui-objects/Object_Keywords_Case.robot b/01-TestCase/tsg-ui/ui-objects/Object_Keywords_Case.robot deleted file mode 100644 index 881363e..0000000 --- a/01-TestCase/tsg-ui/ui-objects/Object_Keywords_Case.robot +++ /dev/null @@ -1,71 +0,0 @@ -*** Settings *** -Force Tags tsg-ui objects keywords -Resource ../../../03-Variable/bifangapivariable.txt -Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot -Library OperatingSystem -Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot - -*** Test Cases *** -create-keywords-prefix-001 - #新建keywords - CreatePage Key create-keywords-prefix-001 keywordtext=www.* - #验证新建是否成功 - ui-object-search-name create-keywords-prefix-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-keywords-prefix-001 - #删除对象 - objects-delete - -create-keywords-sub-002 - #新建keywords - CreatePage Key create-keywords-sub-002 keywordtext=1234@#% - #验证新建是否成功 - ui-object-search-name create-keywords-sub-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-keywords-sub-002 - #删除对象 - objects-delete - -create-keywords-exactly-003 - #新建keywords - CreatePage Key create-keywords-exactly-003 keywordtext=$支持中文 - #验证新建是否成功 - ui-object-search-name create-keywords-exactly-003 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-keywords-exactly-003 - #删除对象 - objects-delete - -create-keywords-suffix-004 - #新建keywords - CreatePage Key create-keywords-suffix-004 keywordtext=*скрипцияк. - #验证新建是否成功 - ui-object-search-name create-keywords-suffix-004 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-keywords-suffix-004 - #删除对象 - objects-delete - -edit-keywords-005 - #新建keywords - CreatePage Key create-keywords-suffix-005 keywordtext=*123456 - #验证新建是否成功 - ui-object-search-name create-keywords-suffix-005 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-keywords-suffix-005 - #修改对象 - object-edit-keywords edit-keywords-005 $www.baidu.com - #查询修改对象 - ui-object-search-name edit-keywords-005 - #删除对象 - objects-delete - -create-keywords-open-16hex-006 - #新建keywords - CreatePage Key create-keywords-open-16hex-006 keywordtext=*123456 hex=open - #验证新建是否成功 - ui-object-search-name create-keywords-open-16hex-006 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span - log ${text} - #删除对象 - objects-delete diff --git a/01-TestCase/tsg-ui/ui-objects/Object_Subscriber_Id_Case.robot b/01-TestCase/tsg-ui/ui-objects/Object_Subscriber_Id_Case.robot deleted file mode 100644 index f0cc85a..0000000 --- a/01-TestCase/tsg-ui/ui-objects/Object_Subscriber_Id_Case.robot +++ /dev/null @@ -1,41 +0,0 @@ -*** Settings *** -Force Tags tsg-ui object sub-id -Resource ../../../03-Variable/bifangapivariable.txt -Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot -Library OperatingSystem -Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot - -*** Test Cases *** -create-Subscriber-ID-001 - #新建sub-id - CreatePage Sub create-sub-id-001 keywordtext=$test37 - #验证新建是否成功 - ui-object-search-name create-sub-id-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-sub-id-001 - #删除对象 - objects-delete - -create-Subscriber-ID-002 - #新建sub-id - CreatePage Sub create-sub-id-002 keywordtext=$abc_%$#@123中文_скрипцияк. - #验证新建是否成功 - ui-object-search-name create-sub-id-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-sub-id-002 - #删除对象 - objects-delete - -edit-Subscriber-ID-002 - #新建sub-id - CreatePage Sub create-sub-id-001 keywordtext=$test37 - #验证新建是否成功 - ui-object-search-name create-sub-id-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span - log ${text} - #修改对象 - object-edit-Subscriber-ID deit-sub-id-002 $test20 - #查询修改对象 - ui-object-search-name deit-sub-id-002 - #删除对象 - objects-delete diff --git a/01-TestCase/tsg-ui/ui-objects/Object_Url_Case.robot b/01-TestCase/tsg-ui/ui-objects/Object_Url_Case.robot deleted file mode 100644 index 6df7af6..0000000 --- a/01-TestCase/tsg-ui/ui-objects/Object_Url_Case.robot +++ /dev/null @@ -1,61 +0,0 @@ -*** Settings *** -Force Tags tsg-ui objects url -Resource ../../../03-Variable/bifangapivariable.txt -Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot -Library OperatingSystem -Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot - -*** Test Cases *** -create-url-prefix-001 - #新建URL - CreatePage Url create-url-prefix-001 keywordtext=www.* - #验证新建是否成功 - ui-object-search-name create-url-prefix-001 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-url-prefix-001 - #删除对象 - objects-delete - -create-url-sub-002 - #新建sub-id - CreatePage Url create-url-sub-002 keywordtext=1234@#% - #验证新建是否成功 - ui-object-search-name create-url-sub-002 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-url-sub-002 - #删除对象 - objects-delete - -create-url-exactly-003 - #新建sub-id - CreatePage Url create-url-exactly-003 keywordtext=$支持中文 - #验证新建是否成功 - ui-object-search-name create-url-exactly-003 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-url-exactly-003 - #删除对象 - objects-delete - -create-url-suffix-004 - #新建sub-id - CreatePage Url create-url-suffix-004 keywordtext=*скрипцияк. - #验证新建是否成功 - ui-object-search-name create-url-suffix-004 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-url-suffix-004 - #删除对象 - objects-delete - -edit-url-005 - #新建sub-id - CreatePage Url create-url-suffix-005 keywordtext=*.com - #验证新建是否成功 - ui-object-search-name create-url-suffix-005 - ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Should Be Equal As Strings ${text} create-url-suffix-005 - #修改对象 - object-edit-url deit-url-005 $www.baidu.com - #查询修改对象 - ui-object-search-name deit-url-005 - #删除对象 - objects-delete diff --git a/01-TestCase/tsg-ui/ui-settings/Hijack_Files_Case.robot b/01-TestCase/tsg-ui/ui-settings/Hijack_Files_Case.robot deleted file mode 100644 index 94cf95d..0000000 --- a/01-TestCase/tsg-ui/ui-settings/Hijack_Files_Case.robot +++ /dev/null @@ -1,48 +0,0 @@ -*** Settings *** -Force Tags tsg-ui settings Hijack Files -Resource ../../../03-Variable/bifangapivariable.txt -Resource ../../../02-Keyword/Tsg_Ui/Setting/Settings.robot -Library OperatingSystem - -*** Test Cases *** -Create_Hijack_Files-001 - Create-Hijack Files lyf-test-001-apk ${path}hijack_files/Create-Hijack Files-test.apk id=application/vnd.android.package-archive0 - -Create_Hijack_Files-002 - Create-Hijack Files lyf-test-002-exe ${path}hijack_files/Create-Hijack Files-test-1.exe id=application/x-msdos-program0 - -Create_Hijack_Files-003 - Create-Hijack Files lyf-test-003-gif ${path}hijack_files/Create-Hijack Files-test-2.gif id=image/gif0 - -Create_Hijack_Files-004 - Create-Hijack Files lyf-test-004-html ${path}hijack_files/Create-Hijack Files-test-3.html id=text/html0 - -Create_Hijack_Files-005 - Create-Hijack Files lyf-test-005-jpeg ${path}hijack_files/Create-Hijack Files-test-4.jpeg id=image/jpeg1 - -Create_Hijack_Files-006 - Create-Hijack Files lyf-test-006-png ${path}hijack_files/Create-Hijack Files-test-5.png id=image/png2 - -Create_Hijack_Files-007 - Create-Hijack Files lyf-test-007-svg ${path}hijack_files/Create-Hijack Files-test-6.svg id=image/svg+xml3 - -Edit_Hijack_Files-008 - Create-Hijack Files lyf-test-001-apk ${path}hijack_files/Create-Hijack Files-test.apk id=application/vnd.android.package-archive0 - ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/span - Edit-Hijack Files id=input_list_li2 ${name} lyf-Edit-test-001 ${path}hijack_files\\Create-Hijack Files-test.apk id=application/vnd.android.package-archive0 - -Edit_Hijack_Files-009 - Create-Hijack Files lyf-test-001-apk ${path}hijack_files/Create-Hijack Files-test.apk id=application/vnd.android.package-archive0 - ${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/span - Edit-Hijack Files id=input_list_li1 ${id} lyf-Edit-test-002 ${path}hijack_files\\Create-Hijack Files-test.apk id=application/vnd.android.package-archive0 - -Edit_Hijack_Files-010 - Create-Hijack Files lyf-test-001-apk ${path}hijack_files/Create-Hijack Files-test.apk id=application/vnd.android.package-archive0 - ${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/span - Edit-Hijack Files id=input_list_li1 ${id} lyf-Edit-test-003 ${path}hijack_files\\Create-Hijack Files-test.apk id=application/vnd.android.package-archive0 close - -Create_Hijack_Files-011 - Create-Hijack Files lyf-test-011-svg ${path}hijack_files/Create-Hijack Files-test-6.svg id=image/svg+xml3 close shuru - -Create_Hijack_Files-012 - Create-Hijack Files lyf-test-011-svg ${path}hijack_files/Create-Hijack Files-test-6.svg id=image/svg+xml3 open diff --git a/01-TestCase/tsg-ui/ui-settings/Insert_Scripts_Case.robot b/01-TestCase/tsg-ui/ui-settings/Insert_Scripts_Case.robot deleted file mode 100644 index 8c16739..0000000 --- a/01-TestCase/tsg-ui/ui-settings/Insert_Scripts_Case.robot +++ /dev/null @@ -1,42 +0,0 @@ -*** Settings *** -Force Tags tsg-ui settings insert_scripts -Resource ../../../03-Variable/bifangapivariable.txt -Library OperatingSystem -Resource ../../../02-Keyword/Tsg_Ui/Setting/Settings.robot - -*** Test Cases *** -Create_Insert_Scripts-001 - [Tags] css - Create-Insert Scripts lyf-test-001-css ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1] - -Create_Insert_Scripts-002 - [Tags] js - Create-Insert Scripts lyf-test-002-js ${path}insert_files\\Create-Insert Scripts-test.js xpath=/html/body/div/div[1]/div[1]/ul/li[2] - -Create_Insert_Scripts-003 - [Tags] css name最小值 - Create-Insert Scripts 1 ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1] - -Create_Insert_Scripts-004 - [Tags] css name传入超过128字符 - Create-Insert Scripts ${path}insert_files\\Create-Insert Scripts-test.css${path}insert_files\\Create-Insert Scripts-test.css${path}insert_files\\Create-Insert Scripts-test.css ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1] - -Create_Insert_Scripts-005 - [Tags] js name最小值 - Create-Insert Scripts 1 ${path}insert_files\\Create-Insert Scripts-test.js xpath=/html/body/div/div[1]/div[1]/ul/li[2] - -Create_Insert_Scripts-006 - [Tags] js name传入超过128字符 - Create-Insert Scripts ${path}insert_files\\Create-Insert Scripts-test.css${path}insert_files\\Create-Insert Scripts-test.css${path}insert_files\\Create-Insert Scripts-test.css ${path}insert_files\\Create-Insert Scripts-test.js xpath=/html/body/div/div[1]/div[1]/ul/li[2] - -Edit_Insert_Scripts-007 - [Tags] css edit - Create-Insert Scripts lyf-test-001-css ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1] - ${id} get text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr/td[1]/div/div/span - Edit-Insert Scripts id=input_list_li1 ${id} lyf-Edit-test-001 ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1] - -Edit_Insert_Scripts-008 - [Tags] edit js - Create-Insert Scripts 1 ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1] - ${name} get text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span - Edit-Insert Scripts id=input_list_li2 ${name} lyf-Edit-test-008 ${path}insert_files\\Create-Insert Scripts-test.js xpath=/html/body/div/div[1]/div[1]/ul/li[2] diff --git a/01-TestCase/tsg-ui/ui-settings/Response_Pages_Case.robot b/01-TestCase/tsg-ui/ui-settings/Response_Pages_Case.robot deleted file mode 100644 index abd5aea..0000000 --- a/01-TestCase/tsg-ui/ui-settings/Response_Pages_Case.robot +++ /dev/null @@ -1,38 +0,0 @@ -*** Settings *** -Force Tags tsg-ui settings response_pages -Resource ../../../03-Variable/bifangapivariable.txt -Library OperatingSystem -Resource ../../../02-Keyword/Tsg_Ui/Setting/Settings.robot - -*** Test Cases *** -Create_Response_pages-001 - [Tags] html - Create-Response Pages Create-Response Pages-001 ${path}response_pages_files\\Create-Response Pages-test.html - -Create_Response_pages-002 - [Tags] htm - Create-Response Pages Create-Response Pages-001 ${path}response_pages_files\\Create-Response Pages-test-2.htm - -Create_Response_pages-003 - [Tags] name最小值 - Create-Response Pages 1 ${path}response_pages_files\\Create-Response Pages-test-2.htm - -Create_Response_pages-004 - [Tags] name超过128字符 - Create-Response Pages ${path}response_pages_files\\Create-Response Pages-test2.htm${path}response_pages_files\\Create-Response Pages-test2.htm${path}response_pages_files\\Create-Response Pages-test2.htm ${path}response_pages_files\\Create-Response Pages-test-2.htm - -Create_Response_pages-005 - [Tags] 中英俄特殊字符 - Create-Response Pages 中文+absc+моряков+@#¥%……&* ${path}response_pages_files\\Create-Response Pages-test.html - -Edit_Response_pages-006 - [Tags] 修改+以id为查找对象 - Create-Response Pages Create-Response Pages-001 ${path}response_pages_files\\Create-Response Pages-test.html - ${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/span - Edit-Response Pages id=input_list_li1 ${id} lyf-Edit-test-001 ${path}response_pages_files\\Create-Response Pages-test-1.html - -Edit_Response_pages-007 - [Tags] 修改+以name为查找对象 - Create-Response Pages Create-Response Pages-001 ${path}response_pages_files\\Create-Response Pages-test.html - ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span - Edit-Response Pages id=input_list_li2 ${name} lyf-Edit-test-007 ${path}response_pages_files\\Create-Response Pages-test-1.html diff --git a/01-TestCase/tsg_adc/multi_step/MultiStepDenyAllTests.robot b/01-TestCase/tsg_adc/multi_step/MultiStepDenyAllTests.robot new file mode 100644 index 0000000..6a59c0a --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/MultiStepDenyAllTests.robot @@ -0,0 +1,196 @@ +*** Settings *** +Test Teardown DeleteAfterCase ${policyIds} ${objectids} +Force Tags tsg_adc tsg_security selfserver +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../03-Variable/PolicyObjectDefault.txt +Resource ../../../02-Keyword/tsg_common/StmpHandle.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../02-Keyword/tsg_adc/FileOperation.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library Custometest +Library json + +*** Variables *** +${policyIds} ${EMPTY} +${objectids} ${EMPTY} +${url} /policy/profile/responsepages +${profiledId} ${EMPTY} +${dict} ${None} +${caseName} SecurityPolicy-Deny-AllProtol-00001 +*** Keywords *** +create-object-policy + [Arguments] @{flag} + Comment 创建目标IP + ${objectDict} Create Dictionary + ... objectType=IP + ... isValid=1 + ... objectSubType=${Default_ObjectSubType} + ... isInitialize=${Default_IsInitialize} + ... isExclusion=${Default_IsExclusion} + ... objectName=${caseName}_IPobject + ... objectDesc=${Default_ObjectDesc} + ... subObjectIds=${Default_SubObjectIds} + ... addItemList=CIDR|192.168.100.5|32|0/0&${Default_AddItem_ServerIpFormat}|${Default_AddItem_ServerIp1}|${Default_AddItem_ServerIp2}|${Default_AddItem_ServerPort}|${Default_AddItem_IsInitialize}|${Default_AddItem_ItemName}|${Default_AddItem_ItemDesc} + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} Run Keyword If '${testPart}'=='all' set Variable ${objectId} + + Comment 创建安全策略,针对所有协议,相当于BlackIP + ${policyDict} Create Dictionary + ... policyName=${caseName} + ... policyType=tsg_security + ... policyDesc=${Default_PolicyDesc} + ... action=deny + ... effectiveRange=${Default_EffectiveRange} + ... userRegion=${Default_UserRegion} + ... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR + ... isValid=${Default_IsValid} + ... appObjectIdArray=2,3,4,5,6 + ... userTags=${Default_UserTags} + ... doLog=2 + ... scheduleId=${Default_ScheduleId} + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + ${policyIds} Run Keyword If '${testPart}'=='all' Create List {"policyType":"tsg_security","policyIds":[${policyId}]} + # 区分执行方式 + ${value} Run Keyword If ${flag}==[] insert_policyId_to_file ${caseName} ${policyId} ${objectids} + ... ELSE Create Dictionary policyId=${policyId} objectId=${objectids} + Set Test Variable ${dict} ${value} + +function-test + Run Keyword If '${testPart}'=='all' Sleep ${policyVerificationSleepSeconds}s + ${starttime} Get Time + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/${caseName}_HTTP.bat + ... ELSE set variable curl -kv http://open.node.com/ + + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset + ... ELSE Create List Connection reset by peer + + ${starttime_http} Get Time + ${rescode} SystemCommands ${commandstr} ${stringlist} + Run Keyword If '${testPart}'=='all' Sleep ${policyLogVerificationSleepSeconds}s + ${endtime_http} Get Time + #日志验证 + #GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + + Comment 功能端验证SSL验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/${caseName}_SSL.bat + ... ELSE set variable curl -kv https://open.node.com/ + + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset + #OpenSSL SSL_connect: Connection was reset in connection to + #Send failure: Connection was reset + ... ELSE Create List OpenSSL SSL_connect: Connection reset by peer in connection to + + ${starttime_ssl} Get Time + ${rescode} SystemCommands ${commandstr} ${stringlist} + Run Keyword If '${testPart}'=='all' Sleep ${policyLogVerificationSleepSeconds}s + ${endtime_ssl} Get Time + #日志验证 + #GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com + + Comment 功能端验证DNS验证 + + + Comment 功能端验证MAIL验证 + #${mail} EmailLogin mail.tsgmail.com 25 dongxiaoyan@mail.tsgmail.com dxy123 + ${starttime_mail} Get Time + ${Smtp服务器} Set Variable 192.168.100.5 + ${Smtp服务器端口} Set Variable 25 + ${邮箱账号} Set Variable dongxiaoyan@mail.tsgmail.com + ${邮箱密码} Set Variable dxy123 + ${邮件主题} Set Variable что- иностранныеsuject + ${发送者} Set Variable dongxiaoyan@mail.tsgmail.com + ${附件} Set Variable ["${mailpath}/朱明明测试文件.txt"] + ${接收者} Set Variable ["jwctest@mail.tsgmail.com"] + ${抄送者} Set Variable ["zmmtest@mail.tsgmail.com"] + ${密送者} Set Variable ["lyftest@mail.tsgmail.com"] + ${邮件正文} Set Variable 朱明明contentчто-иностранныеsuject + ${mail} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件} + should contain ${mail} mail_fail + Run Keyword If '${testPart}'=='all' Sleep ${policyLogVerificationSleepSeconds}s + ${endtime_mail} Get Time + #日志验证 + #GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_protocol_type SMTP + + Comment 功能端验证FTP验证 + ${starttime_ftp} Get Time + ${ftpLogin} FTP_login ftp://192.168.100.5:21 -u"ftp_user:qazXSW@edc" test.txt + should contain ${ftpLogin} ftp_fail + #日志验证 + #GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account '' + Run Keyword If '${testPart}'=='all' Sleep ${policyLogVerificationSleepSeconds}s + ${endtime_ftp} Get Time + + ${endtime} Get Time + # 区分执行方式 + Run Keyword If ${dict}==${None} insert_time_to_file ${caseName} ${starttime} ${endtime} + ... ELSE Run Keyword Set To Dictionary ${dict} ${starttime} ${endtime} +log-test + # 日志验证 + ${obj} Run Keyword If ${dict}==${None} json.Loads ${caseName} + ... ELSE Set Variable ${dict} + ${policyId} Set Variable ${obj}[policyId] + ${s} Convert to String ${policyId} + ${objectids} Run Keyword If '${testPart}'!='all' set Variable ${obj}[objectids] + ${policyIds} Run Keyword If '${testPart}'!='all' Create List {"policyType":"tsg_security","policyIds":[${policyId}]} + Comment 功能端验证HTTP验证 + #日志验证 + GetLogList security_event_log ${starttime_http} ${endtime_http} ${testClentIP} ${s} http_host open.node.com + ${obj}[starttime] ${obj}[endtime] + Comment 功能端验证SSL验证 + #日志验证 + GetLogList security_event_log ${starttime_ssl} ${endtime_ssl} ${testClentIP} ${s} ssl_sni open.node.com + + Comment 功能端验证DNS验证 + + Comment 功能端验证MAIL验证 + #日志验证 + GetLogList security_event_log ${starttime_mail} ${endtime_mail} ${testClentIP} ${s} mail_protocol_type SMTP + + Comment 功能端验证FTP验证 + #日志验证 + GetLogList security_event_log ${starttime_ftp} ${endtime_ftp} ${testClentIP} ${s} ftp_account '' +log-test_bak + # 日志验证 + ${obj} Run Keyword If ${dict}==${None} json.Loads ${caseName} + ... ELSE Set Variable ${dict} + ${policyId} Set Variable ${obj}[policyId] + ${s} Convert to String ${policyId} + ${objectids} Run Keyword If '${testPart}'!='all' set Variable ${obj}[objectids] + ${policyIds} Run Keyword If '${testPart}'!='all' Create List {"policyType":"tsg_security","policyIds":[${policyId}]} + Comment 功能端验证HTTP验证 + #日志验证 + #GetLogList security_event_log ${starttime_http} ${endtime_http} ${testClentIP} ${s} http_host open.node.com + GetLogList security_event_log ${obj}[starttime_http] ${obj}[endtime_http] ${testClentIP} ${s} http_host open.node.com + ${obj}[starttime] ${obj}[endtime] + Comment 功能端验证SSL验证 + #日志验证 + #GetLogList security_event_log ${starttime_ssl} ${endtime_ssl} ${testClentIP} ${s} ssl_sni open.node.com + GetLogList security_event_log ${obj}[starttime_ssl} ${obj}[endtime_ssl} ${testClentIP} ${s} ssl_sni open.node.com + + Comment 功能端验证DNS验证 + + Comment 功能端验证MAIL验证 + #日志验证 + #GetLogList security_event_log ${starttime_mail} ${endtime_mail} ${testClentIP} ${s} mail_protocol_type SMTP + GetLogList security_event_log ${obj}[starttime_mail} ${obj}[endtime_mail} ${testClentIP} ${s} mail_protocol_type SMTP + + Comment 功能端验证FTP验证 + #日志验证 + #GetLogList security_event_log ${starttime_ftp} ${endtime_ftp} ${testClentIP} ${s} ftp_account '' + GetLogList security_event_log ${obj}[starttime_ftp} ${obj}[endtime_ftp} ${testClentIP} ${s} ftp_account '' +*** Test Cases *** +MultiSecurityPolicy-Deny-AllProtol-00001 + [Tags] securitypolciy deny allprotol multistep + #${caseName} set variable SecurityPolicy-Deny-AllProtol-00001 + + Run Keyword If '${testPart}'=='all' Run Keywords create-object-policy True + ... AND function-test + ... AND log-test + ... ELSE IF ${testPart}==1 Run Keyword create-object-policy + ... ELSE IF ${testPart}==2 Run Keyword function-test + ... ELSE IF ${testPart}==3 Run Keyword log-test +#{"opAction":"add","policyList":{"policyId":"","policyName":"dxytest","policyType":"tsg_security","action":"deny","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","effectiveRange":{"tag_sets":[[]]},"userRegion":{"method":"rst"},"referenceObject":[{"objectId":6926,"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]},{"objectId":6943,"protocolFields":["TSG_SECURITY_DESTINATION_ADDR"]}],"isValid":0,"scheduleId":[],"appObjectIdArray":[2,3,4,5,6]}}