by vasco · 3y ago · 0 comments
How do you know if it's flaky? You keep a count and any time a test fails/recovers 3 times it gets skipped, even if there's weeks between failures. You can make it more complex for little gain, but I've found this system will have teams actually prioritize fixing important tests, but mostly it has proven that many "important tests to keep even if they are flaky" never were actually important or end up getting re-written in different ways later on.
In both cases, the feature is not validated (the test failure is ignored), but not having the test is transparent (the feature is not being validated), improves pipeline speed and reduces the noise.
Maybe people just like the lie, that the feature is being validated.. I don't really understand.
I think quantifying and prioritizing is key, like you wrote. Respected engineering organizations like Google and GitHub all came to the same place. Flakiness is often unevenly distributed, so find & tackle ones that are the worst. Don't try to eliminate the flakiness because that's not economically viable.
I'm trying to put my money where my mouth is... we'll see how it goes.
Congratulations, you now have an untested feature.
Flaky tests should be fixed, of course. But just deleting them isn't fixing them, and it leaves you worse off, not better.
May i ask how you feel about TODO comments?
The team should feel the pain of having their shit test skipped without them being able to stop it and it's up to them to either fix it and bring it back or cope.
What i'm saying is that you are completely wrong about that. Sorry if i wasn't clear.
PS: if the test was flaky, you already had an untested feature