Tests that sometimes fail
Once you have a project that is a few years old with a large test suite an ugly pattern emerges.Some tests that used to always work, start “sometimes” working. This starts slowly, “oh that test, yeah it sometimes fails, kick the build off again”. If left unmitigated it can very quickly snowball and paralyze an entire test suite.Most developers know about this problem and call these tests “non deterministic tests”, “flaky tests”,“random tests”, “erratic tests”, “brittle tests”, “flickering tests” or even “heisentests”.Naming is hard, it seems that this toxic pattern does not have a well established unique and standard name. Over the years at Discourse we have called this many things, for the purpose of this article I will call them flaky tests, it seems to be the most commonly adopted name.Much has been written about why flaky tests are a problem.
Tests that sometimes fail #ruby #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper