Skip to main content

A Test Runner in python, for Human Readable HTML Reports

Project description

https://img.shields.io/pypi/v/html-testRunner-df.svg https://img.shields.io/travis/oldani/HtmlTestRunner.svg

NOTE: This Package fork by html-testRunner==1.2.1 and fixed some bug. if html-testRunner release the new version, you should reinstall it pip install html-testRunner -U

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.

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-df-1.2.2.dev3.tar.gz (551.1 kB view details)

Uploaded Source

File details

Details for the file html-testRunner-df-1.2.2.dev3.tar.gz.

File metadata

  • Download URL: html-testRunner-df-1.2.2.dev3.tar.gz
  • Upload date:
  • Size: 551.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2

File hashes

Hashes for html-testRunner-df-1.2.2.dev3.tar.gz
Algorithm Hash digest
SHA256 4ff6f266681b9c458a551d96d4da0dded96f98606e3f7b577e89add055398db5
MD5 3592d2f21652c8dcb89a22d604c7210c
BLAKE2b-256 18fcb1b39424c5a258e16bdf37eeb4b530f06c94e73ee3e8d475eb5e124a9319

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page