DEV Community

Kasper Mr贸z
Kasper Mr贸z

Posted on

What's "flaky" in terms of tech?

I've heard this term couple of times and know it has a negative meaning, but I'd appreciate if someone could explain it to me with some details (example would be fantastic 馃檹).

Discussion (2)

sigute profile image

"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.

kaspermroz profile image
Kasper Mr贸z Author

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