diff --git a/01-TestCase/tsg_adc/multi_step/a_Allow_Sip_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Allow_Sip_Tests.robot index 2cad88c..98e742f 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Allow_Sip_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Allow_Sip_Tests.robot @@ -20,7 +20,7 @@ SecurityPolicy-Allow-SIP-00001 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test1 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -45,7 +45,7 @@ SecurityPolicy-Allow-SIP-00001-1 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test102 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -70,7 +70,7 @@ SecurityPolicy-Allow-SIP-00001-2 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test6 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_TO userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -95,7 +95,7 @@ SecurityPolicy-Allow-SIP-00001-3 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test104 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -120,7 +120,7 @@ SecurityPolicy-Allow-SIP-00001-4 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test8 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_TO userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00001 policyType=tsg_security policyDesc=autotest action=allow source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -291,7 +291,7 @@ SecurityPolicy-Allow-SIP-000011 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=$zdjzyq12voip,zdjzy*,yq12v,*12voip ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-000011 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} filterList=${object_Account_Id}|TSG_FIELD_SIP_FROM isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-000011 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} filterList=${object_Account_Id}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -310,7 +310,7 @@ SecurityPolicy-Allow-SIP-00002 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test4 ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00002 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id}|TSG_FIELD_SIP_TO isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00002 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -333,7 +333,7 @@ SecurityPolicy-Allow-SIP-000013 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=$wx7051406391,wx705*,51406,*51406391 ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-000013 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-000013 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -362,7 +362,7 @@ SecurityPolicy-Allow-SIP-000014 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=$wx7051406391,wx705*,51406,*51406391 ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-000014 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-000014 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -404,7 +404,7 @@ SecurityPolicy-Allow-SIP-000016 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=*12voi ${rescode} ${object_Account_Id6} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-000011 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO,${object_Account_Id3}|TSG_FIELD_SIP_FROM,${object_Account_Id4}|TSG_FIELD_SIP_TO,${object_Account_Id5}|TSG_FIELD_SIP_FROM,${object_Account_Id6}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-000011 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION,${object_Account_Id3}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id4}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION,${object_Account_Id5}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id6}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -428,7 +428,7 @@ SecurityPolicy-Allow-SIP-00003 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test4 ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00002 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id}|TSG_FIELD_SIP_TO isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SIP-00002 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SIP"} source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot index bd39080..d82bcb1 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot @@ -360,7 +360,7 @@ SecurityPolicy-Deny-Http-00017 SecurityPolicy-Deny-Http-00018 [Tags] 多源ip对象 Comment 创建第二个源IP - ${addItemList1} Create Dictionary isSession=endpoint ip=192.168.50.11-192.168.50.18 port=0-0 direction=0 protocol=0 isInitialize=0 + ${addItemList1} Create Dictionary isSession=endpoint ip=192.168.50.18 port=0-65535 direction=0 protocol=0 isInitialize=0 ${addItemLists} Create list ${addItemList1} ${objectDict} Create Dictionary objectType=ip objectSubType=endpoint isValid=${1} addItemList=${addItemLists} ${rescode} ${objectId} AddObjects ${1} ${objectDict} diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Rtp_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Rtp_Tests.robot index 366d1a0..dc8a4b0 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Rtp_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Rtp_Tests.robot @@ -22,7 +22,7 @@ SecurityPolicy-Deny-Rtp-00001 ${objectDict} Create Dictionary objectType=ip objectSubType=endpoint isValid=${1} addItemList=${addItemLists} ${rescode} ${object_Ip_Id1} AddObjects ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Rtp-00001 policyType=tsg_security policyDesc=autotest action=deny source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR userRegion={"protocol":"RTP","method":"drop"} isValid=${1} appIdObjects=${RTP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Rtp-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR userRegion={"protocol":"RTP","method":"drop"} isValid=${1} appIdObjects=${RTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Sip_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Sip_Tests.robot index 16f0df3..07561e3 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Sip_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Sip_Tests.robot @@ -20,7 +20,7 @@ SecurityPolicy-Deny-SIP-00001 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test112 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM userRegion={"protocol":"SIP","method":"block","code":"480"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION userRegion={"protocol":"SIP","method":"block","code":"480"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -40,7 +40,7 @@ SecurityPolicy-Deny-SIP-00001-1 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test16 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_TO userRegion={"protocol":"SIP","method":"block","code":"500"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION userRegion={"protocol":"SIP","method":"block","code":"500"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -65,7 +65,7 @@ SecurityPolicy-Deny-SIP-00001-2 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test114 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM userRegion={"protocol":"SIP","method":"drop"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION userRegion={"protocol":"SIP","method":"drop"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -91,7 +91,7 @@ SecurityPolicy-Deny-SIP-00001-3 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test18 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_TO userRegion={"protocol":"SIP","method":"block","code":"480"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION userRegion={"protocol":"SIP","method":"block","code":"480"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -117,7 +117,7 @@ SecurityPolicy-Deny-SIP-00001-4 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test116 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM userRegion={"protocol":"SIP","method":"block","code":"500"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION userRegion={"protocol":"SIP","method":"block","code":"500"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -143,7 +143,7 @@ SecurityPolicy-Deny-SIP-00001-5 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test20 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_TO userRegion={"protocol":"SIP","method":"drop"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-00001 policyType=tsg_security policyDesc=autotest action=deny source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION userRegion={"protocol":"SIP","method":"drop"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -297,7 +297,7 @@ SecurityPolicy-Deny-SIP-000011 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount} ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000011 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} filterList=${object_Account_Id}|TSG_FIELD_SIP_FROM isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000011 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} filterList=${object_Account_Id}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -311,7 +311,7 @@ SecurityPolicy-Deny-SIP-000012 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount} ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000012 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"480"} filterList=${object_Account_Id}|TSG_FIELD_SIP_FROM isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000012 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"480"} filterList=${object_Account_Id}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -325,7 +325,7 @@ SecurityPolicy-Deny-SIP-000013 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount} ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000013 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"500"} filterList=${object_Account_Id}|TSG_FIELD_SIP_FROM isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000013 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"500"} filterList=${object_Account_Id}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -339,7 +339,7 @@ SecurityPolicy-Deny-SIP-000014 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount} ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000014 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} filterList=${object_Account_Id}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000014 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} filterList=${object_Account_Id}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -353,7 +353,7 @@ SecurityPolicy-Deny-SIP-000015 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount} ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000015 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"480"} filterList=${object_Account_Id}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000015 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"480"} filterList=${object_Account_Id}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -367,7 +367,7 @@ SecurityPolicy-Deny-SIP-000016 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount} ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000016 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"500"} filterList=${object_Account_Id}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000016 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"500"} filterList=${object_Account_Id}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -389,7 +389,7 @@ SecurityPolicy-Deny-SIP-000017 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount1} ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000017 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000017 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -413,7 +413,7 @@ SecurityPolicy-Deny-SIP-000018 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount1} ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000018 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"480"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000018 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"480"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -437,7 +437,7 @@ SecurityPolicy-Deny-SIP-000019 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount1} ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000019 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"500"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000019 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"500"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -467,7 +467,7 @@ SecurityPolicy-Deny-SIP-000020 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount1} ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000020 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000020 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -497,7 +497,7 @@ SecurityPolicy-Deny-SIP-000021 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount1} ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000021 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"480"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000021 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"480"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -527,7 +527,7 @@ SecurityPolicy-Deny-SIP-000022 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount1} ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000022 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"500"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000022 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"block","code":"500"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -569,7 +569,7 @@ SecurityPolicy-Deny-SIP-000024 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=*12voi ${rescode} ${object_Account_Id6} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000022 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO,${object_Account_Id3}|TSG_FIELD_SIP_FROM,${object_Account_Id4}|TSG_FIELD_SIP_TO,${object_Account_Id5}|TSG_FIELD_SIP_FROM,${object_Account_Id6}|TSG_FIELD_SIP_TO isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SIP-000022 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SIP","method":"drop"} filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION,${object_Account_Id3}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id4}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION,${object_Account_Id5}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id6}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} diff --git a/01-TestCase/tsg_adc/multi_step/a_Insert_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Insert_Tests.robot index f784e8c..1ff3a27 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Insert_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Insert_Tests.robot @@ -327,7 +327,7 @@ Proxy-Policy-insert-00010 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=ck.com/kcb ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} - Comment 创建请求头 + Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html|Content-Type ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} Comment 创建insert文件 diff --git a/01-TestCase/tsg_adc/multi_step/a_Monitor_Rtp_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Monitor_Rtp_Tests.robot index 7e7e365..8e2f770 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Monitor_Rtp_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Monitor_Rtp_Tests.robot @@ -22,7 +22,7 @@ SecurityPolicy-Monitor-Rtp-00001 ${objectDict} Create Dictionary objectType=ip objectSubType=endpoint isValid=${1} addItemList=${addItemLists} ${rescode} ${object_Ip_Id1} AddObjects ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Rtp-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR userRegion={"protocol":"RTP"} isValid=${1} appIdObjects=${RTP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Rtp-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR userRegion={"protocol":"RTP"} isValid=${1} appIdObjects=${RTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} diff --git a/01-TestCase/tsg_adc/multi_step/a_Monitor_Sip_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Monitor_Sip_Tests.robot index 981fde5..ac1ae57 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Monitor_Sip_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Monitor_Sip_Tests.robot @@ -20,7 +20,7 @@ SecurityPolicy-Monitor-SIP-00001 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test106 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -40,7 +40,7 @@ SecurityPolicy-Monitor-SIP-00001-1 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test10 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_TO userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -65,7 +65,7 @@ SecurityPolicy-Monitor-SIP-00001-2 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test108 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -91,7 +91,7 @@ SecurityPolicy-Monitor-SIP-00001-3 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test12 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_TO userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -117,7 +117,7 @@ SecurityPolicy-Monitor-SIP-00001-4 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test110 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -142,7 +142,7 @@ SecurityPolicy-Monitor-SIP-00001-5 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=test14 ${rescode} ${object_Account_Id1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_TO userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-00001 policyType=tsg_security policyDesc=autotest action=monitor source=${object_Ip_Id}|TSG_SECURITY_SOURCE_ADDR destination=${object_Ip_Id1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION userRegion={"protocol":"SIP"} isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -296,7 +296,7 @@ SecurityPolicy-Monitor-SIP-000011 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount} ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000011 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} filterList=${object_Account_Id}|TSG_FIELD_SIP_FROM isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000011 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} filterList=${object_Account_Id}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -310,7 +310,7 @@ SecurityPolicy-Monitor-SIP-000012 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount} ${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000012 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} filterList=${object_Account_Id}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000012 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} filterList=${object_Account_Id}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -332,7 +332,7 @@ SecurityPolicy-Monitor-SIP-000013 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount1} ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000013 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000013 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} destination=${objectId}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -361,7 +361,7 @@ SecurityPolicy-Monitor-SIP-000014 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=${sipAccount1} ${rescode} ${object_Account_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000014 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO isValid=${1} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000014 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} source=${objectId}|TSG_SECURITY_SOURCE_ADDR destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${1} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} @@ -403,7 +403,7 @@ SecurityPolicy-Monitor-SIP-000016 ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=*12voi ${rescode} ${object_Account_Id6} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000016 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} filterList=${object_Account_Id1}|TSG_FIELD_SIP_FROM,${object_Account_Id2}|TSG_FIELD_SIP_TO,${object_Account_Id3}|TSG_FIELD_SIP_FROM,${object_Account_Id4}|TSG_FIELD_SIP_TO,${object_Account_Id5}|TSG_FIELD_SIP_FROM,${object_Account_Id6}|TSG_FIELD_SIP_TO isValid=${0} appIdObjects=${SIP_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SIP-000016 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SIP"} filterList=${object_Account_Id1}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id2}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION,${object_Account_Id3}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id4}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION,${object_Account_Id5}|TSG_FIELD_SIP_ORIGINATOR_DESCRIPTION,${object_Account_Id6}|TSG_FIELD_SIP_RESPONDER_DESCRIPTION isValid=${0} appIdObjects=${SIP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} diff --git a/01-TestCase/tsg_adc/multi_step/a_Redirect_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Redirect_Tests.robot index 52db2d0..e75e420 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Redirect_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Redirect_Tests.robot @@ -317,7 +317,7 @@ Proxy-Policy-redirect-00011 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=newsite/business/bank/tzyh_ywjs/ ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} - Comment 创建请求头 + Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} Comment Comment 创建拦截策略 diff --git a/01-TestCase/tsg_adc/multi_step/a_Replace_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Replace_Tests.robot index d3c3196..7dcc58d 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Replace_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Replace_Tests.robot @@ -226,10 +226,10 @@ Proxy-Policy-replace-00008 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=ghzq/index.html ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} - Comment 创建请求头 + Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*html|Content-Type ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} - Comment 创建请求头2 + Comment 创建应答头2 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type ${rescode} ${objectId3} AddObject2 ${1} ${objectDict} Comment Comment 创建拦截策略 @@ -288,7 +288,7 @@ Proxy-Policy-replace-00010 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} - Comment 创建请求头 + Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=testpolicyreplace_0010|Content-Type ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} Comment Comment 创建拦截策略 @@ -317,7 +317,7 @@ Proxy-Policy-replace-00011 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=products/au/ ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} - Comment 创建请求头 + Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} Comment Comment 创建拦截策略 diff --git a/01-TestCase/tsg_adc/multi_step/b_Allow_Sip.robot b/01-TestCase/tsg_adc/multi_step/b_Allow_Sip.robot index dc791b4..13535cc 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Allow_Sip.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Allow_Sip.robot @@ -18,7 +18,8 @@ SecurityPolicy-Allow-SIP-00005-1 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg2.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} + Write sipp -sf uas.xml -inf reg2.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Write sipp -sf uas.xml -inf reg2.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -26,7 +27,8 @@ SecurityPolicy-Allow-SIP-00005-1 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg1.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test3 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 001.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test3 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 001.log + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/001.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -37,7 +39,8 @@ SecurityPolicy-Allow-SIP-00005-2 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg3.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} + Write sipp -sf uas.xml -inf reg3.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Write sipp -sf uas.xml -inf reg3.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -45,7 +48,8 @@ SecurityPolicy-Allow-SIP-00005-2 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg101.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test4 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 002.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test4 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 002.log + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/002.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -56,7 +60,8 @@ SecurityPolicy-Allow-SIP-00005-3 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg4.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} + Write sipp -sf uas.xml -inf reg4.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Write sipp -sf uas.xml -inf reg4.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -64,7 +69,8 @@ SecurityPolicy-Allow-SIP-00005-3 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg102.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test5 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 003.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test5 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 003.log + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/003.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -75,7 +81,8 @@ SecurityPolicy-Allow-SIP-00005-4 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg5.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} + Write sipp -sf uas.xml -inf reg5.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Write sipp -sf uas.xml -inf reg5.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -83,7 +90,8 @@ SecurityPolicy-Allow-SIP-00005-4 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg103.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test6 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 004.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test6 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 004.log + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/004.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -94,7 +102,8 @@ SecurityPolicy-Allow-SIP-00005-5 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg6.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} + Write sipp -sf uas.xml -inf reg6.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Write sipp -sf uas.xml -inf reg6.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -102,7 +111,8 @@ SecurityPolicy-Allow-SIP-00005-5 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg104.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test7 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 005.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test7 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 005.log + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/005.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -113,7 +123,8 @@ SecurityPolicy-Allow-SIP-00005-6 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg7.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} + Write sipp -sf uas.xml -inf reg7.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Write sipp -sf uas.xml -inf reg7.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -121,7 +132,8 @@ SecurityPolicy-Allow-SIP-00005-6 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg105.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test8 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 006.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test8 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 006.log + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/006.log ${res} Read delay=5s Should Contain ${res} 404 Not here diff --git a/01-TestCase/tsg_adc/multi_step/b_Allow_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Allow_Tests.robot index 0a53999..c5e9e4f 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Allow_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Allow_Tests.robot @@ -65,8 +65,6 @@ Proxy-Policy-allow-00003 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003_3.bat ... ELSE set variable curl -kv https://lunar.pw/ - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003_3.bat - ... ELSE set variable curl -kv https://lunar.pw/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List Лунный календарь Tango Secure Gateway CA ... ELSE Create List МАРТА Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} @@ -139,7 +137,7 @@ Proxy-Policy-allow-00010 Proxy-Policy-allow-00011 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00011.bat - ... ELSE set variable curl http://www.chinastock.com.cn/yhwz/investbank/index.shtml + ... ELSE set variable curl http://www.chinastock.com.cn/newsite/cgs-services/investBank.html ${stringlist} run keyword if '${systemType}'=='Windows' Create List 中国银河证券 ... ELSE Create List 中国银河证券 ${rescode} SystemCommands ${commandstr} ${stringlist} @@ -148,7 +146,7 @@ Proxy-Policy-allow-00011 log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00011.bat - ... ELSE set variable curl http://www.chinastock.com.cn/yhwz/investbank/index.shtml + ... ELSE set variable curl http://www.chinastock.com.cn/newsite/cgs-services/investBank.html ${stringlist} run keyword if '${systemType}'=='Windows' Create List 中国银河证券 ... ELSE Create List 中国银河证券 ${rescode} SystemCommands ${commandstr} ${stringlist} diff --git a/01-TestCase/tsg_adc/multi_step/b_BAllow_Http_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_BAllow_Http_Tests_Verify.robot index 0b3cea9..7f7584a 100644 --- a/01-TestCase/tsg_adc/multi_step/b_BAllow_Http_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_BAllow_Http_Tests_Verify.robot @@ -61,7 +61,7 @@ SecurityPolicy-Allow-Http-00001 SecurityPolicy-Allow-Http-00002 #新增策略验证 #创建attributes中的字典 - ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.xiang5.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.xiang5.com/"} ${qname_fqdn_id} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.xiang5.com"} ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} diff --git a/01-TestCase/tsg_adc/multi_step/b_BAllow_Ssl_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_BAllow_Ssl_Tests_Verify.robot index 35f13a7..285f199 100644 --- a/01-TestCase/tsg_adc/multi_step/b_BAllow_Ssl_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_BAllow_Ssl_Tests_Verify.robot @@ -35,7 +35,7 @@ SecurityPolicy-Allow-Ssl-00001 #新增策略验证 #创建attributes中的字典 ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "homebank.kz"} - ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} @@ -61,7 +61,7 @@ SecurityPolicy-Allow-Ssl-00002 #新增策略验证 #创建attributes中的字典 ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "homebank.kz"} - ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} diff --git a/01-TestCase/tsg_adc/multi_step/b_BAllow_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_BAllow_Tests_Verify.robot index ece1548..a975b56 100644 --- a/01-TestCase/tsg_adc/multi_step/b_BAllow_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_BAllow_Tests_Verify.robot @@ -315,7 +315,7 @@ Proxy-Policy-allow-000011 #新增策略验证 #创建attributes中的字典 ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.chinastock.com.cn"} - ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.chinastock.com.cn/yhwz/investbank/index.shtml"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.chinastock.com.cn/newsite/cgs-services/investBank.html"} ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot index 7908bd4..1fb6455 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot @@ -85,6 +85,7 @@ SecurityPolicy-Deny-Http-00004 ${stringlist} run keyword if '${systemType}'=='Windows' Create List yyyyy ... ELSE Create List yyyyy ${rescode} SystemCommands ${commandstr} ${stringlist} + SecurityPolicy-Deny-Http-00005 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00005.bat @@ -131,6 +132,7 @@ SecurityPolicy-Deny-Http-00008 ${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out ... ELSE Create List Connection reset by peer ${rescode} SystemCommands ${commandstr} ${stringlist} + SecurityPolicy-Deny-Http-00009 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00009.bat @@ -156,6 +158,7 @@ SecurityPolicy-Deny-Http-00010 ${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out ... ELSE Create List Connection reset by peer ${rescode} SystemCommands ${commandstr} ${stringlist} + SecurityPolicy-Deny-Http-00011 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00011.bat @@ -252,6 +255,7 @@ SecurityPolicy-Deny-Http-00015 ${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out ... ELSE Create List timed out ${rescode} SystemCommands ${commandstr} ${stringlist} + SecurityPolicy-Deny-Http-00016 Comment 策略验证时再打开策略 ${policyDict} Create Dictionary policyId=${deny_http_policyId15} policyName=SecurityPolicy-Deny-Http-00016 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId23}|TSG_FIELD_HTTP_HOST,${deny_http_objectId24}|TSG_FIELD_HTTP_URL,${deny_http_objectId25}|TSG_FIELD_HTTP_REQ_HDR,${deny_http_objectId26}|TSG_FIELD_HTTP_RES_HDR,${deny_http_objectId27}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID} diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Rtp.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Rtp.robot index 5a61d56..0d3378b 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Rtp.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Rtp.robot @@ -20,12 +20,14 @@ SecurityPolicy-Allow-RTP-00005-1 Write sipp -sf reg.xml -inf reg18.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 sleep 10 Write sipp -sf uas.xml -inf reg18.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 + Write sipp -sf uas.xml -inf reg18.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg116.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 - Write sipp -sf uac_1.xml -d 10000 -s test19 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -denySiperror_file denySiperror005.log + Write sipp -sf uac_1.xml -d 10000 -s test19 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file denyRtperror005.log + Write sipp -sf uac_1.xml -d 10000 -s test19 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file denyRtperror005.log sleep 10 Write grep "480" /home/yyq/sipp-3.6.0/data/uac/denySiperror005.log ${res} Read delay=5s @@ -39,12 +41,14 @@ SecurityPolicy-Allow-RTP-00005-2 Write sipp -sf reg.xml -inf reg19.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 sleep 10 Write sipp -sf uas.xml -inf reg19.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 + Write sipp -sf uas.xml -inf reg19.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg117.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 - Write sipp -sf uac_1.xml -d 10000 -s test20 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -denySiperror_file denySiperror006.log + Write sipp -sf uac_1.xml -d 10000 -s test20 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file denyRtperror006.log + Write sipp -sf uac_1.xml -d 10000 -s test20 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file denyRtperror006.log sleep 10 Write grep "408" /home/yyq/sipp-3.6.0/data/uac/denySiperror006.log ${res} Read delay=5s diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Sip.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Sip_Tests.robot similarity index 79% rename from 01-TestCase/tsg_adc/multi_step/b_Deny_Sip.robot rename to 01-TestCase/tsg_adc/multi_step/b_Deny_Sip_Tests.robot index 0ce59d8..2487e74 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Sip.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Sip_Tests.robot @@ -18,15 +18,16 @@ SecurityPolicy-Deny-SIP-00005-1 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg14.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg14.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg112.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 - Write sipp -sf uac_1.xml -d 10000 -s test15 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -denySiperror_file 007.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test15 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 007.log + Write sipp -sf uac_1.xml -d 10000 -s test15 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 007.log + sleep ${policyModifySleepSeconds} Write grep "480" /home/yyq/sipp-3.6.0/data/uac/007.log ${res} Read delay=5s Should Contain ${res} 480 Temporarily Unavailable @@ -40,15 +41,16 @@ SecurityPolicy-Deny-SIP-00005-2 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg15.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg15.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg113.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 - Write sipp -sf uac_1.xml -d 10000 -s test16 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -denySiperror_file 008.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test16 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 008.log + Write sipp -sf uac_1.xml -d 10000 -s test16 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 008.log + sleep ${policyModifySleepSeconds} Write grep "480" /home/yyq/sipp-3.6.0/data/uac/008.log ${res} Read delay=5s Should Contain ${res} 500 Server Internal denySiperror @@ -59,15 +61,16 @@ SecurityPolicy-Deny-SIP-00005-3 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg16.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg16.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg114.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 - Write sipp -sf uac_1.xml -d 10000 -s test17 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -denySiperror_file 009.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test17 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 009.log + Write sipp -sf uac_1.xml -d 10000 -s test17 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 009.log + sleep ${policyModifySleepSeconds} Write grep "408" /home/yyq/sipp-3.6.0/data/uac/009.log ${res} Read delay=5s Should Contain ${res} 408 Request Timeout @@ -78,15 +81,16 @@ SecurityPolicy-Deny-SIP-00005-4 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg17.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg17.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg115.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 - Write sipp -sf uac_1.xml -d 10000 -s test18 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -denySiperror_file 010.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test18 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 010.log + Write sipp -sf uac_1.xml -d 10000 -s test18 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 010.log + sleep ${policyModifySleepSeconds} Write grep "480" /home/yyq/sipp-3.6.0/data/uac/010.log ${res} Read delay=5s Should Contain ${res} 480 Temporarily Unavailable @@ -100,15 +104,16 @@ SecurityPolicy-Deny-SIP-00005-5 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg18.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg18.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg116.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 - Write sipp -sf uac_1.xml -d 10000 -s test19 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -denySiperror_file 011.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test19 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 011.log + Write sipp -sf uac_1.xml -d 10000 -s test19 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 011.log + sleep ${policyModifySleepSeconds} Write grep "480" /home/yyq/sipp-3.6.0/data/uac/011.log ${res} Read delay=5s Should Contain ${res} 500 Server Internal denySiperror @@ -119,15 +124,16 @@ SecurityPolicy-Deny-SIP-00005-6 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg19.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg19.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg117.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 - Write sipp -sf uac_1.xml -d 10000 -s test20 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -denySiperror_file 012.log - sleep 10 + Write sipp -sf uac_1.xml -d 10000 -s test20 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 012.log + Write sipp -sf uac_1.xml -d 10000 -s test20 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 012.log + sleep ${policyModifySleepSeconds} Write grep "408" /home/yyq/sipp-3.6.0/data/uac/012.log ${res} Read delay=5s Should Contain ${res} 408 Request Timeout diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Ssl_Tests.robot index e8027d6..7c7cb6e 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Ssl_Tests.robot @@ -79,6 +79,7 @@ SecurityPolicy-Deny-Ssl-00004 ${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out ... ELSE Create List timed out ${rescode} SystemCommands ${commandstr} ${stringlist} + SecurityPolicy-Deny-Ssl-00005 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00005.bat @@ -97,5 +98,3 @@ SecurityPolicy-Deny-Ssl-00005 ... ELSE Create List timed out ${rescode} SystemCommands ${commandstr} ${stringlist} -SecurityPolicy-Deny-Ssl-00006 - Comment diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Dns_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Dns_Tests_Verify.robot new file mode 100644 index 0000000..24a43b5 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Dns_Tests_Verify.robot @@ -0,0 +1,82 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Variables *** +${policyIds} ${EMPTY} +${objectids} ${EMPTY} + +*** Test Cases *** +SecurityPolicy-Deny-Dns-00001 + # 新增策略验证 + # 创建attributes中的字典 + ${qname_fqdn_id1} Create Dictionary attributeType=string attributeName=qname appId=103 appName=dns protocol=dns attributeValue={"string": "www.facebook.com"} + ${qname_fqdn_id2} Create Dictionary attributeType=string attributeName=qname appId=103 appName=dns protocol=dns attributeValue={"string": "rutube.ru"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string":"103" } + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "252.252.252.252","port": "443","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${qname_fqdn_id1} ${qname_fqdn_id2} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${deny_dns_objectId} ${deny_dns_policyId} + ${testType} Evaluate type($objectid_verify) + sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + #${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Dns-00002 + # 新增策略验证 + # 创建attributes中的字典 + ${qname_fqdn_id} Create Dictionary attributeType=string attributeName=qname appId=103 appName=dns protocol=dns attributeValue={"string": "www.arctictrucks.ru"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string":"103" } + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "252.252.252.252","port": "443","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${qname_fqdn_id} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${deny_dns_objectId1} ${deny_dns_policyId1} + ${testType} Evaluate type($objectid_verify) + sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + #${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + + + diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Ftp_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Ftp_Tests_Verify.robot new file mode 100644 index 0000000..916dc56 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Ftp_Tests_Verify.robot @@ -0,0 +1,126 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Variables *** +${policyIds} ${EMPTY} +${objectids} ${EMPTY} + +*** Test Cases *** +SecurityPolicy-Deny-Ftp-00001 + # # 新增策略验证 + # 创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "192.168.40.158/123456.txt"} + ${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "123456789qwertyuiop"} + ${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip": "${testClentIP}","port": "80","tableName": "TSG_SECURITY_SOURCE_ADDR","addrType": 4,"protocol": "6"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "192.168.40.158","port": "80","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${url} ${Content} ${Account} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${deny_ftp_objectId13} ${deny_ftp_objectId14} ${deny_ftp_objectId15} ${deny_ftp_policyId} + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Ftp-00002 + # # 新增策略验证 + # 创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "192.168.40.158/test.txt"} + ${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "中文test"} + ${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip": "${testClentIP}","port": "80","tableName": "TSG_SECURITY_SOURCE_ADDR","addrType": 4,"protocol": "6"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "192.168.40.158","port": "80","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${url} ${Content} ${Account} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${deny_ftp_objectId3} ${deny_ftp_objectId4} ${deny_ftp_objectId5} ${deny_ftp_policyId1} + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Ftp-00003 + # # 新增策略验证 + # 创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "192.168.40.158/wlcsy.txt"} + ${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "中文文件内容"} + ${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip": "${testClentIP}","port": "80","tableName": "TSG_SECURITY_SOURCE_ADDR","addrType": 4,"protocol": "6"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "192.168.40.158","port": "80","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${url} ${Content} ${Account} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${deny_ftp_objectId6} ${deny_ftp_objectId7} ${deny_ftp_objectId8} ${deny_ftp_policyId2} + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Ftp-00004 + # # 新增策略验证 + # 创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "192.168.40.158/aewn.txt"} + ${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "завезенными"} + ${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip": "${testClentIP}","port": "80","tableName": "TSG_SECURITY_SOURCE_ADDR","addrType": 4,"protocol": "6"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip": "192.168.40.158","port": "80","tableName": "TSG_SECURITY_DESTINATION_ADDR","addrType": 4,"protocol": "6"} + # 合成attributes字典集 + ${attributes} Create List ${url} ${Content} ${Account} ${app_id} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${deny_ftp_objectId9} ${deny_ftp_objectId10} ${deny_ftp_objectId11} ${deny_ftp_policyId3} + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + + diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Http_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Http_Tests_Verify.robot new file mode 100644 index 0000000..8bca1e7 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Http_Tests_Verify.robot @@ -0,0 +1,411 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Variables *** +${policyIds} ${EMPTY} +${objectids} ${EMPTY} + +*** Test Cases *** +SecurityPolicy-Deny-Http-00001 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.lkong.net"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId36} ${deny_http_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00002 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "bellaircraftmuseum.org"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId1} ${deny_http_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00003 + ${url1} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.icbc.com.cn/"} + ${url2} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.ccb.com/cn/home/indexv3.html"} + ${url3} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.gotohoroscope.com/daily-horoscope.html"} + ${url4} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "government.ru/news/"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url1} ${url2} ${url3} ${url4} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId2} ${deny_http_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00004 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.tsutmb.ru/sveden"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "afsfssfMozilla/5.0afsfsdafsafs","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId37} ${deny_http_objectId38} ${deny_http_policyId3} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00005 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.abchina.com/cn/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId5} ${deny_http_objectId6} ${deny_http_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00006 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "egypt.travel/ru"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId7} ${deny_http_objectId8} ${deny_http_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00007 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.gw.com.cn/download.shtml"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId9} ${deny_http_objectId10} ${deny_http_policyId6} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00008 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.cmbchina.com/CmbQuesInfo/index.aspx"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "utf-8aabnna","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId11} ${deny_http_objectId39} ${deny_http_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00009 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.skycn.com/soft/bangongruanjian.html"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId13} ${deny_http_objectId14} ${deny_http_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00010 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.avaxsearch.com/tangkas/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "utf-8aabnna","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId11} ${deny_http_objectId39} ${deny_http_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00011 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.finestquotes.com/quotesbyauthors.php"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId17} ${deny_http_objectId18} ${deny_http_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +SecurityPolicy-Deny-Http-00015 + #新增策略验证 + #创建attributes中的字典 + ${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "华彤集团官网"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${res_body} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId41} ${deny_http_policyId14} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00017 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "smspunch.net"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "smspunch.net/send-free-sms.aspx"} + ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "_ym_isad=2","district": "Cookie"} + ${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "NET_SessionId","district": "Set-Cookie"} + ${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Cell No"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_body} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId28} ${deny_http_objectId29} ${deny_http_objectId30} ${deny_http_objectId31} ${deny_http_objectId32} ${deny_http_policyId16} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Http-00018 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.hebbank.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"192.168.50.18","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_http_objectId33} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId34} ${deny_http_policyId17} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Mail_Tests.robot new file mode 100644 index 0000000..b80b543 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Mail_Tests.robot @@ -0,0 +1,409 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Test Cases *** +SecurityPolicy-Deny-Mail-00001 + # # 新增策略验证 + # 创建attributes中的字典 + + ${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"Простопорно"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${content_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId33} ${deny_mail_policyId} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00002 + # # 新增策略验证 + # 创建attributes中的字典 + ${att_content_id} Create Dictionary attributeType=string attributeName=att_content appId=110 appName=mail protocol=mail attributeValue={"string": "姬巍川测试文件内容Простопорно"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${att_content_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId34} ${deny_mail_policyId1} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00003 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "ПОРНОВИДЕО"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId35} ${deny_mail_objectId36} ${deny_mail_policyId2} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00004 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "明天周末"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId4} ${deny_mail_objectId5} ${deny_mail_policyId3} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00005 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "1234567890"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId6} ${deny_mail_objectId7} ${deny_mail_policyId4} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00006 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "afternoon"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId8} ${deny_mail_objectId9} ${deny_mail_policyId5} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00007 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "Смотретьфильмыонлай"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId10} ${deny_mail_objectId11} ${deny_mail_policyId6} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00008 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "zxcvbnm"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId12} ${deny_mail_objectId13} ${deny_mail_policyId7} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00009 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "又是新的一天"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId14} ${deny_mail_objectId15} ${deny_mail_policyId8} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00010 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "tomorrow"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId16} ${deny_mail_objectId17} ${deny_mail_policyId9} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00011 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "邮件发送失败"} + ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId18} ${deny_mail_objectId19} ${deny_mail_policyId10} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00012 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "Онлайнфильмывхоро"} + ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId20} ${deny_mail_objectId21} ${deny_mail_policyId11} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00013 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "asdfghjkl"} + ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId22} ${deny_mail_objectId23} ${deny_mail_policyId12} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00014 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "马上就要下班了"} + ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId24} ${deny_mail_objectId25} ${deny_mail_policyId13} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00015 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "人生路远及时行乐"} + ${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"string": "good"} + ${att_content_id} Create Dictionary attributeType=string attributeName=att_content appId=110 appName=mail protocol=mail attributeValue={"string": "Простопорно"} + ${account_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${content_id} ${att_content_id} ${from_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${account_id} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId26} ${deny_mail_objectId27} ${deny_mail_objectId28} ${deny_mail_objectId29} ${deny_mail_objectId30} ${deny_mail_objectId31} ${deny_mail_policyId14} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + + + diff --git a/01-TestCase/tsg_adc/multi_step/b_EDeny_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_EDeny_Ssl_Tests.robot new file mode 100644 index 0000000..2e0d01a --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_EDeny_Ssl_Tests.robot @@ -0,0 +1,136 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Test Cases *** +SecurityPolicy-Deny-Ssl-00001 + #新增策略验证 + #创建attributes中的字典 + ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.cxwl.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_ssl_objectId4} ${deny_ssl_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Ssl-00002 + #新增策略验证 + #创建attributes中的字典 + ${sni1} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "amesweb.info"} + ${sni2} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "rentar.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni2} ${sni1} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_ssl_objectId1} ${deny_ssl_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Ssl-00003 + #新增策略验证 + #创建attributes中的字典 + ${sni1} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "austinama.org"} + ${sni2} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.carambola.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni2} ${sni1} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_ssl_objectId2} ${deny_ssl_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Ssl-00004 + #新增策略验证 + #创建attributes中的字典 + ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.prlib.ru"} + ${cn} Create Dictionary attributeType=string attributeName=cn appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.prlib.ru"} + ${san} Create Dictionary attributeType=string attributeName=san appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.prlib.ru"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni} ${cn} ${san} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_ssl_objectId3} ${deny_ssl_objectId6} ${deny_ssl_policyId3} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true diff --git a/01-TestCase/tsg_adc/multi_step/b_IHijack_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_IHijack_Tests_Verify.robot index aaad07d..77508e6 100644 --- a/01-TestCase/tsg_adc/multi_step/b_IHijack_Tests_Verify.robot +++ b/01-TestCase/tsg_adc/multi_step/b_IHijack_Tests_Verify.robot @@ -152,7 +152,7 @@ Proxy-Policy-hijack-00006 #创建attributes中的字典 ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.dcdapp.com"} ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.dcdapp.com/?zt=dongchediapp"} - ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "hahahahsfeSafari/537.36","district": "User-Agent"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "AppleWebKit","district": "User-Agent"} ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} @@ -235,7 +235,7 @@ Proxy-Policy-hijack-00009 #创建attributes中的字典 ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "quote.hexun.com"} ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "quote.hexun.com/default.htm#forex"} - ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html; charset=utf-8","district": "Content-Type"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} @@ -362,21 +362,21 @@ Proxy-Policy-hijack-000014 ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "charset=text","district": "Content-Type"} ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0fsfwhh","district": "User-Agent"} ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "__stripe_sidafdsvxvx","district": "Cookie"} - ${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "afsf123Domain=.orbitz.com","district": "Set-Cookie"} - ${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Proxydeny001502"} + ${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "domain=travelzoo.com","district": "Set-Cookie"} ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} # 合成attributes字典集 - ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_body} + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_hdr_ct} ${req_hdr_ua} ${verifySession} Create Dictionary attributes=${attributes} ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} log ${verifyList} ${rescode} ${resData} VerifyPolicies ${verifyList} # 打印检查结果 ${objectid_verify} Set Variable ${testClentIpId} - ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId41} ${deny_objectId42} ${deny_objectId43} ${deny_objectId44} ${deny_objectId45} ${deny_policyId16} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${hijack_objectId33} ${hijack_objectId34} ${hijack_objectId35} + ... ${hijack_objectId36} ${hijack_objectId37} ${hijack_objectId38} ${hijack_policyId13} # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 log ${objectid_verify} ${testType} Evaluate type($objectid_verify) diff --git a/01-TestCase/tsg_adc/multi_step/b_Intercept_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Intercept_Http_Tests.robot index 1736465..83d82b4 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Intercept_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Intercept_Http_Tests.robot @@ -27,6 +27,7 @@ SecurityPolicy-Intercept-Http-00001 ${stringlist} run keyword if '${systemType}'=='Windows' Create List 玉米 ... ELSE Create List 玉米 ${rescode} SystemCommands ${commandstr} ${stringlist} + SecurityPolicy-Intercept-Http-00002 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Intercept_HTTP_00002.bat diff --git a/01-TestCase/tsg_adc/multi_step/b_JInsert_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_JInsert_Tests.robot new file mode 100644 index 0000000..bc367a1 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_JInsert_Tests.robot @@ -0,0 +1,374 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Variables *** +${policyIds} ${EMPTY} +${objectids} ${EMPTY} + +*** Test Cases *** +Proxy-Policy-insert-00002 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.meilleurmobile.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.meilleurmobile.com/"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId1} ${insert_objectId40} ${insert_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00003 + #新增策略验证 + #创建attributes中的字典 + ${fqdn1} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "scottsdalepublicart.org"} + ${fqdn2} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.troop508.org"} + ${fqdn3} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "dreamdayoncapecod.wordpress.com"} + ${fqdn4} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.doctorpoo.net"} + ${url1} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "scottsdalepublicart.org/"} + ${url2} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.troop508.org/"} + ${url3} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "dreamdayoncapecod.wordpress.com/"} + ${url4} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.doctorpoo.net/"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn1} ${fqdn2} ${fqdn3} ${fqdn4} ${url1} ${url2} ${url3} ${url4} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId2} ${insert_objectId3} ${insert_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00004 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.viator.com/login?login_redirect=%2Faccount%2Fbookings"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "afsfssfMozilla/5.0afsfsdafsafs","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId43} ${insert_objectId44} ${insert_policyId3} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00005 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "matadornetwork.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "matadornetwork.com/destinations/north-america/united-states/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId7} ${insert_objectId8} ${insert_objectId9} ${insert_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00006 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.farecompare.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.farecompare.com/hotels/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "safrisyAppleWebKit,"district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId10} ${insert_objectId11} ${insert_objectId12} ${insert_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00007 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.tripit.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.tripit.com/web"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "hahahahsfeSafari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId13} ${insert_objectId14} ${insert_objectId15} ${insert_policyId6} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00008 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.waikikibeachwalk.com/Shops.htm"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "utf-8aabnna","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId17} ${insert_objectId45} ${insert_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00009 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.world-guides.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.world-guides.com/north-america/usa/nevada/las-vegas/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html; charset=utf-8","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId19} ${insert_objectId20} ${insert_objectId21} ${insert_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00010 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "news.cnstock.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "news.cnstock.com/kcb"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId22} ${insert_objectId23} ${insert_objectId24} ${insert_policyId9} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00011 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "otc.newone.com.cn"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "otc.newone.com.cn/cwyw"} + ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "textobj","district": "Cookie"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId25} ${insert_objectId26} ${insert_objectId27} ${insert_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00012 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "petapixel.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "petapixel.com/topic/equipment/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "1323saltkeyafsfs","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId28} ${insert_objectId29} ${insert_objectId30} ${insert_policyId11} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-insert-00013 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.intervalworld.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.intervalworld.com/web/my/home"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "charset=text","district": "Content-Type"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0fsfwhh","district": "User-Agent"} + ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "__stripe_sidafdsvxvx","district": "Cookie"} + ${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "Domain=.intervalworld.com","district": "Set-Cookie"} + ${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Proxydeny001502"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_body} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${insert_objectId33} ${insert_objectId34} ${insert_objectId35} ${insert_objectId36} ${insert_objectId37} ${insert_policyId13} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true diff --git a/01-TestCase/tsg_adc/multi_step/b_JIntercept_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_JIntercept_Http_Tests.robot new file mode 100644 index 0000000..b0d26ae --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_JIntercept_Http_Tests.robot @@ -0,0 +1,81 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Test Cases *** +SecurityPolicy-Intercept-Http-00001 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.yumi.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${intercept_http_objectId1} ${intercept_http_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Intercept-Http-00002 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "mbzponton.org"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${intercept_http_objectId6} ${intercept_http_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + diff --git a/01-TestCase/tsg_adc/multi_step/b_JIntercept_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_JIntercept_Ssl_Tests.robot new file mode 100644 index 0000000..1fab796 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_JIntercept_Ssl_Tests.robot @@ -0,0 +1,82 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Test Cases *** + +SecurityPolicy-Intercept-Ssl-00002 + #新增策略验证 + #创建attributes中的字典 + ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "fenopy.se"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${intercept_ssl_objectId2} ${intercept_ssl_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Intercept-Http-00003 + #新增策略验证 + #创建attributes中的字典 + ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.xs8.cn"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${intercept_ssl_objectId4} ${intercept_ssl_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + diff --git a/01-TestCase/tsg_adc/multi_step/b_Monitor_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Monitor_Http_Tests.robot index 40309a2..65cf4e3 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Monitor_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Monitor_Http_Tests.robot @@ -79,6 +79,7 @@ SecurityPolicy-Monitor-Http-00004 ${stringlist} run keyword if '${systemType}'=='Windows' Create List Motivational ... ELSE Create List Motivational ${rescode} SystemCommands ${commandstr} ${stringlist} + SecurityPolicy-Monitor-Http-00005 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00005.bat @@ -140,8 +141,8 @@ SecurityPolicy-Monitor-Http-00011 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00011.bat ... ELSE set variable curl http://emi-ors.com/about/ - ${stringlist} run keyword if '${systemType}'=='Windows' Create List Emi-Ors - ... ELSE Create List Emi-Ors + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 404 + ... ELSE Create List 404 ${rescode} SystemCommands ${commandstr} ${stringlist} SecurityPolicy-Monitor-Http-00012 diff --git a/01-TestCase/tsg_adc/multi_step/b_Monitor_Sip.robot b/01-TestCase/tsg_adc/multi_step/b_Monitor_Sip.robot index ae7bf88..c47caa0 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Monitor_Sip.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Monitor_Sip.robot @@ -18,7 +18,7 @@ SecurityPolicy-Monitor-SIP-00005-1 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg8.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg8.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -26,7 +26,7 @@ SecurityPolicy-Monitor-SIP-00005-1 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg106.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test9 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 013.log - sleep 10 + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/013.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -37,7 +37,7 @@ SecurityPolicy-Monitor-SIP-00005-2 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg9.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg9.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -45,7 +45,7 @@ SecurityPolicy-Monitor-SIP-00005-2 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg107.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test10 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 014.log - sleep 10 + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/014.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -56,7 +56,7 @@ SecurityPolicy-Monitor-SIP-00005-3 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg10.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg10.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -64,7 +64,7 @@ SecurityPolicy-Monitor-SIP-00005-3 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg108.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test11 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 015.log - sleep 10 + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/015.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -75,7 +75,7 @@ SecurityPolicy-Monitor-SIP-00005-4 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg11.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg11.csv -p 6068 -i ${voipListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -83,7 +83,7 @@ SecurityPolicy-Monitor-SIP-00005-4 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg109.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test12 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 016.log - sleep 10 + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/016.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -94,7 +94,7 @@ SecurityPolicy-Monitor-SIP-00005-5 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg12.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg12.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -102,7 +102,7 @@ SecurityPolicy-Monitor-SIP-00005-5 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg110.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test13 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 017.log - sleep 10 + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/017.log ${res} Read delay=5s Should Contain ${res} 404 Not here @@ -113,7 +113,7 @@ SecurityPolicy-Monitor-SIP-00005-6 SSHLibrary.Login root Xxg-PUB<>90 Write cd /home/yyq/sipp-3.6.0/data Write sipp -sf reg.xml -inf reg13.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 - sleep 10 + sleep ${policyModifySleepSeconds} Write sipp -sf uas.xml -inf reg13.csv -p 6068 -i ${voipOutListenIp} -m 50 192.168.40.158:5060 Open Connection ${voipCallIp} @@ -121,7 +121,7 @@ SecurityPolicy-Monitor-SIP-00005-6 Write cd /home/yyq/sipp-3.6.0/data/uac Write sipp -sf reg.xml -inf reg111.csv -p 6067 -i ${voipCallIp} -m 50 192.168.40.158:5060 Write sipp -sf uac_1.xml -d 10000 -s test14 192.168.40.158 -i ${voipCallIp} -r 1 -m 5 -trace_err -error_file 018.log - sleep 10 + sleep ${policyModifySleepSeconds} Write grep "404" /home/yyq/sipp-3.6.0/data/uac/018.log ${res} Read delay=5s Should Contain ${res} 404 Not here diff --git a/01-TestCase/tsg_adc/multi_step/b_Monitor_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Monitor_Ssl_Tests.robot index 05a3c7d..1e31739 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Monitor_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Monitor_Ssl_Tests.robot @@ -60,10 +60,14 @@ SecurityPolicy-Monitor-Ssl-00004 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_SSL_00004.bat ... ELSE set variable curl https://www.iqiyi.com/ - ${stringlist} run keyword if '${systemType}'=='Windows' Create List 在线视频网站 + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Timed out ... ELSE Create List 在线视频网站 ${rescode} SystemCommands ${commandstr} ${stringlist} Comment 改变监控策略 ${policyDict} Create Dictionary policyId=${monitor_ssl_policyId3} policyName=SecurityPolicy-Monitor-Ssl-00004-1 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SSL"} filterList=${monitor_ssl_objectId6}|TSG_FIELD_SSL_SAN,${monitor_ssl_objectId6}|TSG_FIELD_SSL_SNI,${monitor_ssl_objectId6}|TSG_FIELD_SSL_CN isValid=${1} appIdObjects=${SSL_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_SSL_00004.bat + ... ELSE set variable curl https://www.iqiyi.com/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Timed out + ... ELSE Create List 在线视频网站 \ No newline at end of file diff --git a/01-TestCase/tsg_adc/multi_step/b_Monitor_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Monitor_Tests.robot index ecde723..6ab4891 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Monitor_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Monitor_Tests.robot @@ -96,7 +96,7 @@ Proxy-Policy-Monitor-00004 Proxy-Policy-Monitor-00005 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00005.bat - ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://americantesol.com/tesol-register.html + ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://www.mgtv.com/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List 高清视频在线观看 Tango Secure Gateway CA ... ELSE Create List 高清视频在线观看 Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} @@ -104,7 +104,7 @@ Proxy-Policy-Monitor-00005 Proxy-Policy-Monitor-00006 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00006.bat - ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.playgroundsessions.com/about/software-features + ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://v.ifeng.com/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List 凤凰视频 Tango Secure Gateway CA ... ELSE Create List PP视频 Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} @@ -207,7 +207,7 @@ Proxy-Policy-Monitor-00014 sleep 6 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014_1.bat - ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action + ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com:180/go ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset ... ELSE Create List Connection was reset ${rescode} SystemCommands ${commandstr} ${stringlist} diff --git a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Http_Tests.robot new file mode 100644 index 0000000..6446578 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Http_Tests.robot @@ -0,0 +1,437 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Variables *** +${policyIds} ${EMPTY} +${objectids} ${EMPTY} + +*** Test Cases *** +SecurityPolicy-Monitor-Http-00001 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "nerdreactor.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId33} ${monitor_http_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00002 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "fitzhughmedia.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} 144 ${monitor_http_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00003 + ${url1} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.hkbchina.com/portal/zh_CN/home/index.html"} + ${url2} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.nuk-baby.ru/ru_ru/kollekcii/disney-mickey-mouse.html"} + ${url3} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "davidsmithhunting.com/"} + ${url4} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "crosswordheaven.com/search"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url1} ${url2} ${url3} ${url4} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId2} ${monitor_http_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00004 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.inspirational-quotes.info/motivational-quotes.html"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "afsfssfMozilla/5.0afsfsdafsafs","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId35} ${monitor_http_objectId36} ${monitor_http_policyId3} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00005 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.chinahr.com/home/bj/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId5} ${monitor_http_objectId6} ${monitor_http_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00006 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "ww1.dollshouseforum.com/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId7} ${monitor_http_objectId8} ${monitor_http_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00007 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.herocraft.com/games/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId9} ${monitor_http_objectId10} ${monitor_http_policyId6} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00008 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.tccb.com.cn/grjr/index.shtml"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "html/text","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId11} ${monitor_http_objectId37} ${monitor_http_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00009 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.athinline.org/facts"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html; charset=utf-8","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId13} ${monitor_http_objectId14} ${monitor_http_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00010 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "videogix.com/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "html","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId15} ${monitor_http_objectId16} ${monitor_http_policyId9} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00011 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "emi-ors.com/about/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId17} ${monitor_http_objectId18} ${monitor_http_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00012 + #新增策略验证 + #创建attributes中的字典 + ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "wingsofprey","district": "Cookie"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${req_hdr_ck} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId19} ${monitor_http_policyId11} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00013 + ${res_hdr_sc1} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "tplVer=06-18","district": "Set-Cookie"} + ${res_hdr_sc2} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "domain=bing.com","district": "Set-Cookie"} + ${res_hdr_sc3} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "domain=www.spore.com","district": "Set-Cookie"} + ${res_hdr_sc4} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "cye=beijing","district": "Set-Cookie"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${res_hdr_sc1} ${res_hdr_sc2} ${res_hdr_sc3} ${res_hdr_sc4} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId20} ${monitor_http_policyId12} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Http-00015 + #新增策略验证 + #创建attributes中的字典 + ${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "我的自选"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${res_body} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId39} ${monitor_http_policyId14} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +SecurityPolicy-Monitor-Http-00017 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.airwargame.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.airwargame.com/eng/start/"} + ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "wingsofprey","district": "Cookie"} + ${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "wingsofprey","district": "Set-Cookie"} + ${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Last news"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_body} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_http_objectId28} ${monitor_http_objectId29} ${monitor_http_objectId30} ${monitor_http_objectId31} ${monitor_http_objectId32} ${monitor_http_policyId16} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true diff --git a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Mail_Tests.robot new file mode 100644 index 0000000..d4db942 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Mail_Tests.robot @@ -0,0 +1,409 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Test Cases *** +SecurityPolicy-Deny-Mail-00001 + # # 新增策略验证 + # 创建attributes中的字典 + + ${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"zzzzzzz"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${content_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId33} ${monitor_mail_policyId} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00002 + # # 新增策略验证 + # 创建attributes中的字典 + ${att_content_id} Create Dictionary attributeType=string attributeName=att_content appId=110 appName=mail protocol=mail attributeValue={"string": "朱明明测试文件内容"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${att_content_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId34} ${monitor_mail_policyId1} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00003 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "асятся"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId35} ${monitor_mail_objectId36} ${monitor_mail_policyId2} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00004 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "后天周末"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId4} ${monitor_mail_objectId5} ${monitor_mail_policyId3} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00005 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "9876543210zxcv"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId6} ${monitor_mail_objectId7} ${monitor_mail_policyId4} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00006 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "Tomatorhahaha"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId8} ${monitor_mail_objectId9} ${monitor_mail_policyId5} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00007 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "планируете"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId10} ${monitor_mail_objectId11} ${monitor_mail_policyId6} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00008 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "asdf741852"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId12} ${monitor_mail_objectId37} ${monitor_mail_policyId7} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00009 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "马上又过一天"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId14} ${monitor_mail_objectId15} ${monitor_mail_policyId8} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00010 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "weekend"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId16} ${monitor_mail_objectId17} ${monitor_mail_policyId9} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00011 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "邮件发送成功"} + ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId18} ${monitor_mail_objectId19} ${monitor_mail_policyId10} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00012 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "ограничительным"} + ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId20} ${monitor_mail_objectId21} ${monitor_mail_policyId11} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00013 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "963258zxcvb"} + ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId22} ${monitor_mail_objectId23} ${monitor_mail_policyId12} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00014 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "一小时一天一个月"} + ${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${account_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId24} ${monitor_mail_objectId25} ${monitor_mail_policyId13} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Deny-Mail-00015 + # # 新增策略验证 + # 创建attributes中的字典 + ${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "要留清白在人间"} + ${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"string": "good"} + ${att_content_id} Create Dictionary attributeType=string attributeName=att_content appId=110 appName=mail protocol=mail attributeValue={"string": "Простопорно"} + ${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"} + ${account_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"} + # 合成attributes字典集 + ${attributes} Create List ${subject_id} ${content_id} ${att_content_id} ${from_id} ${to_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid} ${account_id} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + ${rescode} ${resData} VerifyPolicies ${verifyList} + sleep 10 + # 打印检查结果 + # 将 策略id 加入对象 id + ${objectid_verify} set variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${monitor_mail_objectId26} ${monitor_mail_objectId27} ${monitor_mail_objectId28} ${monitor_mail_objectId29} ${monitor_mail_objectId30} ${monitor_mail_objectId31} ${monitor_mail_policyId14} + #sleep 5 + # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + + + diff --git a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ssl_Tests.robot new file mode 100644 index 0000000..13202ac --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Ssl_Tests.robot @@ -0,0 +1,144 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Variables *** +${policyIds} ${EMPTY} +${objectids} ${EMPTY} + +*** Test Cases *** +SecurityPolicy-Monitor-Ssl-00001 + #新增策略验证 + #创建attributes中的字典 + ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.wego.cn"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_ssl_objectId4} ${monitor_ssl_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Ssl-00002 + #新增策略验证 + #创建attributes中的字典 + ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.keysnews.com"} + ${cn} Create Dictionary attributeType=string attributeName=cn appId=126 appName=ssl protocol=ssl attributeValue={"string": "keysnews.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni} ${cn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_ssl_objectId1} ${monitor_ssl_policyId1} ${monitor_ssl_objectId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Ssl-00003 + #新增策略验证 + #创建attributes中的字典 + ${sni1} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.academia.org"} + ${sni2} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.proisraelforever.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni2} ${sni1} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_ssl_objectId2} ${monitor_ssl_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +SecurityPolicy-Monitor-Ssl-00004 + #新增策略验证 + #创建attributes中的字典 + ${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.iqiyi.com"} + ${cn} Create Dictionary attributeType=string attributeName=cn appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.iqiyi.com"} + ${san} Create Dictionary attributeType=string attributeName=san appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.iqiyi.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni} ${cn} ${san} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_ssl_objectId6} ${monitor_ssl_policyId3} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + + + diff --git a/01-TestCase/tsg_adc/multi_step/b_NMonitor_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Tests.robot new file mode 100644 index 0000000..b557001 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_NMonitor_Tests.robot @@ -0,0 +1,306 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt +*** Test Cases *** +Proxy-Policy-Monitor-00001 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.vancl.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId47} ${monitor_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-Monitor-00002 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.parkpennies.com"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId1} ${monitor_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +Proxy-Policy-Monitor-00004 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.kumi.cn"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.kumi.cn/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "afsfssfMozilla/5.0afsfsdafsafs","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} ${fqdn} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId48} ${monitor_objectId49} ${monitor_objectId50} ${monitor_policyId3} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-Monitor-00005 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.mgtv.com/"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.mgtv.com/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId7} ${monitor_objectId8} ${monitor_objectId9} ${monitor_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-Monitor-00006 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "v.ifeng.com/"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "v.ifeng.com/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "AppleWebKit","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId10} ${monitor_objectId11} ${monitor_objectId12} ${monitor_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-Monitor-00007 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.pptv.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.pptv.com/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "hahahahsfeSafari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId13} ${monitor_objectId14} ${monitor_objectId15} ${monitor_policyId6} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-Monitor-00008 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "love.163.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "love.163.com/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "utf-8","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId51} ${monitor_objectId52} ${monitor_objectId53} ${monitor_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-Monitor-00009 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "v.iqilu.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "v.iqilu.com/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId19} ${monitor_objectId20} ${monitor_objectId21} ${monitor_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-Monitor-00010 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.fun.tv"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.fun.tv/movie/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId22} ${monitor_objectId23} ${monitor_objectId24} ${monitor_policyId9} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-Monitor-00011 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "hongniang.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "hongniang.com/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId25} ${monitor_objectId26} ${monitor_objectId27} ${monitor_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + diff --git a/01-TestCase/tsg_adc/multi_step/b_Rtp_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_Rtp_Tests_Verify.robot new file mode 100644 index 0000000..69cb837 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_Rtp_Tests_Verify.robot @@ -0,0 +1,612 @@ +*** Settings *** +Test Teardown DeletePolicyAndGroupObject ${policyIds} ${objectids} +Force Tags tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Variables *** +${url} /v1/policy/profile/trustedcacertobj +${certId} ${EMPTY} +${policyIds} ${EMPTY} +${objectids} ${EMPTY} + +*** Test Cases *** +VerifySecurity-Allow-Rtp-00001 + [Tags] VerifyAllowRtp00001 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${voipCallIp}","port":"65500","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${voipOutListenIp}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_rtp_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_objectId9} ${allow_rtp_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +VerifySecurity-Allow-Rtp-00002And0004 + [Tags] VerifyAllowRtp00002 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_rtp_objectId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +VerifySecurity-Allow-Rtp-00003 + [Tags] VerifyAllowRtp00003 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${addpolicySubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +VerifySecurity-Allow-Rtp-00005 + [Tags] VerifyAllowRtp00005 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"30000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_rtp_objectId2} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Allow-Rtp-00006 + [Tags] VerifyAllowRtp00006 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_rtp_objectId3} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Allow-Rtp-00008 + [Tags] VerifyAllowRtp00008 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_rtp_objectId5} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Allow-Rtp-00009 + [Tags] VerifyAllowRtp00009 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_rtp_objectId6} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + Comment 删除对象 + ${objectids} Create List [${allow_rtp_objectId6}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId8}]} + + +VerifySecurity-Deny-Rtp-00001 + [Tags] VerifyDenyRtp00001 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +VerifySecurity-Deny-Rtp-0000200002And0004 + [Tags] VerifyDenyRtp00002 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_rtp_objectId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Deny-Rtp-00003 + [Tags] VerifyDenyRtp00003 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${addpolicySubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Deny-Rtp-00005 + [Tags] VerifyDenyRtp00005 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"30000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_rtp_objectId2} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Deny-Rtp-00006 + [Tags] VerifyDenyRtp00006 + #新增策略验证 + #创建attributes中的字典 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_rtp_objectId3} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Deny-Rtp-00008 + [Tags] VerifyDenyRtp00008 + #新增策略验证 + #创建attributes中的字典 + # 新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_rtp_objectId5} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Deny-Rtp-00009 + [Tags] VerifyDenyRtp00009 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_rtp_objectId6} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Monitor-Rtp-00001 + [Tags] VerifyMonitorRtp00001 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +VerifySecurity-Monitor-Rtp-00002 + [Tags] VerifyMonitorRtp00002 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_rtp_objectId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + +VerifySecurity-Monitor-Rtp-00003 + [Tags] VerifyMonitorRtp00003 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${addpolicySubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Monitor-Rtp-00005 + [Tags] VerifyMonitorRtp00005 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"30000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_rtp_objectId2} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Monitor-Rtp-00006 + [Tags] VerifyMonitorRtp00006 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_rtp_objectId3} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Monitor-Rtp-00008 + [Tags] VerifyMonitorRtp00008 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_rtp_objectId5} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +VerifySecurity-Monitor-Rtp-00009 + [Tags] VerifyMonitorRtp00009 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_rtp_objectId6} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log 1111111111111111${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log 222222222222222${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + + + \ No newline at end of file diff --git a/01-TestCase/tsg_adc/multi_step/b_SRedirect_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_SRedirect_Tests_Verify.robot new file mode 100644 index 0000000..4198892 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_SRedirect_Tests_Verify.robot @@ -0,0 +1,410 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Variables *** +${policyIds} ${EMPTY} +${objectids} ${EMPTY} + +*** Test Cases *** +Proxy-Policy-redirect-00001 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "tudou.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "tudou.com/"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId49} ${redirect_objectId44} ${redirect_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-redirect-00002 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "glazok.kz/"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId50} ${redirect_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-redirect-00003 + #新增策略验证 + #创建attributes中的字典 + ${fqdn1} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.deepin.org"} + ${fqdn2} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.vmall.com"} + ${fqdn3} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.suning.com"} + ${fqdn4} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "flights.ctrip.com"} + ${url1} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.deepin.org/zh/"} + ${url2} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.vmall.com/?cid=10000089&wi=mid:138,fid:139,cid:10000089,wi:88605_387_0__1"} + ${url3} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.suning.com/"} + ${url4} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "flights.ctrip.com/international/search/domestic"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn1} ${fqdn2} ${fqdn3} ${fqdn4} ${url1} ${url2} ${url3} ${url4} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId2} ${redirect_objectId3} ${redirect_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-redirect-00004 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.merrilledge.com/investing/online-trading"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "afsfssfMozilla/5.0afsfsdafsafs","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId5} ${redirect_objectId51} ${redirect_policyId3} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + ${rescode} SystemCommands ${commandstr} ${stringlist} + +Proxy-Policy-redirect-00005 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.marketscreener.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.marketscreener.com/stock-analyses/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId7} ${redirect_objectId8} ${redirect_objectId9} ${redirect_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-redirect-00006 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.dota2.com.cn"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.dota2.com.cn/index.htm"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "AppleWebKit/537.36 (KHTML, like Gecko)","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId10} ${redirect_objectId11} ${redirect_objectId12} ${redirect_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-redirect-00007 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.ufcu.org"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.ufcu.org/personal/insurance/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId13} ${redirect_objectId14} ${redirect_objectId15} ${redirect_policyId6} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-redirect-00008 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.essence.com.cn/business/fixed"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "utf-8aabnna","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId17} ${redirect_objectId52} ${redirect_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-redirect-00009 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.west95582.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.west95582.com/jdw/index.html"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId19} ${redirect_objectId20} ${redirect_objectId21} ${redirect_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +Proxy-Policy-redirect-00011 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.cs.ecitic.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.cs.ecitic.com/newsite/business/bank/tzyh_ywjs/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId25} ${redirect_objectId26} ${redirect_objectId27} ${redirect_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-redirect-00012 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.investors-trust.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.investors-trust.com/products/product-type/"} + ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "saltkeyfafghlh","district": "Cookie"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId28} ${redirect_objectId29} ${redirect_objectId30} ${redirect_policyId11} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-redirect-00013 + #新增策略验证 + #创建attributes中的字典 + ${fqdn1} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.travelmath.com"} + ${fqdn2} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.monticello.org"} + ${fqdn3} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "expediapartnersolutions.com"} + ${fqdn4} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.tripadvisor.com"} + ${url1} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.travelmath.com/drive-distance/"} + ${url2} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.monticello.org/visit/tickets-tours/"} + ${url3} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "expediapartnersolutions.com/about/our-supply"} + ${url4} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.tripadvisor.com/Attractions-g60763-Activities-New_York_City_New_York.html"} + ${res_hdr_sc1} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "mobile=2","district": "Set-Cookie"} + ${res_hdr_sc2} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "PHPSESSID","district": "Set-Cookie"} + ${res_hdr_sc3} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "SameSite=None; Secure","district": "Set-Cookie"} + ${res_hdr_sc4} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "TASession","district": "Set-Cookie"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn1} ${fqdn2} ${fqdn3} ${fqdn4} ${url1} ${url2} ${url3} ${url4} + ... ${res_hdr_sc1} ${res_hdr_sc2} ${res_hdr_sc3} ${res_hdr_sc4} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId31} ${redirect_objectId32} ${redirect_objectId46} ${redirect_policyId12} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + +Proxy-Policy-redirect-00016 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.equifax.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.equifax.com/personal/"} + ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "COOKIE_SUPPORT","district": "Cookie"} + ${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "GUEST_LANGUAGE_ID","district": "Set-Cookie"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${redirect_objectId40} ${redirect_objectId41} ${redirect_objectId42} ${redirect_policyId15} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true diff --git a/01-TestCase/tsg_adc/multi_step/b_SReplace_Tests_Verify.robot b/01-TestCase/tsg_adc/multi_step/b_SReplace_Tests_Verify.robot new file mode 100644 index 0000000..fbe82b7 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_SReplace_Tests_Verify.robot @@ -0,0 +1,404 @@ +*** Settings *** +Force Tags tsg_adc_wp tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Test Cases *** +Proxy-Policy-replace-00001 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "destidotcom.wordpress.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "destidotcom.wordpress.com/contact/"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId39} ${replace_objectId43} ${replace_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00002 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "airastana.com/kaz/kk-kz/Josparlau/Kop-baghytty-ushu"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId44} ${replace_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00003 + #新增策略验证 + #创建attributes中的字典 + ${url1} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "umcfa.webs.com/"} + ${url2} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.pjpugliese.com/"} + ${url3} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "carblog.co.za/"} + ${url4} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.ornithomedia.com/"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url1} ${url2} ${url3} ${url4} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId3} ${replace_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00004 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.ino.com/news/headlines/"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "afsfssfMozilla/5.0afsfsdafsafs","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId5} ${replace_objectId45} ${replace_policyId3} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00005 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.bestwestern.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.bestwestern.com/en_US.html"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId7} ${replace_objectId8} ${replace_objectId9} ${replace_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00006 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.quickenloans.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.quickenloans.com/mortgage-education/home-buyers-guide?qlsource=nav"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "AppleWebKitaaaaaaa","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId10} ${replace_objectId11} ${replace_objectId12} ${replace_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00007 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.gobank.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.gobank.com/mobile-banking/mobile-app"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "hahahahsfeSafari/537.36","district": "User-Agent"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ua} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId13} ${replace_objectId14} ${replace_objectId15} ${replace_policyId6} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00008 + #新增策略验证 + #创建attributes中的字典 + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.ghzq.com.cn/ghzq/index.html"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "htmlaaffe","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId17} ${hijack_objectId46} ${replace_policyId7} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00009 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.zcool.com.cn"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.zcool.com.cn/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html; charset=utf-8","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId19} ${replace_objectId20} ${replace_objectId21} ${replace_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + + + +Proxy-Policy-replace-00011 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.shfe.com.cn"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.shfe.com.cn/products/au/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html; charset=utf-8","district": "Content-Type"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId25} ${replace_objectId26} ${replace_objectId27} ${replace_policyId8} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00012 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.national-park.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.national-park.com/welcome-to-canyonlands-national-park/"} + ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "saltkeyfafghlh","district": "Cookie"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId28} ${replace_objectId29} ${replace_objectId30} ${replace_policyId11} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00013 + #新增策略验证 + #创建attributes中的字典 + ${fqdn1} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.expedia.co.uk"} + ${fqdn2} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "welcome.expediagroup.com"} + ${fqdn3} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.expediacruises.com"} + ${fqdn4} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.classicvacations.com"} + ${url1} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.expedia.co.uk/?pwaLob=wizard-hotel-pwa-v2"} + ${url2} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "welcome.expediagroup.com/en?joinexpedia"} + ${url3} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.expediacruises.com/en-US/corporate"} + ${url4} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.classicvacations.com/collections/all-inclusive"} + ${res_hdr_sc1} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "AWSALB","district": "Set-Cookie"} + ${res_hdr_sc2} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "Domain=.expedia.co.uk; Secure; SameSite=None","district": "Set-Cookie"} + ${res_hdr_sc3} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "AWSALBCORS=","district": "Set-Cookie"} + ${res_hdr_sc4} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "CurentCulture=en-US","district": "Set-Cookie"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn1} ${fqdn2} ${fqdn3} ${fqdn4} ${url1} ${url2} ${url3} ${url4} + ... ${res_hdr_sc1} ${res_hdr_sc2} ${res_hdr_sc3} ${res_hdr_sc4} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId31} ${replace_objectId32} ${replace_objectId41} ${replace_policyId12} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + +Proxy-Policy-replace-00014 + #新增策略验证 + #创建attributes中的字典 + ${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.engadget.com"} + ${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.engadget.com/gaming/"} + ${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "charset=text","district": "Content-Type"} + ${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0fsfwhh","district": "User-Agent"} + ${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "__stripe_sidafdsvxvx","district": "Cookie"} + ${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "Domain=.engadget.com","district": "Set-Cookie"} + ${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Proxydeny001502"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_body} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId33} ${replace_objectId34} ${replace_objectId35} ${replace_objectId36} ${replace_objectId37} ${replace_policyId13} ${replace_objectId38} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true diff --git a/01-TestCase/tsg_adc/multi_step/b_Sip_Verify_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Sip_Verify_Tests.robot new file mode 100644 index 0000000..3228c14 --- /dev/null +++ b/01-TestCase/tsg_adc/multi_step/b_Sip_Verify_Tests.robot @@ -0,0 +1,1459 @@ +*** Settings *** +Force Tags tsg_bf_api Trusted_Certificate_Authorities +Library String +Library OperatingSystem +Library Selenium2Library +Library Collections +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot +Resource ../../../03-Variable/BifangApiVariable.txt +Library OperatingSystem +Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot +Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot +Resource ../../../03-Variable/AllFlowCaseVariable.txt +Resource ../../../03-Variable/Policy_Objects_Module.txt +Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Object.robot +Resource ../../../02-Keyword/tsg_bfapi/policy_object/Log.robot +Resource ../../../02-Keyword/tsg_bfapi/Common.robot +Library json +Library DateTime +Library demjson +Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot +Library ../../../04-CustomLibrary/Library/VerifyPolicy.py +Resource ../../../05-Other/AllFlowCaseVariable.txt + +*** Variables *** +${url} /v1/policy/profile/trustedcacertobj +${certId} ${EMPTY} +${policyIds} ${EMPTY} +${objectids} ${EMPTY} + +*** Test Cases *** +VerifySecurity--Allow-SIP-00001_To_000010 + [Tags] VerifyAllowSip0001_to_0003 + log ${intid} + #新增策略验证1 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证2 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId17} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证3 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId18} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证4 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId19} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证5 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId20} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证6 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId21} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证7 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId22} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证8 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId23} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证9 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"2.2.2.99","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentSubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${allow_sip_objectId17}] [${allow_sip_objectId18}] [${allow_sip_objectId19}] [${allow_sip_objectId20}] [${allow_sip_policyId}] + ... [${allow_sip_objectId21}] [${allow_sip_objectId22}] [${allow_sip_objectId23}] [${allow_sip_objectId17}] [${allow_sip_policyId1}] ${allow_sip_policyId2} + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId1}]} + +VerifySecurity--Allow-SIP-000011 + [Tags] Verify + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证2 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzy22131"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证3 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "yq12v1ss"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证4 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "12voip888"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${allow_sip_objectId8}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId10}]} + +VerifySecurity--Allow-SIP-000012 + [Tags] Verify + #新增策略验证1 + #创建attributes中的字典 + ${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId9} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId11} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证2 + #创建attributes中的字典 + ${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzy22131"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId9} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId11} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证3 + #创建attributes中的字典 + ${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "yq12v1ss"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId9} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId11} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证4 + #创建attributes中的字典 + ${to} Create Dictionary attributeType=string attributeName=to appId=120 appName=SIP protocol=SIP attributeValue={"string": "12voip888"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId9} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId11} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${allow_sip_objectId9}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId11}]} + +VerifySecurity--Allow-SIP-000013 + [Tags] Verify + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"} + ${to} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "wx7051406391"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId10} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_objectId11} ${allow_sip_objectId12} ${allow_sip_policyId12} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + sleep 5 + +VerifySecurity--Allow-SIP-000014 + [Tags] Verify + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"} + ${to} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"7777","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId10} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_objectId13} ${allow_sip_objectId14} ${allow_sip_objectId15} ${allow_sip_objectId16} ${allow_sip_policyId13} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + sleep 5 + +VerifySecurity--Deny-SIP-00001 + #新增策略验证1 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"30000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId}]} + +VerifySecurity--Deny-SIP-00003 + #新增策略验证1 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"6.6.6.6","port":"30000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${addpolicySubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId2}]} + +VerifySecurity--Deny-SIP-00005 + #新增策略验证 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"40000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_sip_objectId2} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId4} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${deny_sip_objectId2}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId4}]} + +VerifySecurity--Deny-SIP-00006 + #新增策略验证3 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_sip_objectId3} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId5} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${deny_sip_objectId3}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId5}]} + +VerifySecurity--Deny-SIP-00006 + #新增策略验证4 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId19} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证5 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId20} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证6 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId21} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证7 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId22} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证8 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId23} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证9 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"2.2.2.99","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentSubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${allow_sip_objectId17}] [${allow_sip_objectId18}] [${allow_sip_objectId19}] [${allow_sip_objectId20}] [${allow_sip_policyId}] + ... [${allow_sip_objectId21}] [${allow_sip_objectId22}] [${allow_sip_objectId23}] [${allow_sip_objectId17}] [${allow_sip_policyId1}] ${allow_sip_policyId2} + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId1}]} + +VerifySecurity--Deny-SIP-000011 + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证2 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzy22131"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证3 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "yq12v1ss"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证4 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "12voip888"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${deny_sip_objectId8}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId10}]} + +VerifySecurity--Deny-SIP-000014 + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "hbntest3d14"} + ${to} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "hbntest3d1401"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_sip_objectId11} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_policyId13} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + sleep 5 + + +VerifySecurity--Deny-SIP-000017 + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "hbntest3d17"} + ${to} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${deny_sip_objectId14} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_objectId15} ${deny_sip_objectId1501} ${deny_sip_policyId16} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + sleep 5 + +VerifySecurity--Deny-SIP-000024 + #新增策略验证1 + #创建attributes中的字典 + ${from1} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"} + ${to1} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzy77777"} + ${from2} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "aaayq12v5553"} + ${to2} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "qqqq312voip"} + ${from3} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voi"} + ${to3} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "sie133ll12voi"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"7777","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from1} ${from2} ${from3} ${to1} ${to2} ${to3} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_sip_objectId32} ${deny_sip_objectId33} ${deny_sip_objectId34} ${deny_sip_objectId35} + ... ${deny_sip_objectId36} ${deny_sip_objectId37} ${deny_sip_policyId23} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${deny_sip_objectId32}] [${deny_sip_objectId33}] [${deny_sip_objectId34}] [${deny_sip_objectId35}] [${deny_sip_objectId36}] [${deny_sip_objectId37}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId23}]} + +VerifySecurity--Monitor-SIP-00001_To_000010 + #新增策略验证1 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"40000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentIpId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证2 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_sip_objectId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证3 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId18} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证4 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId19} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证5 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId20} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证6 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId21} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证7 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId22} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证8 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${allow_sip_objectId23} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId1} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证9 + #创建attributes中的字典 + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"2.2.2.99","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${testClentSubId} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_sip_policyId2} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${allow_sip_objectId17}] [${allow_sip_objectId18}] [${allow_sip_objectId19}] [${allow_sip_objectId20}] [${allow_sip_policyId}] + ... [${allow_sip_objectId21}] [${allow_sip_objectId22}] [${allow_sip_objectId23}] [${allow_sip_objectId17}] [${allow_sip_policyId1}] ${allow_sip_policyId2} + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId1}]} + +VerifySecurity--Monitor-SIP-000011 + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证2 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzy22131"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证3 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "yq12v1ss"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + #新增策略验证4 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "12voip888"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_sip_objectId8} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_policyId10} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + # # ${ok} VerifyProxy ${objectids} ${resData} + Should Be Equal As Strings ${ok} true + sleep 5 + Comment 删除对象 + ${objectids} Create List [${monitor_sip_objectId8}] + Comment 删除策略 + ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_sip_policyId10}]} + +VerifySecurity--Monitor-SIP-000012 + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "hbntest4m12"} + ${to} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "hbntest3m12"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_sip_objectId9} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_policyId11} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + sleep 5 + +VerifySecurity--Monitor-SIP-000013 + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "hbntest3m13"} + ${to} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"1.1.1.1","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_sip_objectId10} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_objectId11} ${monitor_sip_objectId12} ${monitor_sip_policyId12} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + sleep 5 + + +VerifySecurity--Monitor-SIP-000014 + #新增策略验证1 + #创建attributes中的字典 + ${from} Create Dictionary attributeType=string attributeName=originator appId=120 appName=SIP protocol=SIP attributeValue={"string": "hbntest3m14"} + ${to} Create Dictionary attributeType=string attributeName=responder appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406kkkk"} + ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"} + ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"} + ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"} + ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"7777","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"} + # 合成attributes字典集 + ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${to} ${from} + ${verifySession} Create Dictionary attributes=${attributes} + ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession} + log ${verifyList} + ${rescode} ${resData} VerifyPolicies ${verifyList} + # 打印检查结果 + ${objectid_verify} Set Variable ${monitor_sip_objectId13} + ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_sip_objectId14} ${monitor_sip_objectId15} ${monitor_sip_objectId16} ${monitor_sip_policyId13} + # # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中 + log ${objectid_verify} + ${testType} Evaluate type($objectid_verify) + ${testType} Evaluate type($resData) + log ${resData} + sleep 5 + ${ok} VerifyProxy ${resData} ${objectid_verify} + Should Be Equal As Strings ${ok} true + sleep 5 + + + \ No newline at end of file diff --git a/01-TestCase/tsg_adc/multi_step/c_Deny_Dns_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Deny_Dns_Tests.robot index d35ea69..4358064 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Deny_Dns_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Deny_Dns_Tests.robot @@ -45,8 +45,7 @@ SecurityPolicy-Deny-Dns-00003 SecurityPolicy-Deny-Dns-00004 #删除对象 - ${objectids} set Variable ${deny_dns_objectId3} - ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_dns_objectId5} + ${objectids} set Variable ${deny_dns_objectId5} #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_dns_policyId3}]} ${s} Convert to String ${deny_dns_policyId3}