Git Product home page Git Product logo

htmltestrunnercn's Introduction

[说明]

HTMLTestRunner输出的报告真的很丑,于是找了一圈没有我自已想要的html,所以自己动手进行了美化
原作者文件下载地址:http://tungwaiyip.info/software/HTMLTestRunner.html
我基于其Version 0.8.2进行了修改美化具体内容如下:

Version 20170609   -Findyou
* python3x  #仅支持python3x
   # Version 0.8.2.2
   # HTMLTestReportCN.py  中文报告
   # HTMLTestReportEN.py  英文报告
   
* python2x  #仅支持python2x
   # Version 0.8.2.1
   # HTMLTestRunnerEN.py  中文报告
   # HTMLTestRunnerCN.py  英文报告


Version 0.8.2.1 -Findyou
* CN汉化EN保留英文加Utf-8支持报告中文字符
* 增加 样式美化需要网络* 增加 通过用例 分类按钮
* 增加 测试人员显示通过率的统计
* 增加 按钮显示相应用例数
* 修改 测试结果的展示方便拷贝数据
* 修改详细逻辑增加与收起效果变换
* 右侧底部增加 返回 顶部的锚点

[如何使用]

一、HTMLTestRunnerEN(python2.x) 使用

有时大伙会觉得英语会有莫名的逼格(感叹,沉默),所以保留了英文显示,满足大家的需要,报告内容支持中文显示。

  • 编写test_HTMLTestRunnerEN.py
import HTMLTestRunnerEN
...

if __name__ == '__main__':
    filePath ='F:\\Report.html'
    fp = file(filePath,'wb')
    runner = HTMLTestRunnerEN.HTMLTestRunner(
        stream=fp,
        title='{ Test Report }',
        #description='',
        #tester="Findyou"
        )
    runner.run(Suite())
  • 执行test_HTMLTestRunnerEN.py
python test_HTMLTestRunnerEN.py
  • 执行结果:Report.html

二、HTMLTestRunnerCN(python2.x) 使用

使用同HTMLTestRunnerEN,无区别

  • 执行结果:Report.html

三、HTMLTestReportCN(python3.x) 使用

使用同HTMLTestRunnerEN,无区别

四、HTMLTestReportEN(python3.x) 使用

使用同HTMLTestRunnerEN,无区别

htmltestrunnercn's People

Contributors

findyou avatar

Forkers

daiyongheng123

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.