DEV Community

loading...

Discussion on: What's "flaky" in terms of tech?

Collapse
sigute profile image
Sigute

"Flaky" is usually something that is slightly broken but doesn't fail every time. It is most often used in the context of automated tests. For example, in usual situation, you have a test that passes or fails each time you run it. A flaky test would test some code, but if you run it 10 times, it might pass 8 times and fail 2 times without any changes.

Flaky-ness is often caused by timing issues. For example, if the test is relying on network, maybe sometimes network connection is slow and times out, so the test fails, but passes when connection speed is better. It can also be a race condition, for example, you are testing that two elements appear on the screen one after the other, but in some scenarios the order in which things appear on the screen is different.

Collapse
kaspermroz profile image
Kasper Mróz Author

Thank you for your great explanation, now it makes sense! 💡