I'm not sure this will solve your problem, but you can pass --durations=N
to print the slowest N
tests after the test suite finishes.
Use --durations=0
to print all.
You can pass the number with --durations
pytest --durations=0 — Show all times for tests and setup and teardown
pytest --durations=1 — Just show me the slowest
pytest --durations=50 — Slowest 50, with times, … etc
Take refer in: https://medium.com/@brianokken/pytest-durations-0-show-all-times-for-tests-and-setup-and-teardown-848dccac85db
Or: https://docs.pytest.org/en/latest/usage.html#profiling-test-execution-duration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With