Skip to content

how to set pytest-cov output to a single html? #191

@Jiangshan00001

Description

@Jiangshan00001

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?

Activity

RibeiroAna

RibeiroAna commented on Jan 4, 2019

@RibeiroAna
Member

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

Jiangshan00001 commented on Jan 4, 2019

@Jiangshan00001
Author

@RibeiroAna i see. thanks

davehunt

davehunt commented on Jan 4, 2019

@davehunt
Collaborator

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

RibeiroAna commented on Feb 3, 2019

@RibeiroAna
Member

@ionelmc do you have anything to say about that?

ionelmc

ionelmc commented on Feb 4, 2019

@ionelmc
Member

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.

added
questionThis PR is asking whether it is possible to achieve a certain outcome
on Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThis PR is asking whether it is possible to achieve a certain outcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @davehunt@ionelmc@RibeiroAna@gnikonorov@Jiangshan00001

        Issue actions

          how to set pytest-cov output to a single html? · Issue #191 · pytest-dev/pytest-html