Is there any way to generate one HTML report from two pytest runs ?
Hi,
Is there any way that I can get in one HTML the results of two pytest runs ?
Something like
pytest -k something && pytest -k something_else --html=report.html
The reason that I need to do it is actually a workaround for another problem that I have (Not related to pytest-html, related to running in parallel with pytest-xdist instead) but it might help me to workaround this in some way
Thanks !!!
This isn't currently possible, sorry. I'm not even sure how we'd implement this without having some intermediate format to store the results in. Feel free to edit this issue to be an request for an enhancement, and we can see if anyone has time to look into it.
there is a plan to have a json-lines based format to write reports out to
I see.
there is a plan to have a json-lines based format to write reports out to
Interesting, in that way I could just open the JSON and add the results of the second run ?
I am wondering if you could not obtain the same feature by loading junit or subunit reports which are kinda standard way of saving (and combining) unit-test execution results. This would allow you to build reports created by tools other than pytest.
Extra bonus: avoiding to create a new intermediary file format.
Hello @david-fliguer-ws ,
Had the same issue. here is what i did:
- I used pytest's junit feature to write junit/xunit/xunit2 reports.
- I combined the unit-reports with junitparser.
- And finally i generated HTML reports with junit2html.
In the end I did not use "pytest_html" at all for this. thats the same wthat https://github.com/pytest-dev/pytest-html/issues/183#issuecomment-504978193 suggests.
honestly, i did not like how the reports from junit2html looked. But i guess there are more tools out there, that generate pretty reports from junit/xunit/xunit2 files.
there is a plan to have a json-lines based format to write reports out to
It's live: https://github.com/pytest-dev/pytest-reportlog
Hi guys 👋
I have decided to develop a utility that is able to merge several pytest-html reports. Very useful to those running pytest suites in parallel and want to combine the reports later.
Check it out: https://github.com/akavbathen/pytest_html_merger
Please open an Issue or contribute directly by creating a PR
Enjoy!
Hi guys 👋
I have decided to develop a utility that is able to merge several pytest-html reports. Very useful to those running pytest suites in parallel and want to combine the reports later.
Check it out: https://github.com/akavbathen/pytest_html_merger
Please open an Issue or contribute directly by creating a PR
Enjoy!
Hey!
That's awesome!
Just a heads-up: We're rebuilding pytest-html from the ground up. It's very behind schedule at the moment, but it is moving forward - albeit slowly.
Hi guys wave
I have decided to develop a utility that is able to merge several pytest-html reports. Very useful to those running pytest suites in parallel and want to combine the reports later.
Check it out: https://github.com/akavbathen/pytest_html_merger
Please open an Issue or contribute directly by creating a PR
Enjoy!
This is awesome -- thank you for sharing!
Hi guys 👋
I have decided to develop a utility that is able to merge several pytest-html reports. Very useful to those running pytest suites in parallel and want to combine the reports later.
Check it out: https://github.com/akavbathen/pytest_html_merger
Please open an Issue or contribute directly by creating a PR
Enjoy!
Hey, any chance to make this work for pytest-html-reporter generated reports.?