pytest-html
pytest-html copied to clipboard
how to set pytest-cov output to a single html?
how to set pytest-cov output to a single html? I'm trying to set the pytest-cov output to pytest-html, but don't know how to do. could you give me some advice?
Hi, unfortunatly I think that is not possible right now (unless @davehunt thinks otherwise). Pytest-HTML and Pytest-Cov could be integrated but I don't see it as an easy task, it could take some weeks, even months to do so.
@RibeiroAna i see. thanks
I'm not familiar with pytest-cov, but pytest-html does have some hooks available for augmenting the report. If you're able to get the content from pytest-cov then it's possible you may find a way to create a single report. See the readme for details of the hooks provided. If you find you need new hooks, please open a new issue with details.
We could leave this issue open for a while to see if anyone familiar with pytest-cov has suggestions for how the two HTML reports could be combined.
@ionelmc do you have anything to say about that?
What would you want to see in pytest-html's output? Just the coverage report?
One of the plugins could have a hook that the other can use for copying the coverage report, or pytest-html could just override pytest_terminal_summary to capture pytest-cov's output.
If that's too much then pytest-cov could implement a pytestcov_write_summary
hook that pytest-html can override to put the report both in terminal and html.