Skip to main content

Safety Nets by Means of Automated Testing

A key component of CI (and an enabler for TBD) is the use of automated tests that run every time changes are integrated. This ensures there are trustworthy safety nets in place, increasing the confidence of applying changes without the worry of breaking something in production. As such, this reduces the intrinsic cognitive load in decision-making and acting upon that decision. Also, there is less to worry about in terms of later issues when you have unloaded the knowledge of the task at hand; you don’t need to continuously engage in context switching to fix something you worked on days or weeks ago.

I’m not necessarily talking about coverage. The best ways to validate your safety nets involve the stability of the tests (no implementation test, behavior tests only, and preferably readable by customers) and the speed of providing feedback. If a product engineer must wait more than 10 minutes for feedback, then build systems lose their benefit and will be ignored—this is because feedback taking longer than 10 minutes will result in context switching and increased cognitive load.

The presence of robust automated testing empowers developers to modify and improve code with greater confidence. Knowing that there is a comprehensive safety net in place to catch errors before they impact production diminishes the anxiety and cognitive strain that often accompany the fear of causing disruptions. This security enables developers to dedicate more attention to innovating and refactoring the code, rather than worrying about potential mistakes. Consequently, this reduces the intrinsic cognitive load associated with making decisions, allowing for a smoother, more focused development process.

In summary, safety nets established through automated testing significantly contribute to reducing cognitive load by providing stable, quick, and reliable feedback. This system not only supports immediate problem resolution but also bolsters confidence and continuity in the development process, allowing developers to maintain focus and efficiency without the overhead of unresolved concerns or the fear of introducing errors into production.