# python_pytest_environmental_information **Repository Path**: HP_mojin/python_pytest_environmental_information ## Basic Information - **Project Name**: python_pytest_environmental_information - **Description**: https://blog.csdn.net/qq_42846555/article/details/136206564 - **Primary Language**: Unknown - **License**: 0BSD - **Default Branch**: master - **Homepage**: https://blog.csdn.net/qq_42846555/article/details/136206564 - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-02-21 - **Last Updated**: 2024-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # pyest+allure框架将环境参数添加到allure首页展示 #### 介绍 https://blog.csdn.net/qq_42846555/article/details/136206564 #### 软件架构 # pyest+allure框架将环境参数添加到allure首页展示 #### 安装教程 1.手动添加参数 2.自动获取环境参数 2.格式化获取环境参数 3.pytest+allure框架执行完成用例后执行调用,environmental_information函数 4.修改获取的环境参数(补充) #### 使用说明 1. pyest+allure框架执行完成后,在allure生成的allure-results目录下创建一个environment.properties文件并将环境参数,以a=b的方式,写在文件中 2. 完成上述步骤,执行窗口命令“allure generate ./target/allure-results -o ./target/allure-report --clean ”,将报告原始数据,生成allure的html 报告,即可完成添加参数到allure首页 3. 执行pyest+allure框架时会发现,环境参数是以及被获取到的,我们只需要拿到参数即可!在conftest.py中,通过引用可以之间使用打印 4. 将上述,获取到的环境参数,格式化整理为,allure报告需要参数格式,以a=b的方式,写在environment.properties文件中 4. pytest+allure框架执行完成用例后执行调用,environmental_information函数 4. 修改获取的环境参数 #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)