Commit 8c9aabe9 authored by 王超's avatar 王超

更新

parent 23cf6744
...@@ -4,6 +4,7 @@ import time ...@@ -4,6 +4,7 @@ import time
import datetime import datetime
from common.parameters_util import read_csv_file, read_testcase_file from common.parameters_util import read_csv_file, read_testcase_file
from common.yaml_util import read_extract_file, read_config_file from common.yaml_util import read_extract_file, read_config_file
from datetime import datetime
...@@ -15,11 +16,15 @@ class DubugTalk: ...@@ -15,11 +16,15 @@ class DubugTalk:
# 获取时间戳 # 获取时间戳
def get_time_stamp(self): def get_time_stamp(self):
now = datetime.datetime.now() now = datetime.now().timestamp()
timestamp = now.timestamp() # timestamp = now.timestamp()
return timestamp # print(now)
# print("当前时间:",now) return now
# print("时间戳:",timestamp)
def get_data(self):
# 获取当前日期
current_date = datetime.now().date()
return current_date
#获取extract.yaml文件中的值 #获取extract.yaml文件中的值
def get_extract_data(self,node_name): def get_extract_data(self,node_name):
...@@ -63,4 +68,4 @@ if __name__ == '__main__': ...@@ -63,4 +68,4 @@ if __name__ == '__main__':
# re1 = read_testcase_file('/testcase/EngineeringManagement/create_project100.yml') # re1 = read_testcase_file('/testcase/EngineeringManagement/create_project100.yml')
# print(type(re),re) # print(type(re),re)
# print(re1) # print(re1)
DubugTalk().get_project_path2() DubugTalk().get_time_stamp()
...@@ -3,4 +3,8 @@ pytest-html ...@@ -3,4 +3,8 @@ pytest-html
pytest-xdist pytest-xdist
pytest-ordering pytest-ordering
pytest-rerunfailures pytest-rerunfailures
allure-pytest allure-pytest
\ No newline at end of file PyYAML
PyMySQL
pyodbc
requests
框架:python+pytest+allure 框架:python+pytest+allure
安装插件:执行 pip install -r requestments.txt 安装插件:执行 requestments.txt
执行文件:all_test.py 执行文件:all_test.py
其他文件: 其他文件:
common:全局方法 common:全局方法
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
7.数据驱动:关键字parameters,使用csv文件存储数据 7.数据驱动:关键字parameters,使用csv文件存储数据
yaml写法: yaml写法:
parameters: parameters:
name1-name2: data/get_caate_node.csv name1-name2: data/get_caate_node.csv
csv文件写法: csv文件写法:
name1,name2 name1,name2
创建工程1,test88 创建工程1,test88
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
1)上传文件:testcase/A3_9_API_Interconnection/import_apilist.yml,导入api接口 1)上传文件:testcase/A3_9_API_Interconnection/import_apilist.yml,导入api接口
testcase/A3_9_API_Interconnection/create_tunnel.yml,导入变量 testcase/A3_9_API_Interconnection/create_tunnel.yml,导入变量
2)数据驱动:testcase/3_VariableManagement/creat_io_variable.yml 2)数据驱动:testcase/3_VariableManagement/creat_io_variable.yml
3)断言:testcase/3_VariableManagement/creat_io_variable.yml 3)断言:testcase/A3_9_API_Interconnection/post_api.yml
testcase/1_EngineeringManagement/data_check(data_clear).yml.yml testcase/1_EngineeringManagement/data_check(data_clear).yml.yml
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment