pytest简易教程汇总,详见:https://www.cnblogs.com/uncleyong/p/17982846
关于pytest-html
通过命令行方式,生成xml/html格式的测试报告,存储于用户指定路径
报告会覆盖上一次的
插件安装
pip install pytest-html
使用方式
命令行格式:pytest --html=./report/report.html
也可以配置文件添加参数:
[pytest]
addopts = -vs --html=./report/report.html
示例
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : 韧
# @wx :ren