I'm looking for any way to display the results of Python unit tests in an HTML summary. There are tools like this for Java and Ruby... haven't yet located any tools that seem to do this for Python. Are there any out there?
JUnit HTML output:
(source: ibm.com)
Ruby RSpec output:
(source: natontesting.com)
To generate a HTML report for a Selenium test, we have to install a plugin with the command: pip install pytest-html. To generate the report, we have to move from the current directory to the directory of the Pytest file that we want to execute. Then run the command: pytest --html=report. html.
There are now ways to do it using Python. Using pytest
, for example:
pip install pytest pytest-html
And then:
pytest --html=report.html --self-contained-html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With