الاختبارات غير المستقرة هي اختبارات تمر أو تفشل بشكل غير متسق دون تغييرات في الكود — تمر أحياناً وتفشل أحياناً أخرى على نفس الكود. إنها مشكلة خطيرة لأنها تُضعف الثقة في مجموعة الاختبارات. فهم أسبابها والحلول المناسبة مهم جداً.
ما هي الاختبارات غير المستقرة ولماذا تكون ضارة
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.
