pytest-md-report is a pytest plugin designed to generate test outcomes reports formatted as markdown tables. It extends pytest's functionality by providing various command-line options and a programmatic interface to produce detailed, customizable reports. The library is actively maintained, with frequent updates to support new Python and pytest versions, currently at version 0.7.0.
pip install pytest-md-reportVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use pytest-md-report via the command line to generate a Markdown report. It creates a dummy test file, runs pytest with the `--md-report` flag to enable reporting, `--md-report-output` to specify an output file, and `--md-report-tee` to show the report on the console as well. The generated Markdown report will be saved as `report.md`.
Upgrade Python to 3.9 or newer, or downgrade `pytest-md-report` to `<0.6.3`.
Ensure your `pytest` installation is less than version 9 (e.g., `pytest<9`). Check the `pytest-md-report` changelog for updates on pytest 9+ support.
Upgrade to `pytest-md-report>=0.6.2` to ensure stable results with GFM on Windows, or avoid the `gfm` flavor on Windows.
Remove the `exclude_outcomes` parameter when calling `make_md_report` if its default behavior is desired. If specific outcomes need to be excluded, use the new `md_report_exclude_outcomes` option or equivalent.
Upgrade to `pytest-md-report>=0.7.0` and use the `--md-report-verbose=2` option to show test parameters.