当前位置:网站首页>【pytest】修改allure报告中的logo及参数化
【pytest】修改allure报告中的logo及参数化
2022-06-25 06:39:00 【勒布朗-孟】
文章目录
一、Pytest生成Allure报告-改变报告logo
1、找到Allure安装static目录文件:
D:\python自动化相关资料\pytest\allure-2.13.6\plugins\custom-logo-plugin\static
2、将需要替换的logo文件保存在该目录下:【并命名为allure_logo.png】

3、同时打开目录下styles.css文件:
替换为以下内容:
.side-nav__brand {
background: url(‘allure_logo.png’) no-repeat left center !important;
url(‘allure_logo.png’),就是表示allure报告中所要加载显示的logo
margin-left: 10px;
height: 40px;
background-size: contain !important;
}
.side-nav__brand span{
display: none;
}
.side-nav__brand:after{
content: “8线Test”; #这是的内容对应的是我logo后面的内容,在接下来的截图中可以看到,如果不写这个样式,默认的就是allure
margin-left: 10px;
}
4、在D:\python自动化相关资料\pytest\allure-2.13.6\config目录下的allure.yaml文件下添加
- coustom-logo-plugin
添加完成后保存并再次运行
5、替换成功:

二、如何修改allure报告中用例参数化:
2.1、正常情况下:Allure报告中的参数化:(一长串)

2.2、修改方法:
找到python安装目录下D:\Python\Lib\site-packages\allure_pytest
listener.py文件第95行进行修改:(修改成下图样子)
边栏推荐
- アルマ / alchemy girl
- How to store the directory / hierarchy / tree structure in the database- How to store directory / hierarchy / tree structure in the database?
- Event registration Apache pulsar x kubesphere online meetup hot registration
- 深入解析 Apache BookKeeper 系列:第三篇——读取原理
- Why is true == "true" true in R- Why TRUE == “TRUE” is TRUE in R?
- Several schemes of traffic exposure in kubernetes cluster
- Blue Bridge Cup SCM module code (external interrupt) (code + comment)
- N – simple encoding
- shell 上下两行合并成一行
- Shell command learning
猜你喜欢

Event registration Apache pulsar x kubesphere online meetup hot registration

弱大数定理的意义与证明

Several schemes of traffic exposure in kubernetes cluster

I have used it for six years!

48 张图 | 手摸手教你微服务的性能监控、压测和调优

深入解析 Apache BookKeeper 系列:第三篇——读取原理

Design a MySQL table for message queue to store message data

Harmony美食菜单界面

我与CSDN的一年时光及大学经验分享

有了 MySQL 为什么要用 NoSQL?
随机推荐
1W words | 40 pictures | hard core es actual combat
关于硬件问题造成的MCU死机,过来人简单的谈一谈
Global variables & local variables
Event registration Apache pulsar x kubesphere online meetup hot registration
レ / leilei
MySQL (12) -- Notes on changing tables
Qcom--lk phase I2C interface configuration scheme -i2c6
Jameswebb Space Telescope goes into operation to help study interstellar objects
MySQL - definition and assignment of variables
How do I know if mysqlnd is an active driver- How to know if MySQLnd is the active driver?
Lotus windowsost manually triggers space-time proof calculation
【C语言】给字符串增加分隔符
How to get the difference between two dates rounded to hours
How do I create a guid in excel- How to create a GUID in Excel?
How do I get red green blue (RGB) and alpha back from a UIColor object?
shell 上下两行合并成一行
[tool sharing] a software that pays equal attention to appearance and skills
鸿蒙页面菜单的选择
Which securities company do you want to buy stocks to open an account faster and safer
Icon already includes gloss effects