HTMLTestRunner-rv


NameHTMLTestRunner-rv JSON
Version 1.1.2 PyPI version JSON
download
home_pagehttps://github.com/ravikiranb36/HTMLTestRunner.io.git
SummaryHTMLTestRunner for unit test framework
upload_time2023-08-07 03:06:00
maintainer
docs_urlNone
authorRavikirana B
requires_python>=3.6
licenseMIT
keywords htmltestrunner testrunner html reports
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HTMLTestRunner
```text
HTMLTestRunner for python3 

A TestRunner for use with the Python unit testing framework. 
It generates a HTML report to show the result at a glance.
It logs stdout to *.txt file with timestamp
Easy to find bugs
```
#[<span style="color: grey;"> Click here for HTMLTestRunner-rv documentation</span>](https://ravikiranb36.github.io/htmltestrunner-rv.github.io/)

#Installation:
```bash
pip install HTMLTestRunner-rv
```

# Creating suite
```python
my_test_suite = unittest.TestSuite()
```

# output to a file
```python
runner = HTMLTestRunner(
title='My unit test', open_in_browser=True)
```

# run the test
```python
runner.run(my_test_suite)
```

#Example code:
```python
import unittest

from HTMLTestRunner.runner import HTMLTestRunner
from tests.test_1 import TestCase1
from tests.test_2 import TestCase2

test1 = unittest.TestLoader().loadTestsFromTestCase(TestCase1)
test2 = unittest.TestLoader().loadTestsFromTestCase(TestCase2)
suite = unittest.TestSuite([test1, test2])
runner = HTMLTestRunner(log=True, verbosity=2, output='report', title='Test report', report_name='report',
                        open_in_browser=True, description="HTMLTestReport", tested_by="Ravikirana B",
                        add_traceback=False)

runner.run(suite)
```
## Now you can pass external css styling and javascript for report
### Example:
```python
style = """
    .heading {
    margin-top: 0ex;
    margin-bottom: 1ex;
    border-style:ridge;
    color:white;
    background-color:#999900;
    font-weight:bold;
    }
"""
script = """
    Your script
"""
runner = HTMLTestRunner(log=True, verbosity=2, output='report', title='Test report', report_name='report',
                        open_in_browser=True, description="HTMLTestReport", script=script, style=style)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ravikiranb36/HTMLTestRunner.io.git",
    "name": "HTMLTestRunner-rv",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "HtmlTestRunner TestRunner Html Reports",
    "author": "Ravikirana B",
    "author_email": "ravikiranb36@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/78/c9/2d3f7e338d8a136913791a8a5899c9f83fa9a07bac25119db01d1caebb50/HTMLTestRunner-rv-1.1.2.tar.gz",
    "platform": null,
    "description": "# HTMLTestRunner\r\n```text\r\nHTMLTestRunner for python3 \r\n\r\nA TestRunner for use with the Python unit testing framework. \r\nIt generates a HTML report to show the result at a glance.\r\nIt logs stdout to *.txt file with timestamp\r\nEasy to find bugs\r\n```\r\n#[<span style=\"color: grey;\"> Click here for HTMLTestRunner-rv documentation</span>](https://ravikiranb36.github.io/htmltestrunner-rv.github.io/)\r\n\r\n#Installation:\r\n```bash\r\npip install HTMLTestRunner-rv\r\n```\r\n\r\n# Creating suite\r\n```python\r\nmy_test_suite = unittest.TestSuite()\r\n```\r\n\r\n# output to a file\r\n```python\r\nrunner = HTMLTestRunner(\r\ntitle='My unit test', open_in_browser=True)\r\n```\r\n\r\n# run the test\r\n```python\r\nrunner.run(my_test_suite)\r\n```\r\n\r\n#Example code:\r\n```python\r\nimport unittest\r\n\r\nfrom HTMLTestRunner.runner import HTMLTestRunner\r\nfrom tests.test_1 import TestCase1\r\nfrom tests.test_2 import TestCase2\r\n\r\ntest1 = unittest.TestLoader().loadTestsFromTestCase(TestCase1)\r\ntest2 = unittest.TestLoader().loadTestsFromTestCase(TestCase2)\r\nsuite = unittest.TestSuite([test1, test2])\r\nrunner = HTMLTestRunner(log=True, verbosity=2, output='report', title='Test report', report_name='report',\r\n                        open_in_browser=True, description=\"HTMLTestReport\", tested_by=\"Ravikirana B\",\r\n                        add_traceback=False)\r\n\r\nrunner.run(suite)\r\n```\r\n## Now you can pass external css styling and javascript for report\r\n### Example:\r\n```python\r\nstyle = \"\"\"\r\n    .heading {\r\n    margin-top: 0ex;\r\n    margin-bottom: 1ex;\r\n    border-style:ridge;\r\n    color:white;\r\n    background-color:#999900;\r\n    font-weight:bold;\r\n    }\r\n\"\"\"\r\nscript = \"\"\"\r\n    Your script\r\n\"\"\"\r\nrunner = HTMLTestRunner(log=True, verbosity=2, output='report', title='Test report', report_name='report',\r\n                        open_in_browser=True, description=\"HTMLTestReport\", script=script, style=style)\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "HTMLTestRunner for unit test framework",
    "version": "1.1.2",
    "project_urls": {
        "Homepage": "https://github.com/ravikiranb36/HTMLTestRunner.io.git"
    },
    "split_keywords": [
        "htmltestrunner",
        "testrunner",
        "html",
        "reports"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78c92d3f7e338d8a136913791a8a5899c9f83fa9a07bac25119db01d1caebb50",
                "md5": "160b7015ae36191ea8378a15268e4e6d",
                "sha256": "2d965ff8fc4834b57e9cbd7039214f28c4677e58871e32d136230da95e258229"
            },
            "downloads": -1,
            "filename": "HTMLTestRunner-rv-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "160b7015ae36191ea8378a15268e4e6d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 13544,
            "upload_time": "2023-08-07T03:06:00",
            "upload_time_iso_8601": "2023-08-07T03:06:00.163461Z",
            "url": "https://files.pythonhosted.org/packages/78/c9/2d3f7e338d8a136913791a8a5899c9f83fa9a07bac25119db01d1caebb50/HTMLTestRunner-rv-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-07 03:06:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ravikiranb36",
    "github_project": "HTMLTestRunner.io",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "htmltestrunner-rv"
}
        
Elapsed time: 0.10226s