pytest-django icon indicating copy to clipboard operation
pytest-django copied to clipboard

--junitxml report includes time spent on migrations for first test

Open alexrudy opened this issue 3 years ago • 0 comments
trafficstars

When using pytest's --junitxml flag to produce a test report, the timing information includes the migrations for the first test run which requires migrations. In our environment, we often randomize the order of test runs and split them based on past timing information. This doesn't work very well, because we can't measure the time taken to run the test when it includes the time spent on migrations – a time penalty we'll have to pay if any test uses the database fixture.

I'm not sure if there is an easy way to solve this -- but if there is, I'd happily take a stab at a PR.

alexrudy avatar May 09 '22 17:05 alexrudy