
pytest
ezreal_tao
这个作者很懒,什么都没留下…
展开
-
pytest添加附件到allure报告上
import allureimport pytestdef test_allure_print(): print("测试print在allure报告上") print("测试截图附件在allure报告上") with open("attach.png", "rb") as f: context = f.read() allure.a...原创 2020-05-03 13:49:03 · 1058 阅读 · 0 评论 -
pytest使用
失败重跑需要依赖pytest-rerunfailures插件,使用pip安装就行pip install pytest-rerunfailures 安装pytestpip install -U pytest安装pytest-html的测试报告pip install pytest-htmlpytest-allure报告安装pip install pytest-allure...原创 2019-04-18 18:27:03 · 499 阅读 · 0 评论 -
jenkins配置allure报告
Jenkins配置allure系统环境:centos xxxjenkins版本 xxx步骤安装 pytest-allure-adaptor;使用命令 pip install pytest-allure-adaptorJenkins安装allure插件;插件名 Allure Jenkins PluginJenkins系统管理——全局工具配置——Allure Commandli...原创 2019-08-29 12:45:26 · 893 阅读 · 0 评论 -
allure-pytest的报错截图添加到报告
# 写在conftest.pyimport osimport allurefrom selenium import webdriverimport pytest# 添加报错截图到allure报告里driver = None@pytest.hookimpl(tryfirst=True, hookwrapper=True)def pytest_runtest_makerepor...原创 2019-08-29 22:49:43 · 7485 阅读 · 7 评论 -
pytest-html报告里添加报错截图
# 写在conftest.pyfrom selenium import webdriverimport pytestdriver = None@pytest.mark.hookwrapperdef pytest_runtest_makereport(item): """ Extends the PyTest Plugin to take and embed scr...原创 2019-08-29 22:51:06 · 1847 阅读 · 0 评论