pythonpython-3.xpytestpython-unittestpytest-html

Is there any way to generate one HTML report from two pytest runs?


my runtests.sh file contains the below scripts

I'm trying to obtain a single report file which should contain the execution report of both file_1 & file 2.


Solution

  • Your best option is to run both files in the same run command, (as shown below), which will combine all results into the same report.

    pytest -v -s file_1.py file_2.py --html=report.html