unitth


Nameunitth JSON
Version 0.0.11 PyPI version JSON
download
home_pagehttps://github.com/KarrLab/unitth
SummaryPython interface for UnitTH unit test history report generator
upload_time2016-11-02 14:24:50
maintainer
docs_urlNone
authorJonathan Karr
requires_python
licenseMIT
keywords unit test xunit junit unitth html history
VCS
bugtrack_url
requirements cement
Travis-CI No Travis.
coveralls test coverage
            |PyPI package| |Documentation| |Test results| |Test coverage| |Code
analysis| |License| |Analytics|

unitth
======

This package provides a Python method and command line interface for
generating HTML reports of unit test histories. The package is a Python
interface for the `UnitTH <http://junitth.sourceforge.net>`__.

Installation
------------

::

    pip install unitth

Usage
-----

Command line
~~~~~~~~~~~~

::

    usage: unitth (sub-commands ...) [options ...] {arguments ...}

    Generate HTML unit test history report

    positional arguments:
      xml_report_dir        Parent directory of XML reports of individual builds
                            to generate a history report of

    optional arguments:
      -h, --help            show this help message and exit
      --debug               toggle debug output
      --quiet               suppress all output
      --xml-report-filter [XML_REPORT_FILTER]
                            Starts-with filter for individual reports with `xml-
                            report-dir` that should be included in the history
                            report. Set `xml-report-filter` to to include all
                            files/subdirectories in the history report.
      --html-report-path HTML_REPORT_PATH
                            Directory of HTML reports of individual
                            builds(relative to XML directories of individual
                            builds)
      --generate-exec-time-graphs GENERATE_EXEC_TIME_GRAPHS
                            Whether execution time graphs shall be generated
      --html-report-dir HTML_REPORT_DIR
                            directory to store generated HTML history report
      --initial_java_heap_size INITIAL_JAVA_HEAP_SIZE
                            Initial Java heap size
      --maximum_java_heap_size MAXIMUM_JAVA_HEAP_SIZE
                            Maximum Java heap size

Example usage
-------------

Python
~~~~~~

::

    from nose2unitth.core import Converter as nose2unitth
    from junit2htmlreport.parser import Junit as JunitParser
    from unitth.core import UnitTH
    import os
    import subprocess

    os.mkdir('reports')
    os.mkdir('reports/nose')
    os.mkdir('reports/unitth')
    os.mkdir('reports/html')

    subprocess.check_call(['nosetests', 'tests/test_unitth.py:TestDummy.test_dummy_test',
                           '--with-xunit', '--xunit-file', 'reports/nose/1.xml'])
    subprocess.check_call(['nosetests', 'tests/test_unitth.py:TestDummy.test_dummy_test',
                           '--with-xunit', '--xunit-file', 'reports/nose/2.xml'])

    nose2unitth.run('reports/nose/1.xml', 'reports/unitth/1')
    nose2unitth.run('reports/nose/2.xml', 'reports/unitth/2')

    with open('reports/unitth/1/index.html', 'wb') as html_file:
        print >> html_file, JunitParser('reports/nose/1.xml').html()
    with open('reports/unitth/2/index.html', 'wb') as html_file:
        print >> html_file, JunitParser('reports/nose/2.xml').html()

    UnitTH.run('reports/unitth/*', xml_report_filter='', html_report_dir='reports/html')

Command line
~~~~~~~~~~~~

::

    mkdir reports
    mkdir reports/nose
    mkdir reports/unitth
    mkdir reports/html

    nosetests tests/test_unitth.py:TestDummy.test_dummy_test --with-xunit --xunit-file reports/nose/1.xml
    nosetests tests/test_unitth.py:TestDummy.test_dummy_test --with-xunit --xunit-file reports/nose/2.xml

    nose2unitth reports/nose/1.xml reports/unitth/1
    nose2unitth reports/nose/2.xml reports/unitth/2

    junit2html reports/nose/1.xml reports/unitth/1/index.html
    junit2html reports/nose/2.xml reports/unitth/2/index.html

    unitth --xml_report_filter --html_report_dir reports/html "reports/unitth/*"

Documentation
-------------

Please see the `API documentation <http://unitth.readthedocs.io>`__.

License
-------

The build utilities are released under the `MIT license <LICENSE>`__.

Development team
----------------

This package was developed by `Jonathan Karr <http://www.karrlab.org>`__
at the Icahn School of Medicine at Mount Sinai in New York, USA.

Questions and comments
----------------------

Please contact the `Jonathan Karr <http://www.karrlab.org>`__ with any
questions or comments.

.. |PyPI package| image:: https://img.shields.io/pypi/v/unitth.svg
   :target: https://pypi.python.org/pypi/unitth
.. |Documentation| image:: https://readthedocs.org/projects/unitth/badge/?version=latest
   :target: http://unitth.readthedocs.org
.. |Test results| image:: https://circleci.com/gh/KarrLab/unitth.svg?style=shield
   :target: https://circleci.com/gh/KarrLab/unitth
.. |Test coverage| image:: https://coveralls.io/repos/github/KarrLab/unitth/badge.svg
   :target: https://coveralls.io/github/KarrLab/unitth
.. |Code analysis| image:: https://codeclimate.com/github/KarrLab/unitth/badges/gpa.svg
   :target: https://codeclimate.com/github/KarrLab/unitth
.. |License| image:: https://img.shields.io/github/license/KarrLab/unitth.svg
   :target: LICENSE
.. |Analytics| image:: https://ga-beacon.appspot.com/UA-86759801-1/unitth/README.md?pixel

            

Raw data

            {
    "_id": null,
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "cheesecake_code_kwalitee_id": null,
    "keywords": "unit test xunit junit unitth HTML history",
    "upload_time": "2016-11-02 14:24:50",
    "requirements": [
        {
            "name": "cement",
            "specs": []
        }
    ],
    "author": "Jonathan Karr",
    "home_page": "https://github.com/KarrLab/unitth",
    "github_user": "KarrLab",
    "download_url": "https://pypi.python.org/packages/61/6a/df7266902e5c5e73b9aa6965159e3ed822429e7f504310fbac59e99c6b03/unitth-0.0.11.tar.gz",
    "platform": "UNKNOWN",
    "version": "0.0.11",
    "cheesecake_documentation_id": null,
    "description": "|PyPI package| |Documentation| |Test results| |Test coverage| |Code\nanalysis| |License| |Analytics|\n\nunitth\n======\n\nThis package provides a Python method and command line interface for\ngenerating HTML reports of unit test histories. The package is a Python\ninterface for the `UnitTH <http://junitth.sourceforge.net>`__.\n\nInstallation\n------------\n\n::\n\n    pip install unitth\n\nUsage\n-----\n\nCommand line\n~~~~~~~~~~~~\n\n::\n\n    usage: unitth (sub-commands ...) [options ...] {arguments ...}\n\n    Generate HTML unit test history report\n\n    positional arguments:\n      xml_report_dir        Parent directory of XML reports of individual builds\n                            to generate a history report of\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --debug               toggle debug output\n      --quiet               suppress all output\n      --xml-report-filter [XML_REPORT_FILTER]\n                            Starts-with filter for individual reports with `xml-\n                            report-dir` that should be included in the history\n                            report. Set `xml-report-filter` to to include all\n                            files/subdirectories in the history report.\n      --html-report-path HTML_REPORT_PATH\n                            Directory of HTML reports of individual\n                            builds(relative to XML directories of individual\n                            builds)\n      --generate-exec-time-graphs GENERATE_EXEC_TIME_GRAPHS\n                            Whether execution time graphs shall be generated\n      --html-report-dir HTML_REPORT_DIR\n                            directory to store generated HTML history report\n      --initial_java_heap_size INITIAL_JAVA_HEAP_SIZE\n                            Initial Java heap size\n      --maximum_java_heap_size MAXIMUM_JAVA_HEAP_SIZE\n                            Maximum Java heap size\n\nExample usage\n-------------\n\nPython\n~~~~~~\n\n::\n\n    from nose2unitth.core import Converter as nose2unitth\n    from junit2htmlreport.parser import Junit as JunitParser\n    from unitth.core import UnitTH\n    import os\n    import subprocess\n\n    os.mkdir('reports')\n    os.mkdir('reports/nose')\n    os.mkdir('reports/unitth')\n    os.mkdir('reports/html')\n\n    subprocess.check_call(['nosetests', 'tests/test_unitth.py:TestDummy.test_dummy_test',\n                           '--with-xunit', '--xunit-file', 'reports/nose/1.xml'])\n    subprocess.check_call(['nosetests', 'tests/test_unitth.py:TestDummy.test_dummy_test',\n                           '--with-xunit', '--xunit-file', 'reports/nose/2.xml'])\n\n    nose2unitth.run('reports/nose/1.xml', 'reports/unitth/1')\n    nose2unitth.run('reports/nose/2.xml', 'reports/unitth/2')\n\n    with open('reports/unitth/1/index.html', 'wb') as html_file:\n        print >> html_file, JunitParser('reports/nose/1.xml').html()\n    with open('reports/unitth/2/index.html', 'wb') as html_file:\n        print >> html_file, JunitParser('reports/nose/2.xml').html()\n\n    UnitTH.run('reports/unitth/*', xml_report_filter='', html_report_dir='reports/html')\n\nCommand line\n~~~~~~~~~~~~\n\n::\n\n    mkdir reports\n    mkdir reports/nose\n    mkdir reports/unitth\n    mkdir reports/html\n\n    nosetests tests/test_unitth.py:TestDummy.test_dummy_test --with-xunit --xunit-file reports/nose/1.xml\n    nosetests tests/test_unitth.py:TestDummy.test_dummy_test --with-xunit --xunit-file reports/nose/2.xml\n\n    nose2unitth reports/nose/1.xml reports/unitth/1\n    nose2unitth reports/nose/2.xml reports/unitth/2\n\n    junit2html reports/nose/1.xml reports/unitth/1/index.html\n    junit2html reports/nose/2.xml reports/unitth/2/index.html\n\n    unitth --xml_report_filter --html_report_dir reports/html \"reports/unitth/*\"\n\nDocumentation\n-------------\n\nPlease see the `API documentation <http://unitth.readthedocs.io>`__.\n\nLicense\n-------\n\nThe build utilities are released under the `MIT license <LICENSE>`__.\n\nDevelopment team\n----------------\n\nThis package was developed by `Jonathan Karr <http://www.karrlab.org>`__\nat the Icahn School of Medicine at Mount Sinai in New York, USA.\n\nQuestions and comments\n----------------------\n\nPlease contact the `Jonathan Karr <http://www.karrlab.org>`__ with any\nquestions or comments.\n\n.. |PyPI package| image:: https://img.shields.io/pypi/v/unitth.svg\n   :target: https://pypi.python.org/pypi/unitth\n.. |Documentation| image:: https://readthedocs.org/projects/unitth/badge/?version=latest\n   :target: http://unitth.readthedocs.org\n.. |Test results| image:: https://circleci.com/gh/KarrLab/unitth.svg?style=shield\n   :target: https://circleci.com/gh/KarrLab/unitth\n.. |Test coverage| image:: https://coveralls.io/repos/github/KarrLab/unitth/badge.svg\n   :target: https://coveralls.io/github/KarrLab/unitth\n.. |Code analysis| image:: https://codeclimate.com/github/KarrLab/unitth/badges/gpa.svg\n   :target: https://codeclimate.com/github/KarrLab/unitth\n.. |License| image:: https://img.shields.io/github/license/KarrLab/unitth.svg\n   :target: LICENSE\n.. |Analytics| image:: https://ga-beacon.appspot.com/UA-86759801-1/unitth/README.md?pixel\n",
    "lcname": "unitth",
    "name": "unitth",
    "github": true,
    "bugtrack_url": null,
    "license": "MIT",
    "travis_ci": false,
    "github_project": "unitth",
    "summary": "Python interface for UnitTH unit test history report generator",
    "split_keywords": [
        "unit",
        "test",
        "xunit",
        "junit",
        "unitth",
        "html",
        "history"
    ],
    "author_email": "jonrkarr@gmail.com",
    "urls": [
        {
            "has_sig": false,
            "upload_time": "2016-11-02T14:24:48",
            "comment_text": "",
            "python_version": "py2.py3",
            "url": "https://pypi.python.org/packages/2d/d6/30607d6cd4ef10aa836ddc3302cc465da09503f4d7bc038fc0176551598c/unitth-0.0.11-py2.py3-none-any.whl",
            "md5_digest": "1837cd1c2b8fbdf068eed883c0d55c38",
            "downloads": 0,
            "filename": "unitth-0.0.11-py2.py3-none-any.whl",
            "packagetype": "bdist_wheel",
            "path": "2d/d6/30607d6cd4ef10aa836ddc3302cc465da09503f4d7bc038fc0176551598c/unitth-0.0.11-py2.py3-none-any.whl",
            "size": 105626
        },
        {
            "has_sig": false,
            "upload_time": "2016-11-02T14:24:50",
            "comment_text": "",
            "python_version": "source",
            "url": "https://pypi.python.org/packages/61/6a/df7266902e5c5e73b9aa6965159e3ed822429e7f504310fbac59e99c6b03/unitth-0.0.11.tar.gz",
            "md5_digest": "7f8bcd92ced5daff352ab7fd924efa35",
            "downloads": 0,
            "filename": "unitth-0.0.11.tar.gz",
            "packagetype": "sdist",
            "path": "61/6a/df7266902e5c5e73b9aa6965159e3ed822429e7f504310fbac59e99c6b03/unitth-0.0.11.tar.gz",
            "size": 107321
        }
    ],
    "cheesecake_installability_id": null,
    "coveralls": true
}
        
Elapsed time: 0.03653s