Skip to main content

A testdox format reporter for pytest

Project description


PyPI Continuous Integration Status codecov

A TestDox format reporter for pytest.


pip install pytest-testdox


Add the parameter --testdox when running pytest. For example:

pytest --testdox your-tests/

Tip: If you don't want to type --testdox every time you run pytest, add it to addopts in your ini file. For example:

# content of pytest.ini or tox.ini
addopts = --testdox

# or if you use setup.cfg
addopts = --testdox

When using --testdox, the plugin will disable itself when not running on a terminal. If you want the testdox report no matter what, use the parameter --force-testdox instead.



Override the class name in the testdox report. For example:

class TestCreateFile():

    def test_creates_a_file_in_the_so(self):

Will produce the output:

 [x] creates a file in the so

Override the test title in the testdox report. For example:

class TestCreateFile():'Creates a local file in the SO')
    def test_creates_a_file_in_the_so(self):

Will produce the output:

Create File
 [x] Creates a local file in the SO

Configuration file options


Specifies TestDox report format, plaintext or utf8 (default: utf8). For example:

# content of pytest.ini
# (or tox.ini or setup.cfg)
testdox_format = plaintext
$ pytest
============================= test session starts ==============================
platform darwin -- Python 3.5.0, pytest-3.0.7, py-1.4.33, pluggy-0.4.0
rootdir: /private/tmp/demo, inifile: pytest.ini
plugins: testdox-dev
collected 2 items
Pytest Testdox
 [x] prints a BDD style output to your tests
 [x] lets you focus on the behavior

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytest-testdox, version 2.0.1
Filename, size File type Python version Upload date Hashes
Filename, size pytest_testdox-2.0.1-py2.py3-none-any.whl (8.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pytest-testdox-2.0.1.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page