summaryrefslogtreecommitdiff
path: root/variable/file_operation.robot
diff options
context:
space:
mode:
authordongxiaoyan <[email protected]>2021-06-15 19:37:46 +0800
committerdongxiaoyan <[email protected]>2021-06-15 19:37:46 +0800
commit0847bdd64d47f18ca995a81d3560b4bae9b04e1b (patch)
tree6def734f9ecb7fc2a97196f5e48839ae6c1dd0d6 /variable/file_operation.robot
parent3c8341971455d3d1b0981607426cff9674496c0b (diff)
基于UI的tsg集成测试脚本初始化HEADmaster
Diffstat (limited to 'variable/file_operation.robot')
-rw-r--r--variable/file_operation.robot36
1 files changed, 36 insertions, 0 deletions
diff --git a/variable/file_operation.robot b/variable/file_operation.robot
new file mode 100644
index 0000000..44eca35
--- /dev/null
+++ b/variable/file_operation.robot
@@ -0,0 +1,36 @@
+*** Settings ***
+Library String
+Library json
+Library OperatingSystem
+Library RequestsLibrary
+Library Selenium2Library
+Library Collections
+Library FileLibrary
+Resource ../common.robot
+Resource ../../../variable/common_variable.txt
+
+*** Keywords ***
+insert_policyId_to_file
+ [Arguments] ${key} ${policyId} ${objectids}
+ ${dict} Create Dictionary policyId=${policyId} objectId=${objectids}
+ ${json} json.Dumps ${dict}
+ Alter Dict ${path}/variable/AllFlowCaseVariable.txt ${key} ${json}
+
+insert_time_to_file
+ [Arguments] ${key} ${starttime} ${endtime}
+ ${value} json.Loads ${${key}}
+ ${dict} Create Dictionary policyId=${value}[policyId] objectId=${value}[objectId] starttime=${starttime} endtime=${endtime}
+ ${json} json.Dumps ${dict}
+ Alter Dict ${path}/variable/AllFlowCaseVariable.txt ${key} ${json}
+
+insert_policyId_to_file1
+ [Arguments] ${key} ${objectids}
+ Alter Dict ${path}/all_flow_case_variable.txt ${key} ${objectids}
+
+insert_time_to_file1
+ [Arguments] ${key} ${starttime}
+ Alter Dict ${path}/AllFlowCaseVariable1.txt ${key} ${starttime}
+
+insert_Report_to_file1
+ [Arguments] ${key} ${objectids}
+ Alter Dict ${path}/ReportCaseVariable.txt ${key} ${objectids}