Coder Social home page Coder Social logo

mikigo / allure-custom Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 0.0 16.99 MB

自定义allure报告的GUI界面展示效果,包括颜色、文案、语言等等。

Home Page: https://mikigo.github.io/allure-custom/

License: Apache License 2.0

Python 21.33% Shell 25.51% Batchfile 8.32% JavaScript 41.12% CSS 3.72%
allure allure-report custom pytest python3

allure-custom's Introduction

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

allure-custom's People

Contributors

mikigo avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.