Introduction
============
.. image:: https://travis-ci.org/Shoobx/shoobx.junitxml.png?branch=master
:target: https://travis-ci.org/Shoobx/shoobx.junitxml
.. image:: https://coveralls.io/repos/github/Shoobx/shoobx.junitxml/badge.svg?branch=master
:target: https://coveralls.io/github/Shoobx/shoobx.junitxml?branch=master
.. image:: https://img.shields.io/pypi/v/shoobx.junitxml.svg
:target: https://pypi.python.org/pypi/shoobx.junitxml
.. image:: https://img.shields.io/pypi/pyversions/shoobx.junitxml.svg
:target: https://pypi.python.org/pypi/shoobx.junitxml/
.. image:: https://api.codeclimate.com/v1/badges/e87bfa9e26534e0a0c87/maintainability
:target: https://codeclimate.com/github/Shoobx/shoobx.junitxml/maintainability
:alt: Maintainability
This package provides a `zope.testrunner` feature that stores the test
results in a JUnit-compatible XML file. This file can be consumed by
Jenkins and other tools to generate test reports.
This is achieved by implementing a custom output formatter that
collects and then writes out the XML file. The formatter then
delegates further test result tracking to the oriignal output formatter.
The core code of this package is based on the excellent work by Martin
Aspelli and the Plone Foundation. Thus the code is released under ZPL
2.1, the original license of `collective.xmltestreport`.
Usage
=====
In order to install your own features, you have to customize the main
`Runner` class a bit. Here is what we do at Shoobx:
::
from shoobx.junitxml import feature
import zope.testrunner.runner
feature.JUnitXMLSupport.install_options()
class Runner(zope.testrunner.runner.Runner):
def configure(self):
super(Runner, self).configure()
self.features.append(feature.JUnitXMLSupport(self))
zope.testrunner.runner.Runner = Runner
Call the test runner with the argument `--xml=junit.xml` to specify the name
of the generated JUnit file.
Code repository
===============
https://github.com/shoobx/shoobx.junitxml
Changelog
=========
0.3.0 (2024-12-18)
------------------
- Rename command line option `--xml`` to ``--junitxml`` since zope.testrunner 6.3.0
added the same option and there's a conlict
0.2.2 (2021-01-13)
------------------
- Fixed documentation.
0.2.1 (2020-12-03)
------------------
- Support for latest zope.testrunner and other latest dependencies
- Added missing stderr and stdout params to test_failure and test_error
methods of XMLOutputFormattingWrapper
(prevented xml report file generation in zope.testrunner >= 5.1)
- dropped support for python 2, updated support for 3.X
0.2.0 (2018-10-10)
------------------
- Add support for Python 3.7
- Add support for the latest `zope.testrunner`, which switches from `optparse`
to `argparse`.
0.1.4 (2018-03-30)
------------------
- Record doctest cases in modules where test cases are defined,
instead of putting them all in 'doctest' module.
0.1.3 (2018-02-09)
------------------
- Bugfix: When test failure has binary data, record a Base64 representation of
the failure
0.1.2 (2018-02-07)
------------------
- Python 3 bugfix
0.1.1 (2017-10-03)
------------------
- Added some basic tests.
- Official Python 3.6 support.
0.1.0 (2017-10-03)
------------------
* Initial release
Raw data
{
"_id": null,
"home_page": "https://github.com/shoobx/shoobx.junitxml",
"name": "shoobx.junitxml",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "jenkins junit xml zope.testing",
"author": "Shoobx, Inc. and Martin Aspelli",
"author_email": "dev@shoobx.com",
"download_url": "https://files.pythonhosted.org/packages/8e/c9/5c6e7829535c6cc69346969383840328c4847c9a2dbcdf33737d95524aa7/shoobx.junitxml-0.3.0.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n.. image:: https://travis-ci.org/Shoobx/shoobx.junitxml.png?branch=master\n :target: https://travis-ci.org/Shoobx/shoobx.junitxml\n\n.. image:: https://coveralls.io/repos/github/Shoobx/shoobx.junitxml/badge.svg?branch=master\n :target: https://coveralls.io/github/Shoobx/shoobx.junitxml?branch=master\n\n.. image:: https://img.shields.io/pypi/v/shoobx.junitxml.svg\n :target: https://pypi.python.org/pypi/shoobx.junitxml\n\n.. image:: https://img.shields.io/pypi/pyversions/shoobx.junitxml.svg\n :target: https://pypi.python.org/pypi/shoobx.junitxml/\n\n.. image:: https://api.codeclimate.com/v1/badges/e87bfa9e26534e0a0c87/maintainability\n :target: https://codeclimate.com/github/Shoobx/shoobx.junitxml/maintainability\n :alt: Maintainability\n\nThis package provides a `zope.testrunner` feature that stores the test\nresults in a JUnit-compatible XML file. This file can be consumed by\nJenkins and other tools to generate test reports.\n\nThis is achieved by implementing a custom output formatter that\ncollects and then writes out the XML file. The formatter then\ndelegates further test result tracking to the oriignal output formatter.\n\nThe core code of this package is based on the excellent work by Martin\nAspelli and the Plone Foundation. Thus the code is released under ZPL\n2.1, the original license of `collective.xmltestreport`.\n\n\nUsage\n=====\n\nIn order to install your own features, you have to customize the main\n`Runner` class a bit. Here is what we do at Shoobx:\n\n::\n\n from shoobx.junitxml import feature\n import zope.testrunner.runner\n\n feature.JUnitXMLSupport.install_options()\n\n class Runner(zope.testrunner.runner.Runner):\n\n def configure(self):\n super(Runner, self).configure()\n self.features.append(feature.JUnitXMLSupport(self))\n\n zope.testrunner.runner.Runner = Runner\n\nCall the test runner with the argument `--xml=junit.xml` to specify the name\nof the generated JUnit file.\n\nCode repository\n===============\n\nhttps://github.com/shoobx/shoobx.junitxml\n\nChangelog\n=========\n\n\n0.3.0 (2024-12-18)\n------------------\n\n- Rename command line option `--xml`` to ``--junitxml`` since zope.testrunner 6.3.0\n added the same option and there's a conlict\n\n\n0.2.2 (2021-01-13)\n------------------\n\n- Fixed documentation.\n\n\n0.2.1 (2020-12-03)\n------------------\n\n- Support for latest zope.testrunner and other latest dependencies\n- Added missing stderr and stdout params to test_failure and test_error\n methods of XMLOutputFormattingWrapper\n (prevented xml report file generation in zope.testrunner >= 5.1)\n- dropped support for python 2, updated support for 3.X\n\n\n0.2.0 (2018-10-10)\n------------------\n\n- Add support for Python 3.7\n\n- Add support for the latest `zope.testrunner`, which switches from `optparse`\n to `argparse`.\n\n\n0.1.4 (2018-03-30)\n------------------\n\n- Record doctest cases in modules where test cases are defined,\n instead of putting them all in 'doctest' module.\n\n\n0.1.3 (2018-02-09)\n------------------\n\n- Bugfix: When test failure has binary data, record a Base64 representation of\n the failure\n\n\n0.1.2 (2018-02-07)\n------------------\n\n- Python 3 bugfix\n\n\n0.1.1 (2017-10-03)\n------------------\n\n- Added some basic tests.\n\n- Official Python 3.6 support.\n\n\n0.1.0 (2017-10-03)\n------------------\n\n* Initial release\n",
"bugtrack_url": null,
"license": "ZPL 2.1",
"summary": "A zope.testrunner output formatter & feature to output JUnit XML.",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/shoobx/shoobx.junitxml"
},
"split_keywords": [
"jenkins",
"junit",
"xml",
"zope.testing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "06680f163b9e7cb54f9c870d71e43c1bfb6ed3005003aa7858d58de25defe17a",
"md5": "ebd253b78db799785e9c370e4c4a6d82",
"sha256": "1a622f7ed3b90ae367ed6ace6bb245d8e3a2eb94ef5271e5d15fafe30ab0b910"
},
"downloads": -1,
"filename": "shoobx.junitxml-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ebd253b78db799785e9c370e4c4a6d82",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8137,
"upload_time": "2024-12-18T12:49:23",
"upload_time_iso_8601": "2024-12-18T12:49:23.243888Z",
"url": "https://files.pythonhosted.org/packages/06/68/0f163b9e7cb54f9c870d71e43c1bfb6ed3005003aa7858d58de25defe17a/shoobx.junitxml-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8ec95c6e7829535c6cc69346969383840328c4847c9a2dbcdf33737d95524aa7",
"md5": "45ea65eb298506bd8d42ffc43651ebb6",
"sha256": "0309fdb87d931d8f226066466a1361ba14e0093573d170585b4014f6e969e8f6"
},
"downloads": -1,
"filename": "shoobx.junitxml-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "45ea65eb298506bd8d42ffc43651ebb6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9742,
"upload_time": "2024-12-18T12:49:24",
"upload_time_iso_8601": "2024-12-18T12:49:24.437423Z",
"url": "https://files.pythonhosted.org/packages/8e/c9/5c6e7829535c6cc69346969383840328c4847c9a2dbcdf33737d95524aa7/shoobx.junitxml-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-18 12:49:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "shoobx",
"github_project": "shoobx.junitxml",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"requirements": [],
"tox": true,
"lcname": "shoobx.junitxml"
}