摘要: 文件格式:properties,config,ini,log4j(一般用来java配置日志文件的) 配置文件如下 1 [BUTTON] 2 button = all 3 4 [LEMON] 5 num = 89 6 name = 小明 其中option,value相当于key,value 读取配置文 阅读全文
posted @ 2020-05-25 17:40 Albeexu 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 工具类里放read_config.py方便以后调用 1 import configparser 2 3 4 class ReadConfig: 5 # 参数化 6 def read_config(self, filename, sections, button): 7 cf = configpars 阅读全文
posted @ 2020-05-25 17:33 Albeexu 阅读(643) 评论(0) 推荐(0) 编辑
摘要: 1button控制是否执行所有用例,默认值为all,如果不为all就进行分值判断,button的值只能输入all,或者列表 1 def get_data(self, button="all"): 2 """ button控制是否执行所有用例,默认值为all 3 如果不为all就进行分值判断 4 bu 阅读全文
posted @ 2020-05-25 14:06 Albeexu 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 装饰器:会在你函数运行之前去运行,如果进阶测试开发可以去了解 ddt+unitest 来进行数据处理,第三方库 1 import unittest 2 from ddt import ddt, data, unpack 3 4 # test_data = [[1, 2], [1, 4]] 5 tes 阅读全文
posted @ 2020-05-24 22:56 Albeexu 阅读(1123) 评论(0) 推荐(0) 编辑
摘要: 不能用外部的模块去命名,最好加个test开头 阅读全文
posted @ 2020-05-24 21:57 Albeexu 阅读(179) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-05-24 21:55 Albeexu 阅读(10) 评论(0) 推荐(1) 编辑
该文被密码保护。 阅读全文
posted @ 2020-05-24 20:37 Albeexu 阅读(8) 评论(0) 推荐(0) 编辑
摘要: eval把字符串转换为原来的数据类型 字符串--》布尔值 # s = 'True'# print(type(s), type(eval(s)))字符串--》字典s = '{"age": 18}'print(type(s), type(eval(s))) 阅读全文
posted @ 2020-05-24 17:20 Albeexu 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 1.关于新建excel,有两种方式,第一种,在电脑任意位置新建一个excel,然后拖进项目文件夹里,第二种,直接在项目文件夹里新建。 2.注意表格里不要有空行 1 from openpyxl import load_workbook 2 # 打开工作簿 3 wb = load_workbook("t 阅读全文
posted @ 2020-05-24 11:38 Albeexu 阅读(799) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-05-23 22:40 Albeexu 阅读(24) 评论(0) 推荐(0) 编辑