I’ve got some exciting news to share with you today – we’ve recently added documentation on how to make your test durations even more accurate and reliable.
We all know how frustrating it can be when your tests take longer and longer, and it can be hard to keep track of what’s causing the slowdown. That’s why we recommend this new way to report test durations that only includes the time it takes to run the main test function, without the setup and teardown times included. If you are using pytest
, getting less variance in test duration is as simple as adding the following to pytest.ini
:
[pytest]
junit_duration_report = call
This setting is especially helpful if you use randomized test order because it makes your test durations more consistent and repeatable. You’ll be able to see exactly how long each test takes to run, without any extra overhead from the setup and teardown times.
If you’re curious to learn more, head on over to our documentation page at https://blueracer.io/docs/runner/pytest#better-results. As always, if you have any questions or feedback, don’t hesitate to reach out.