Ujian flaky ialah ujian yang lulus atau gagal secara tidak konsisten tanpa perubahan kod — kadangkala lulus, kadangkala gagal pada kod yang sama. Ia merupakan masalah serius kerana ia menghakis kepercayaan terhadap test suite. Memahami punca dan penyelesaiannya adalah penting.
Apa itu ujian flaky dan mengapa ia memudaratkan
A FLAKY test gives INCONSISTENT results (pass sometimes, fail other times) on the SAME code:
→ harmful: ERODES TRUST — people start ignoring failures ("oh, it's just flaky") →
real failures get missed too
→ waste time on false alarms / re-runs; break CI; reduce confidence in the whole suite
→ Flaky tests are worse than no test if they make people distrust all tests.
