You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
Activity
RibeiroAna commentedon Jan 4, 2019
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.
Jiangshan00001 commentedon Jan 4, 2019
@RibeiroAna i see. thanks
davehunt commentedon Jan 4, 2019
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.
RibeiroAna commentedon Feb 3, 2019
@ionelmc do you have anything to say about that?
ionelmc commentedon Feb 4, 2019
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.