首先pytest 需要安装(不是默认就有)
安装pytest和pytest-html(生成html测试报告) pip install pytest 和 pip install pytest-html
一 需要生成html测试报告
前提是需要 通过读取csv/xml数据并且结合使用allure展示测试报告,验证开发中的add()
和reduct()操作(在@allure.story分别实现相加减)
1.1.读取csv数据
1.2.读取xml数据
二.配置环境变量
三.allure的特性
@allure.feature # 用于描述被测试产品需求
@allure.story # 用于描述feature的用户场景,即测试需求
作业