Last week I wrote about tests that pass on your machine and fail in CI . I listed five usual suspects: speed, leftover state, environment, the network path and parallel runs.
Then the comments arrived, here and on Reddit, LinkedIn and the Ministry of Testing Club. Testers shared failures that took them a day, a week, and in one case over a year to solve. Most of them weren't on my list.
So this is part 2: the causes I learned from you, each with the fix that worked, and then a small CI setup that makes the next mystery quicker to solve.
1. The mouse pointer was in the wrong place
One reader had tests that always passed locally and always failed in CI. The logs and screenshots showed an empty field. After a day of debugging: the mouse pointer.
On the CI runner, the pointer happened to sit over an element that opened a popup menu. The menu covered the field the test was filling, so the text went nowhere. The field was optional, so nothing failed there.…