3 tips for stopping flaky tests
Skills:
ML Pipelines90%
Key Takeaways
Tips for stopping flaky tests in CI builds
Full Transcript
Flaky tests are the worst. Is your CI build failing again because of a test that only sometimes works? To maintain a high-quality codebase, you need reliable signals. Here are three quick tips [music] to stop flaky tests from wasting your time. Number one, isolate [music] your state. If your tests write to hard-coded file paths or shared databases, concurrent runs will collide. Use unique, temporary environments for every single run. Number two, take out your external dependencies. Disk I/O and network calls introduce randomness. Swap them out [music] with test fake to make your unit tests lightning fast and strictly deterministic. Number three, check your assumptions. Don't assume your test environment starts perfectly clean. Explicitly clear out existing data before executing. Stop ignoring red builds. Subscribe to Google for Developers for more testing tips.
Original Description
We have all been there: your CI build fails yet again because of a test that doesn't consistently work. In this video, we explore three tips to stopping flaky tests in their tracks. From isolating your states to fixing internal dependencies, see how these tips can help you achieve a high quality code base with reliable signals.
Subscribe to Google for Developers → https://goo.gle/developers
Speakers: Marily Nika
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
More on: ML Pipelines
View skill →Related Reads
📰
📰
📰
📰
NRED Is Moving From Target Generation to Operational Intelligence
Medium · AI
The top AI fear for 6,000 tech pros isn't losing their jobs - it's more work for the same pay
ZDNet
Only10 Vol.26.01 | 10 AI Projects Worth Watching This Week
Medium · ChatGPT
Top 10 AI Development Companies in the USA (2026 Edition)
Medium · AI
🎓
Tutor Explanation
DeepCamp AI