All Projects → SeldomQA → HTMLTestRunner

SeldomQA / HTMLTestRunner

Licence: Apache-2.0 license
Modern style test report based on unittest framework.

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to HTMLTestRunner

Pytruth
Assertion framework for Python unit tests
Stars: ✭ 118 (-7.81%)
Mutual labels:  unittest
Wechatvideocourse
《微信公众号+小程序快速开发》视频教程课件及代码
Stars: ✭ 185 (+44.53%)
Mutual labels:  unittest
FineCodeCoverage
Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
Stars: ✭ 391 (+205.47%)
Mutual labels:  unittest
Javascript Testing Best Practices
📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (August 2021)
Stars: ✭ 13,976 (+10818.75%)
Mutual labels:  unittest
Ploop
Prototype Lua object-oriented program system, with many modern features like attribute, overload, etc. For Lua 5.1 or above, include luajit
Stars: ✭ 163 (+27.34%)
Mutual labels:  unittest
Python Unittest Tutorial
Python3 tutorial - unittest module - PyMOTW
Stars: ✭ 190 (+48.44%)
Mutual labels:  unittest
Spectator
🦊 🚀 A Powerful Tool to Simplify Your Angular Tests
Stars: ✭ 1,386 (+982.81%)
Mutual labels:  unittest
dumbmutate
Simple mutation-testing
Stars: ✭ 32 (-75%)
Mutual labels:  unittest
Coverlet
Cross platform code coverage for .NET
Stars: ✭ 2,303 (+1699.22%)
Mutual labels:  unittest
Datatest
Tools for test driven data-wrangling and data validation.
Stars: ✭ 238 (+85.94%)
Mutual labels:  unittest
Pyrequest
接口自动化项目
Stars: ✭ 135 (+5.47%)
Mutual labels:  unittest
Expekt
BDD assertion library for Kotlin
Stars: ✭ 163 (+27.34%)
Mutual labels:  unittest
Go Carpet
go-carpet - show test coverage in terminal for Go source files
Stars: ✭ 210 (+64.06%)
Mutual labels:  unittest
Miniredis
Pure Go Redis server for Go unittests
Stars: ✭ 1,907 (+1389.84%)
Mutual labels:  unittest
elm-doctest
doctest runner against Elm-lang source files
Stars: ✭ 13 (-89.84%)
Mutual labels:  unittest
Python cpp example
An example of a hybrid python/C++ package with unit tests
Stars: ✭ 107 (-16.41%)
Mutual labels:  unittest
Django Mock Queries
A library for mocking django queryset functions in memory for testing
Stars: ✭ 187 (+46.09%)
Mutual labels:  unittest
laziest
Work in Progress: Package that trying to generate unit tests from code
Stars: ✭ 18 (-85.94%)
Mutual labels:  unittest
JMemoryBuddy
No description or website provided.
Stars: ✭ 44 (-65.62%)
Mutual labels:  unittest
Fake Xrm Easy
The testing framework for Dynamics CRM and Dynamics 365 which runs on an In-Memory context and deals with mocks or fakes for you
Stars: ✭ 216 (+68.75%)
Mutual labels:  unittest

Modern style test report based on unittest framework.

基于unittest框架现代风格测试报告。

特点

  • 漂亮测试报告让你更愿意编写测试。
  • 支持单元Web UIAPI 各种类型的测试。
  • 支持Selenium运行失败/错误自动截图。
  • 支持失败重跑。
  • 支持标签黑、白名单。
  • 支持发邮件功能。
  • 支持多语言enzh-CN 等。
  • 支持HTML/XML不同格式的报告。

Report

Install

> pip install XTestRunner

If you want to keep up with the latest version, you can install with github repository url:

> pip install -U git+https://github.com/SeldomQA/XTestRunner.git@master

demo

查看更多使用 例子

  • unittest测试
import unittest
from XTestRunner import HTMLTestRunner


class TestDemo(unittest.TestCase):
    """测试用例说明"""
    
    def test_success(self):
        """执行成功"""
        self.assertEqual(2 + 3, 5)
    
    @unittest.skip("skip case")
    def test_skip(self):
        """跳过用例"""
        pass
    
    def test_fail(self):
        """失败用例"""
        self.assertEqual(5, 6)
    
    def test_error(self):
        """错误用例"""
        self.assertEqual(a, 6)

if __name__ == '__main__':
    suit = unittest.TestSuite()
    suit.addTests([
        TestDemo("test_success"),
        TestDemo("test_skip"),
        TestDemo("test_fail"),
        TestDemo("test_error")
    ])
    
    with(open('./result.html', 'wb')) as fp:
        runner = HTMLTestRunner(
            stream=fp,
            title='<project name>test report',
            description='describe: ... ',
            language='en',
        )
        runner.run(
            testlist=suit,
            rerun=2,
            save_last_run=False
        )

Document

中文文档

感谢

感谢从以下项目中得到思路和帮助。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].