pytest支持基于pytest-html生成html报告
发布时间
阅读量:
阅读量
1、安装pytest-html
通过执行命令pip install pytest-html -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com即可完成对pytest-html的安装操作
有关详细信息,可参考官方文档:pytest-html官方链接
2、书写pytest测试用例
编写测试用例文件Test_simple.py:
#-*- coding: utf-8 -*-
import pytest
class Test_simple():
def test_case1(self):
tof = True
assert tof
def test_case2(self):
tof = False
assert tof
3、运行用例设计
全部评论 (0)
还没有任何评论哟~
