A Test Runner in python, for Human Readable HTML Reports
Project description
HtmlTest runner is a unittest test runner that save test results in Html files, for human readable presentation of results.
This Package was inspired in unittest-xml-reporting and HtmlTestRunner by tungwaiyip.
Usage:
import HtmlTestRunner
import unittest
class TestStringMethods(unittest.TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_error(self):
""" This test should be marked as error one. """
raise ValueError
def test_fail(self):
""" This test should fail. """
self.assertEqual(1, 2)
@unittest.skip("This is a skipped test.")
def test_skip(self):
""" This test should be skipped. """
pass
if __name__ == '__main__':
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output='example_dir'))
As simple as import the class an initialize it, it only have one request parameter that is output, this one is use to place the report in a sub direcotry in reports directory.
Links:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
html-testRunner-1.2.tar.gz
(535.2 kB
view hashes)
Built Distribution
Close
Hashes for html_testRunner-1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00bfaf75f759f86300bacd9d22a9c5e5bbbdeca7b06e1697947e52433ed19a71 |
|
MD5 | 5d7806f51656b7b30486dccc34af5777 |
|
BLAKE2b-256 | 620f52698d5383407491ab2415a238d34e8c2f9804ece44c7410274041194a88 |