feat(Cli):1、策略状态更改测试用例补充策略类型,2、策略对象查询测试用例多次迭代,3、增加对各cli命令help参数返回值测试
This commit is contained in:
@@ -3,20 +3,14 @@ Force Tags tsg-cli Policy EnDisable
|
||||
Resource ../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/interface.robot
|
||||
|
||||
*** Variables ***
|
||||
${PolicyType} tsg_security
|
||||
|
||||
*** Test Cases ***
|
||||
init
|
||||
${data} Get_Policy_Object3 ${PolicyType}
|
||||
Set Suite Variable ${obj} ${data}
|
||||
|
||||
Policy_Update01
|
||||
Tsg_Policy_EnDisable ${obj}[policyId] ${PolicyType} ${obj}[commandType1]
|
||||
|
||||
Policy_Update02
|
||||
Tsg_Policy_EnDisable ${obj}[policyId] ${PolicyType} ${obj}[commandType2]
|
||||
|
||||
|
||||
|
||||
|
||||
Policy_EnDisable_TestCase
|
||||
# 操作不同类型策略
|
||||
FOR ${policyType} IN @{PolicyTypes}
|
||||
${obj} Get_Policy_Object3 ${policyType}
|
||||
# 更改策略状态
|
||||
Tsg_Policy_EnDisable ${obj}[policyId] ${policyType} ${obj}[commandType1]
|
||||
# 复原策略状态
|
||||
Tsg_Policy_EnDisable ${obj}[policyId] ${policyType} ${obj}[commandType2]
|
||||
END
|
||||
|
||||
@@ -6,7 +6,11 @@ Resource ../../02-Keyword/tsg_cli/interface.robot
|
||||
Tsg_Help_TestCase
|
||||
[Tags] tsg-cli TsgHelp
|
||||
Tsg_Help_Keyword
|
||||
|
||||
Tsg_Command_Help tsg_policy
|
||||
Tsg_Command_Help tsg_policy_object
|
||||
Tsg_Command_Help tsg_record
|
||||
Tsg_Command_Help tsg_show
|
||||
|
||||
Tsg_Diagnose_TestCase
|
||||
[Tags] tsg-cli TsgDiagnose
|
||||
Tsg_Diagnose_Keyword
|
||||
|
||||
@@ -3,31 +3,17 @@ Force Tags tsg-cli ManipulationPolicy Query
|
||||
Resource ../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/interface.robot
|
||||
|
||||
*** Variables ***
|
||||
${PolicyType} pxy_manipulation
|
||||
|
||||
*** Test Cases ***
|
||||
init
|
||||
${data} Get_Policy_Object2 ${PolicyType}
|
||||
Set Suite Variable ${obj} ${data}
|
||||
PxyManipulation_Policy_Query_TestCase
|
||||
# 取最多10条策略数据,分别做条件查询
|
||||
${list} Get_Policy_Object2 pxy_manipulation
|
||||
FOR ${obj} IN @{list}
|
||||
Tsg_Policy_Query pxy_manipulation ${obj}[policyId] ${None} ${None} ${True}
|
||||
Tsg_Policy_Query pxy_manipulation ${None} ${obj}[policyName] ${None} ${True}
|
||||
Tsg_Policy_Query pxy_manipulation ${None} ${None} ${obj}[policyDesc] ${True}
|
||||
Tsg_Policy_Query pxy_manipulation ${obj}[policyId] ${obj}[policyName] ${None} ${True}
|
||||
Tsg_Policy_Query pxy_manipulation ${obj}[policyId] ${None} ${obj}[policyDesc] ${True}
|
||||
Tsg_Policy_Query pxy_manipulation ${None} ${obj}[policyName] ${obj}[policyDesc] ${True}
|
||||
END
|
||||
|
||||
|
||||
Policy_Query01
|
||||
Tsg_Policy_Query ${PolicyType} ${obj}[policyId] ${None} ${None} ${True}
|
||||
|
||||
Policy_Query02
|
||||
Tsg_Policy_Query ${PolicyType} ${None} ${obj}[policyName] ${None} ${True}
|
||||
|
||||
Policy_Query03
|
||||
Tsg_Policy_Query ${PolicyType} ${None} ${None} ${obj}[policyDesc] ${True}
|
||||
|
||||
Policy_Query04
|
||||
Tsg_Policy_Query ${PolicyType} ${obj}[policyId] ${obj}[policyName] ${None} ${True}
|
||||
|
||||
Policy_Query05
|
||||
Tsg_Policy_Query ${PolicyType} ${obj}[policyId] ${None} ${obj}[policyDesc] ${True}
|
||||
|
||||
Policy_Query06
|
||||
Tsg_Policy_Query ${PolicyType} ${None} ${obj}[policyName] ${obj}[policyDesc] ${True}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,109 +3,12 @@ Force Tags tsg-cli Object Query
|
||||
Resource ../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/interface.robot
|
||||
|
||||
*** Variables ***
|
||||
${ObjectType1} ip
|
||||
${ObjectType2} url
|
||||
${ObjectType3} fqdn
|
||||
${ObjectType4} keywords
|
||||
${ObjectType5} subscriberid
|
||||
${ObjectType6} fqdn_category
|
||||
${ObjectType7} account
|
||||
${ObjectType8} http_signature
|
||||
|
||||
*** Test Cases ***
|
||||
init
|
||||
${data1} Get_Policy_Object4 ${ObjectType1}
|
||||
Set Suite Variable ${obj1} ${data1}
|
||||
${data2} Get_Policy_Object4 ${ObjectType2}
|
||||
Set Suite Variable ${obj2} ${data2}
|
||||
${data3} Get_Policy_Object4 ${ObjectType3}
|
||||
Set Suite Variable ${obj3} ${data3}
|
||||
${data4} Get_Policy_Object4 ${ObjectType4}
|
||||
Set Suite Variable ${obj4} ${data4}
|
||||
${data5} Get_Policy_Object4 ${ObjectType5}
|
||||
Set Suite Variable ${obj5} ${data5}
|
||||
${data6} Get_Policy_Object4 ${ObjectType6}
|
||||
Set Suite Variable ${obj6} ${data6}
|
||||
${data7} Get_Policy_Object4 ${ObjectType7}
|
||||
Set Suite Variable ${obj7} ${data7}
|
||||
${data8} Get_Policy_Object4 ${ObjectType8}
|
||||
Set Suite Variable ${obj8} ${data8}
|
||||
|
||||
|
||||
Object_Query01
|
||||
Objects_Query_TestCase
|
||||
# 无条件查询
|
||||
Tsg_Policy_Object_Query ${None} ${None} ${True}
|
||||
|
||||
Object_Query_IP_01
|
||||
Tsg_Policy_Object_Query ${None} ${obj1}[objectName] ${True}
|
||||
|
||||
Object_Query_IP_02
|
||||
Tsg_Policy_Object_Query ${obj1}[objectType] ${None} ${True}
|
||||
|
||||
Object_Query_IP_03
|
||||
Tsg_Policy_Object_Query ${obj1}[objectType] ${obj1}[objectName] ${True}
|
||||
|
||||
Object_Query_URL_01
|
||||
Tsg_Policy_Object_Query ${None} ${obj2}[objectName] ${True}
|
||||
|
||||
Object_Query_URL_02
|
||||
Tsg_Policy_Object_Query ${obj2}[objectType] ${None} ${True}
|
||||
|
||||
Object_Query_URL_03
|
||||
Tsg_Policy_Object_Query ${obj2}[objectType] ${obj2}[objectName] ${True}
|
||||
FOR ${objectType} IN @{ObjectTypes}
|
||||
QueryObjectInnerForEach ${objectType}
|
||||
END
|
||||
|
||||
Object_Query_FQDN_01
|
||||
Tsg_Policy_Object_Query ${None} ${obj3}[objectName] ${True}
|
||||
|
||||
Object_Query_FQDN_02
|
||||
Tsg_Policy_Object_Query ${obj3}[objectType] ${None} ${True}
|
||||
|
||||
Object_Query_FQDN_03
|
||||
Tsg_Policy_Object_Query ${obj3}[objectType] ${obj3}[objectName] ${True}
|
||||
|
||||
Object_Query_KEYWORDS_01
|
||||
Tsg_Policy_Object_Query ${None} ${obj4}[objectName] ${True}
|
||||
|
||||
Object_Query_KEYWORDS_02
|
||||
Tsg_Policy_Object_Query ${obj4}[objectType] ${None} ${True}
|
||||
|
||||
Object_Query_KEYWORDS_03
|
||||
Tsg_Policy_Object_Query ${obj4}[objectType] ${obj4}[objectName] ${True}
|
||||
|
||||
Object_Query_SUBSCRIBERID_01
|
||||
Tsg_Policy_Object_Query ${None} ${obj5}[objectName] ${True}
|
||||
|
||||
Object_Query_SUBSCRIBERID_02
|
||||
Tsg_Policy_Object_Query ${obj5}[objectType] ${None} ${True}
|
||||
|
||||
Object_Query_SUBSCRIBERID_03
|
||||
Tsg_Policy_Object_Query ${obj5}[objectType] ${obj5}[objectName] ${True}
|
||||
|
||||
Object_Query_FQDN_CATEGORY_01
|
||||
Tsg_Policy_Object_Query ${None} ${obj6}[objectName] ${True}
|
||||
|
||||
Object_Query_FQDN_CATEGORY_02
|
||||
Tsg_Policy_Object_Query ${obj6}[objectType] ${None} ${True}
|
||||
|
||||
Object_Query_FQDN_CATEGORY_03
|
||||
Tsg_Policy_Object_Query ${obj6}[objectType] ${obj6}[objectName] ${True}
|
||||
|
||||
Object_Query_ACCOUNT_01
|
||||
Tsg_Policy_Object_Query ${None} ${obj7}[objectName] ${True}
|
||||
|
||||
Object_Query_ACCOUNT_02
|
||||
Tsg_Policy_Object_Query ${obj7}[objectType] ${None} ${True}
|
||||
|
||||
Object_Query_ACCOUNT_03
|
||||
Tsg_Policy_Object_Query ${obj7}[objectType] ${obj7}[objectName] ${True}
|
||||
|
||||
Object_Query_HTTP_SIGNATURE_01
|
||||
Tsg_Policy_Object_Query ${None} ${obj8}[objectName] ${True}
|
||||
|
||||
Object_Query_HTTP_SIGNATURE_02
|
||||
Tsg_Policy_Object_Query ${obj8}[objectType] ${None} ${True}
|
||||
|
||||
Object_Query_HTTP_SIGNATURE_03
|
||||
Tsg_Policy_Object_Query ${obj8}[objectType] ${obj8}[objectName] ${True}
|
||||
|
||||
|
||||
|
||||
@@ -3,31 +3,15 @@ Force Tags tsg-cli SecurityPolicy Query
|
||||
Resource ../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/interface.robot
|
||||
|
||||
*** Variables ***
|
||||
${PolicyType} tsg_security
|
||||
|
||||
*** Test Cases ***
|
||||
init
|
||||
${data} Get_Policy_Object1 ${PolicyType}
|
||||
Set Suite Variable ${obj} ${data}
|
||||
|
||||
Policy_Query01
|
||||
Tsg_Policy_Query ${PolicyType} ${obj}[policyId] ${None} ${None} ${True}
|
||||
|
||||
Policy_Query02
|
||||
Tsg_Policy_Query ${PolicyType} ${None} ${obj}[policyName] ${None} ${True}
|
||||
|
||||
Policy_Query03
|
||||
Tsg_Policy_Query ${PolicyType} ${None} ${None} ${obj}[policyDesc] ${True}
|
||||
|
||||
Policy_Query04
|
||||
Tsg_Policy_Query ${PolicyType} ${obj}[policyId] ${obj}[policyName] ${None} ${True}
|
||||
|
||||
Policy_Query05
|
||||
Tsg_Policy_Query ${PolicyType} ${obj}[policyId] ${None} ${obj}[policyDesc] ${True}
|
||||
|
||||
Policy_Query06
|
||||
Tsg_Policy_Query ${PolicyType} ${None} ${obj}[policyName] ${obj}[policyDesc] ${True}
|
||||
|
||||
|
||||
|
||||
Security_Policy_Query_TestCase
|
||||
# 取最多10条策略数据,分别做条件查询
|
||||
${list} Get_Policy_Object2 tsg_security
|
||||
FOR ${obj} IN @{list}
|
||||
Tsg_Policy_Query tsg_security ${obj}[policyId] ${None} ${None} ${True}
|
||||
Tsg_Policy_Query tsg_security ${None} ${obj}[policyName] ${None} ${True}
|
||||
Tsg_Policy_Query tsg_security ${None} ${None} ${obj}[policyDesc] ${True}
|
||||
Tsg_Policy_Query tsg_security ${obj}[policyId] ${obj}[policyName] ${None} ${True}
|
||||
Tsg_Policy_Query tsg_security ${obj}[policyId] ${None} ${obj}[policyDesc] ${True}
|
||||
Tsg_Policy_Query tsg_security ${None} ${obj}[policyName] ${obj}[policyDesc] ${True}
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user