A test fails intermittently in CI but passes locally. How would you investigate it?
Preserve failure logs, random seeds, timing, environment, and artifacts before rerunning. Look for shared state, test-order dependence, real-time assumptions, network calls, resource contention, and u...