Skip to content

Include timestamps in reportlog #10710

@HTRafal

Description

@HTRafal

What's the problem this feature will solve?

When parsing pytest report (in my case --reportlog file) TestReport objects only contain duration information. I'm missing start and stop timestamps to be able to correlate test results with external events.

Describe the solution you'd like

TestReport objects should have .start and .stop attributes set, which can easily be copied from CallInfo objects in TestReport.from_item_and_call

Alternative Solutions

I considered adding it to pytest-reportlog here - pytest-dev/pytest-reportlog#22, but we agreed that core pytest is a better place for such change.

Additional context

Initial feature request in pytest-reportlog - pytest-dev/pytest-reportlog#19

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: reportingrelated to terminal output and user-facing messages and errorstype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions