Subunit is a streaming protocol for test results. The protocol is a binary encoding that is easily generated and parsed. By design all the components of the protocol conceptually fit into the xUnit TestCase-
Subunit comes with command line filters to process a subunit stream and
language bindings for python, C, C++ and shell. Bindings are easy to write
for other languages.
A number of useful things can be done easily with subunit:
* Test aggregation: Tests run separately can be combined and then
reported/
can be shown as a seamless whole.
* Test archiving: A test run may be recorded and replayed later.
* Test isolation: Tests that may crash or otherwise interact badly with each
other can be run seperately and then aggregated, rather than interfering
with each other.
* Grid testing: subunit can act as the necessary serialisation and
deserialiation to get test runs on distributed machines to be reported in
real time.
Subunit supplies the following filters:
* tap2subunit - convert perl's TestAnythingPro
* subunit2pyunit - convert a subunit stream to pyunit test results.
* subunit2gtk - display a subunit stream in a gtk window.
* subunit2junitxml - convert a subunit stream to a JUnit XML representation.
* subunit-diff - diff two subunit streams.
* subunit-filter - filter out tests from a subunit stream.
* subunit-ls - list the tests present in a subunit stream.
* subunit-stats - generate a summary of a subunit stream.
* subunit-tags - add or remove tags from a stream.
A mailing list for discussion, usage and development is at https:/
Subunit is shipped by recent Debian and Ubuntu versions. Newer versions for Ubuntu may be available from either of the two Personal Package Archives : https:/
Project information
- Licence:
- Apache Licence, Simplified BSD Licence
View full history Series and milestones
trunk series is the current focus of development.
All questions Latest questions
All packages Packages in Distributions
-
subunit source package in Xenial
Version 1.1.0-3 uploaded -
subunit source package in Trusty
Version 0.0.18-0ubuntu7 uploaded -
subunit source package in Squeeze
Version 0.0.6-1 uploaded -
subunit source package in Sid
Version 1.4.2-3 uploaded -
subunit source package in Precise
Version 0.0.7-1build1 uploaded
All bugs Latest bugs reported
-
Bug #2052948: ModuleNotFoundError: No module named 'imp' while installing subunit 1.4.0 using Conan with Python 3.12
Reported -
Bug #2046453: support pytest
Reported -
Bug #2045171: TestResult decorator classes do not have the addDuration method added to TestResult in Python 3.12
Reported -
Bug #2030812: https://pypi.org/project/subunit/ is confusing
Reported -
Bug #1939697: 1.4.0: AttributeError: module 'subunit.iso8601' has no attribute 'Utc
Reported
More contributors Top contributors
- vital 3 points
- Tomasz Kloczko 1 points
- Will 1 points
- Jelmer Vernooij 1 points