feat(Cli):增加TsgCli测试用例
This commit is contained in:
22
01-TestCase/tsg_cli/EnDisablePolicy.robot
Normal file
22
01-TestCase/tsg_cli/EnDisablePolicy.robot
Normal file
@@ -0,0 +1,22 @@
|
||||
*** Settings ***
|
||||
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]
|
||||
|
||||
|
||||
|
||||
|
||||
30
01-TestCase/tsg_cli/ImExportObject.robot
Normal file
30
01-TestCase/tsg_cli/ImExportObject.robot
Normal file
@@ -0,0 +1,30 @@
|
||||
*** Settings ***
|
||||
Test Teardown Clear_Test_Data
|
||||
Force Tags tsg-cli Object ExImport
|
||||
Resource ../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/interface.robot
|
||||
|
||||
*** Test Cases ***
|
||||
Object_Export_And_Import_TestCase
|
||||
FOR ${type} IN @{ObjectTypes}
|
||||
# export 01
|
||||
${FileName1} Get_File_Name ${type} txt
|
||||
Tsg_Policy_Object_Export ${type} ${FileName1} txt
|
||||
# export 02
|
||||
${FileName2} Get_File_Name ${type} csv
|
||||
Tsg_Policy_Object_Export ${type} ${FileName2} csv
|
||||
# # export 03
|
||||
${FileName3} Get_File_Name ${type} txt
|
||||
Tsg_Policy_Object_Export ${type} ${FileName3} ${None}
|
||||
# export 04
|
||||
${FileName4} Get_File_Name ${type} csv
|
||||
Tsg_Policy_Object_Export ${type} ${FileName4} ${None}
|
||||
|
||||
# # import 01
|
||||
${name1} Get_Import_Info ${type}
|
||||
Tsg_Policy_Object_Import ${type} ${FileName3} ${name1}
|
||||
# import 02
|
||||
${name2} Get_Import_Info ${type}
|
||||
Tsg_Policy_Object_Import ${type} ${FileName4} ${name2}
|
||||
END
|
||||
|
||||
34
01-TestCase/tsg_cli/OtherCommand.robot
Normal file
34
01-TestCase/tsg_cli/OtherCommand.robot
Normal file
@@ -0,0 +1,34 @@
|
||||
*** Settings ***
|
||||
Resource ../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/interface.robot
|
||||
|
||||
*** Test Cases ***
|
||||
Tsg_Help_TestCase
|
||||
[Tags] tsg-cli TsgHelp
|
||||
Tsg_Help_Keyword
|
||||
|
||||
Tsg_Diagnose_TestCase
|
||||
[Tags] tsg-cli TsgDiagnose
|
||||
Tsg_Diagnose_Keyword
|
||||
|
||||
Tsg_Record_Userlist_TestCase
|
||||
[Tags] tsg-cli TsgRecordUserlist
|
||||
Tsg_Record_UserList
|
||||
|
||||
Tsg_Record_Username_TestCase
|
||||
[Tags] tsg-cli TsgRecordUsername
|
||||
Tsg_Record_Query
|
||||
|
||||
Tsg_Show_TestCase
|
||||
[Tags] tsg-cli TsgShow
|
||||
Tsg_Show_Chassis-ip
|
||||
Tsg_Show_Chassis-port
|
||||
Tsg_Show_Interface
|
||||
Tsg_Show_APP
|
||||
Tsg_Show_Protocol
|
||||
Tsg_Show_Stream
|
||||
Tsg_Show_Intercept
|
||||
|
||||
Tsg_Passwd_TestCase
|
||||
[Tags] tsg-cli TsgPasswd
|
||||
Tsg_Passwd_Keyword
|
||||
33
01-TestCase/tsg_cli/QueryManipulationPolicy.robot
Normal file
33
01-TestCase/tsg_cli/QueryManipulationPolicy.robot
Normal file
@@ -0,0 +1,33 @@
|
||||
*** Settings ***
|
||||
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}
|
||||
|
||||
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}
|
||||
|
||||
|
||||
|
||||
111
01-TestCase/tsg_cli/QueryObject.robot
Normal file
111
01-TestCase/tsg_cli/QueryObject.robot
Normal file
@@ -0,0 +1,111 @@
|
||||
*** Settings ***
|
||||
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
|
||||
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}
|
||||
|
||||
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}
|
||||
|
||||
|
||||
33
01-TestCase/tsg_cli/QuerySecurityPolicy.robot
Normal file
33
01-TestCase/tsg_cli/QuerySecurityPolicy.robot
Normal file
@@ -0,0 +1,33 @@
|
||||
*** Settings ***
|
||||
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}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user