What is the current way to export HTML reports from pytest?

11,616

Solution 1

It would have been useful to show or describe how it fails. However note that coverage and thus these options are provided by the pytest-cov plugin which needs to be installed separately: https://pypi.python.org/pypi/pytest-cov

If that wasn't the problem then please update the question with more details.

Solution 2

pytest-html is a plugin for py.test that generates a HTML report for the test results. More info @ https://github.com/pytest-dev/pytest-html

Share:
11,616
jayunit100
Author by

jayunit100

Current: Red Hat BigData, Apache BigTop commiter. Past: Phd in scalable, data driven bioinformatics analytics tools on the JVM, which led me into the world of big data as the genomic data space started to explode. After that, I was with peerindex as a hadoop mapreduce dev, and now I'm a big data engineer at redhat. We're making red hat storage awesome(r). blog: http://jayunit100.blogspot.com. github: http://github.com/jayunit100 pubs : https://www.researchgate.net/profile/Jay_Vyas/publications/?ev=prf_pubs_p2

Updated on July 12, 2022

Comments

  • jayunit100
    jayunit100 almost 2 years

    The following post Py.Test : Reporting and HTML output outlines a way to submit py-test with html reports, but it doesnt work with pytest 2.6.1

    The "--cov" and "--cov-report" options both fail for me.

    Is there a way to generate HTML reports from pytest 2.6.1?