摘要:
在conftest.py中实现 @pytest.mark.optionalhookdef pytest_html_results_summary(prefix, summary, postfix): prefix.extend([html.p("测试人: 电商测试组")])@pytest.mark. 阅读全文
posted @ 2020-06-28 23:47
wakey
阅读(1331)
评论(1)
推荐(1)
摘要:
1、打开cmd,cd到需要执行pytest用例的目录,执行指令:pytest --html=report.html 2、指定报告的path 执行指令: pytest --html=./report/report.html #相对路径,也可指定绝对路径 报告独立显示 上面方法生成的报告,css是独立的 阅读全文
posted @ 2020-06-28 23:05
wakey
阅读(199)
评论(0)
推荐(0)
摘要:
fixture里面有个参数autouse,默认是Fasle没开启的,可以设置为True开启自动使用fixture功能,这样用例就不用每次都去传参了 调用fixture三种方法 1.函数或类里面方法直接传fixture的函数参数名称 2.使用装饰器@pytest.mark.usefixtures()修 阅读全文
posted @ 2020-06-28 22:23
wakey
阅读(3195)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-from httprunner.api import HttpRunnerfrom httprunner.report import gen_html_report# 1、创建HttpRunner对象# failfast当用例执行失败之后,会自动暂停,默 阅读全文
posted @ 2020-06-28 13:38
wakey
阅读(833)
评论(0)
推荐(0)

浙公网安备 33010602011771号