要配置pytest-html生成HTML的测试报告,你可以按照以下步骤进行操作: 1. 安装pytest和pytest-html库 首先,你需要确保已经安装了pytest和pytest-html。你可以使用pip进行安装: bash pip install pytest pytest-html 2. 编写pytest测试用例 接下来,编写一些pytest测试用例。例如,创建一个名为test_example.py的文件,并添...
2.1 安装Allure Pytest Plugin allure-pytest是Pytest的一个插件,通过它我们可以生成Allure所需要的用于生成测试报告的数据。安装allure-pytest插件方法: $ pip install allure-pytest 2.2 改造基于Pytest的测试用例 allure-pytest的官方文档中详细介绍了allure-pytest所具有的功能。本篇文章不会再翻译一遍,而是从实际入手,...
2.1 安装Allure Pytest Plugin allure-pytest是Pytest的一个插件,通过它我们可以生成Allure所需要的用于生成测试报告的数据。安装allure-pytest插件方法: $ pip install allure-pytest 2.2 改造基于Pytest的测试用例 allure-pytest的官方文档中详细介绍了allure-pytest所具有的功能。本篇文章不会再翻译一遍,而是从实际入手,...