Skip to content

Report test duration in CI #840

@ascillitoe

Description

@ascillitoe

To identify long-running tests during CI, it would be helpful for overly long-running tests to report their duration. This could be achieved by:

  1. Add a timeout with pytest-timeout, so that tests that take longer than a certain (relatively generous) duration would simply be killed. Long-running tests would then be reported as failed.
  2. Add a pytest hook to report duration after each test. Something like this.

As noted by @jklaise , with option 2. a minimum duration threshold would be required to avoid cluttering the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: TestingAnything related to testing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions