DEV Community

Discussion on: Retry brittle tests until they fail

Collapse
 
tombruijn profile image
Tom de Bruijn • Edited

I too lose hope when I have to retry the tests on the CI just to get a green build. Especially if the build takes a long time to complete 😩

I don't like using a package that immediately retries the test on the CI when it does fail. It hides the actual failure and the test suite ends up taking more time to complete. Although, we do use this approach for now on a project where I work 😬 (Just until the test suite isn't so brittle! Promise!)

That's why I suggest this approach of debugging the brittle test locally and fix it. It requires quite a bit of rewrites of tests and app code for it to suck less yes 😅 But I think it's worth it!