allure定制测试报告logo
找到allure安装目录
更换logo
添加插件
第一步:更换logo
C:\pyton_path\allure-2.13.6\plugins\custom-logo-plugin\static
static文件夹放的是默认的测试报告logo
custom-logo.svg 默认logo
两种修改logo的方式:
1、删掉默认logo,把新的logo复制进static文件夹
2、保留默认logo,把新的logo复制进static文件夹
1.2 更换打开logo的名称
1、打开styles.css文件
styles.css文件默认内容
2、修改styles.css文件内容的url(‘custom-logo.svg’),为url(‘自己logo的名称’)
3、修改logo的尺寸
因为复制进去的logo大小不一致会导致显示的不好看,所以还需要修改尺寸:
.side-nav__brand {undefined
background: url(‘mylogo.jpg’) no-repeat left center !important;
margin-left: 10px;
height: 55px;
background-size: contain !important;
}
.side-nav__brand-text {undefined
display: none;
}
第二步:添加插件
1、打开C:\pyton_path\allure-2.13.6\config,里面的allure.yml文件
添加一行custom-logo-plugin