Personal GitHub site
To create a PyTest test report, you need to export it to JUnit XML file and then have a tool which can render that JUnit XML file. I chose for a plugin called junit2html to render the XML file to an HTML file.
Run PyTest from the target project venv (i.e. using Poetry): poetry run pytest -v -s --junit-xml=report.xml | tee log_for_testers.log
This command also export the terminal log to a log-file for further debugging. Note that the
-v -s
parameters are optional.
junit2html
package is installed (as dev dependency)python -m junit2htmlreport path/to/report/report.xml