-
Notifications
You must be signed in to change notification settings - Fork 244
Add a mechanism for merging multiple html reports #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I understand that this might not be needed by most of the people. In my case it is useful because I do a lot of functional testing with pytest, not necessarily testing python code, but tools that I wrap with subprocess and then parametrize and exercise with pytest. I test these against different platforms and have to kick separate runs for each one, ending up with several .html reports. It would be nice to be able to join them in a single report so that people would not have open reports separately (see image attached). I would put this more as a minor/cosmetic feature. This does not conflict with #33 or #39 Edit: the tabs are actually part of the jenkins plugin, but I believe you know what I mean. |
I think this is out of scope for the pytest plugin. You could create a new tool that takes multiple test outputs (such as the HTML report, or XML, etc) and generates a single report. This tool could probably even depend on pytest-html and reused some of the methods, though perhaps it would need some refactoring to expose them appropriately. I'm going to close this, but I'm happy to review any patches that refactor the plugin to support such a tool. |
This feature would be really important for me, too! My project consists of a series of subprojects each with their own virtual environment. Until now my CI goes through each subproject, enters the venv and executes |
I have a test here where I need to run two pytest instances. If I run them in same instance browser will not clear its session. so this feature is needed. If I kill the browser/webdriver processes selenium just says socket is occupied. |
Hi guys 👋 I have decided to develop a utility that is able to merge several pytest-html reports. Check it out: Please open an Issue or contribute directly by creating a PR Enjoy! |
Thank you!!! |
HI All |
Can you please elaborate on what exactly you are experiencing? Files come split and the tool merges them. What do you mean by HTML files are getting huge? |
pytest_html_merger -i reports -o merged.html works perfectly fine for reports generated using pytest-html. |
Would it be possible to expose a flag that allows merging multiple html reports?
This is something that could probably be done with a separate script, but I think it makes sense to add this functionality to the plugin. Something like:
py.test --merge-html result1.html result2.html ... resultN.html
Cheers,
Goncalo
The text was updated successfully, but these errors were encountered: