how can i realize append html result other than overwrite html result?
now I run 2 commmands:
pytest test1.py --html=report.html pytest test2.py --html=report.html
finally, the second runned command which generate report.html will overwrite the first generated report.html, but i hope the two result can merged, that means report.html include test1.py and test2.py result, could you tell me how i can do that?thank you very much
hello @lp120037920
your question might be related to #183. could you check if https://github.com/pytest-dev/pytest-reportlog solves your problem?
@jkowalleck if i use that plugin, finall, i get json file, but the html file is what i want, what further step should i do to get html file? json2html?
@BeyondEvil could you help out here?
@jkowalleck @BeyondEvil i install pytest-reportlog and json2html,firstly, the json result is not merged,it is separately, secondly,json2html's resulst is totally different from pytest --html=report.html result,it is mess, can not be readed for hunman
There's not native way of merging two reports.
Either you run the tests in the same session or you have to find or write a utility that takes two html-reports and merges them.
I'm adding this as a feature request for V3 (which doesn't necessarily mean it will be implemented).
@lp120037920 what i did in the past, to merge multiple reports: https://github.com/pytest-dev/pytest-html/issues/183#issuecomment-738195470
but you might not see all the details pytest-html offers.
you might probably miss environment variables and other features.