本次我想实现的是不光是使用数据文件进行驱动还有自定义测试报告
第一步创建数据文件 test_data_list.json名字的数据文件

第二步 创建 ReportTemplate.py 文件,用于生成自定义HTML测试报告


第三步创建DataDriverTest.py文件内容如下
先用类装饰器 @ddt 来修饰 类TestDemo



运行代码
打开生成的html报告结果如下

第一步创建数据文件 test_data_list.json名字的数据文件
第二步 创建 ReportTemplate.py 文件,用于生成自定义HTML测试报告
第三步创建DataDriverTest.py文件内容如下
先用类装饰器 @ddt 来修饰 类TestDemo
运行代码
打开生成的html报告结果如下
本文标题:使用数据文件进行驱动自动化测试框架
本文链接:https://www.haomeiwen.com/subject/tqwymqtx.html
网友评论