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

更新

parent 23cf6744
......@@ -4,6 +4,7 @@ import time
import datetime
from common.parameters_util import read_csv_file, read_testcase_file
from common.yaml_util import read_extract_file, read_config_file
from datetime import datetime
......@@ -15,11 +16,15 @@ class DubugTalk:
# 获取时间戳
def get_time_stamp(self):
now = datetime.datetime.now()
timestamp = now.timestamp()
return timestamp
# print("当前时间:",now)
# print("时间戳:",timestamp)
now = datetime.now().timestamp()
# timestamp = now.timestamp()
# print(now)
return now
def get_data(self):
# 获取当前日期
current_date = datetime.now().date()
return current_date
#获取extract.yaml文件中的值
def get_extract_data(self,node_name):
......@@ -63,4 +68,4 @@ if __name__ == '__main__':
# re1 = read_testcase_file('/testcase/EngineeringManagement/create_project100.yml')
# print(type(re),re)
# print(re1)
DubugTalk().get_project_path2()
DubugTalk().get_time_stamp()
......@@ -3,4 +3,8 @@ pytest-html
pytest-xdist
pytest-ordering
pytest-rerunfailures
allure-pytest
\ No newline at end of file
allure-pytest
PyYAML
PyMySQL
pyodbc
requests
框架:python+pytest+allure
安装插件:执行 pip install -r requestments.txt
安装插件:执行 requestments.txt
执行文件:all_test.py
其他文件:
common:全局方法
......
......@@ -61,7 +61,7 @@
7.数据驱动:关键字parameters,使用csv文件存储数据
yaml写法:
parameters:
name1-name2: data/get_caate_node.csv
name1-name2: data/get_caate_node.csv
csv文件写法:
name1,name2
创建工程1,test88
......@@ -84,7 +84,7 @@
1)上传文件:testcase/A3_9_API_Interconnection/import_apilist.yml,导入api接口
testcase/A3_9_API_Interconnection/create_tunnel.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
......
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