It’s clearly a bug, but what is the bug exactly?
A couple weeks ago I was updating some of our Playwright tests, when Playwright decided to mess with the execution order of the tests. The tests in question are a group of tests that cover a whole process from start to end. So we run them in serial mode, “to ensure they will always run together and in order”. And yet, they were not running in order.
While that’s obviously a bug, it wasn’t clear what exactly the bug was. Was it the tests not running in the correct order? Or was that only a symptom of some other bug? And what was triggering this bug? Because we’ve had these tests running in serial mode for a while, but had never seen this behavior before.
The problem as we encountered it
The tests that triggered the issue were similar to these:
