【接口自动化测试实战】【一】Pytest 框架用例规范与运行

一、生成随机时间
import time

print(time.time()) # float
print(int(time.time()))
print('test_%s' % int(time.time()))
print('test_{}'.format(int(time.time())))
print(f'test_{int(time.time())}') # 推荐
print('test_'+str(int(time.time())))


Default test runner:

 

 Run pytest for test.py

 

posted @ 2022-12-25 17:13  Jenny测试开发  阅读(54)  评论(0编辑  收藏  举报