摘要: 针对一个列表进行去重 from functools import reduce def deduplication(list_data): """列表数据去重""" # [[1, 2], [1, 2], [1, 2, 3]] function = lambda x, y: x if y in x e 阅读全文
posted @ 2020-08-25 16:16 小心走火 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 使用多进程执行测试用例,进程数和运行case的机器有关,一核一个进程数 import multiprocessing if __name__ == "__main__": # 设置进程池 pool = multiprocessing.Pool(processes=4) # 提供数据 py_test_ 阅读全文
posted @ 2020-08-25 15:08 小心走火 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 1。 自己准备项目和环境 2。 Jenkins执行shell命令, 使用pytest执行项目,并且生成allure测试报告(allure-reports) pytest --reruns 2 testCase/case/mainFlow --alluredir=allure-reports 这样就生 阅读全文
posted @ 2020-08-25 11:34 小心走火 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 1。 要想结合pytest和allure在本地生成测试报告,需要安装pytest, allure(自己找资料安装) 2。 准备好脚本 3。 用pytest生成alluredir(allure-report),测试数据(里面是txt和json格式的数据文件) 4。 本地alluredir转为allur 阅读全文
posted @ 2020-08-25 10:33 小心走火 阅读(1675) 评论(0) 推荐(0) 编辑