Skip to main content

allure-custom

定制 Allure 报告

目前支持的定制项:

  1. logo

  2. 标题栏文案

  3. 侧边栏颜色

  4. 默认暂时的语言


Documentation: https://funny-dream.github.io/allure-custom

Source Code: https://github.com/funny-dream/allure-custom


安装

pip install allure-custom

配置

from allure_custom.conf import setting

# 测试报告的title
setting.html_title = "funny_test"
# 测试报告的name
setting.report_name = "Funny_Test"

# 测试报告的默认语言
# en:English
# ru:Русский
# zh:中文
# de:Deutsch
# nl:Nederlands
# he:Hebrew
# br:Brazil
# pl:Polski
# ja:日本語
# es:Español
# kr:한국어
# fr:Français
# az:Azərbaycanca
setting.report_language = "zh"

# 左上角 logo 图片
# 注意这里给一个绝对路径
setting.logo_png = "/home/xxx/logo.png"

# html favicon
# 注意这里给一个绝对路径
setting.favicon_ico = "/home/xxx/favicon.ico"

使用方法

from allure_custom import AllureCustom

# 生成html测试报告
# ~/Desktop/report 此目录下保存了allure的json\txt的报告文件
AllureCustom.gen(report_path="~/Desktop/report", generate_allure_html="~/Desktop/html")

# 打开html测试报告
AllureCustom.open(generate_allure_html="~/Desktop/html")

# 直接生成在线测试报告
AllureCustom.serve(report_path="~/Desktop/report")
# 根据终端输出提示的在线链接,在浏览器查看即可;

效果展示

allure-custom

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

allure_custom-2024.5.24.tar.gz (20.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

allure_custom-2024.5.24-py3-none-any.whl (20.7 MB view details)

Uploaded Python 3

File details

Details for the file allure_custom-2024.5.24.tar.gz.

File metadata

  • Download URL: allure_custom-2024.5.24.tar.gz
  • Upload date:
  • Size: 20.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.3

File hashes

Hashes for allure_custom-2024.5.24.tar.gz
Algorithm Hash digest
SHA256 e85889c5ee0921708aae2d3a808e61e79124ebf8435bdb2a08e0118d97f5bca2
MD5 f2b25232cacd852acaa2cd3193381226
BLAKE2b-256 c7a1bc757205b82461f5a54f629cf97842c4d7b55744bc7a0c33550984915221

See more details on using hashes here.

File details

Details for the file allure_custom-2024.5.24-py3-none-any.whl.

File metadata

File hashes

Hashes for allure_custom-2024.5.24-py3-none-any.whl
Algorithm Hash digest
SHA256 c93680a03c0cba7249ffaa2636e5e3e70105aaf2990a26d74a71b890e0926d4b
MD5 571763bf21c7326907cf8e810a971a1e
BLAKE2b-256 01686387a8d3db5fc4465c1f1d8ae04dfcd7fff112cb259946694bd1e07efb9d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2024.5.24 This release

2 files

2023.12.22

2 files

2023.7.7

2 files

2023.7.6

2 files

2023.6.27

2 files

2023.6.14

2 files

1.2.2

2 files

1.2.1

2 files

1.1.3

2 files

1.1.2

2 files

1.0.2

2 files

1.0.1

1 file

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page