Home / Companies / Octomind / Blog / Post Details
Content Deep Dive

why we finally allowed arbitrary waits in our tests

Blog post from Octomind

Post Details
Company
Date Published
Author
-
Word Count
874
Language
English
Hacker News Points
-
Summary

Octomind, a testing platform, initially resisted using arbitrary waits in their test automation, citing that hard-coded waits obscure real bugs and can lead to flaky tests. However, they shifted their stance after encountering issues with clients whose automated tests failed due to interactions with web pages that weren't fully ready, despite appearing complete. This was notably due to delayed hydration processes in frameworks like Nuxt, which resulted in a half-functional DOM that ignored clicks until fully hydrated. To address these timing issues, Octomind adopted a more pragmatic approach by implementing deterministic waits using promises that signal when a page is ready, allowing tests to proceed reliably. They also introduced fixed-time waits as a temporary workaround for timing-related bugs that could not be immediately addressed, ensuring continuous integration systems remained operational while awaiting permanent fixes. This balance between idealism and pragmatism acknowledges the realities of varying developer availability and business priorities, offering a compromise to keep testing effective and releases on track.