Browse Courses

Testing Importance

This document explores why testing is essential in software engineering drawing lessons from the Apollo program and connecting them to modern DevOps and automation practices.

This module explains the critical role of testing in software development, from the Apollo guidance system to modern DevOps. It highlights how robust testing, automation, and design principles ensure reliability and resilience in complex systems.


Introduction

Testing is the only way to know if software works as intended. Automated testing is fundamental to DevOps, enabling safe, continuous delivery. If a system is worth building, it is worth testing; if not, it is not worth building at all.


Historical Perspective: Apollo Guidance System

Margaret Hamilton led the team that developed the Apollo 11 guidance software, pioneering software engineering principles that remain relevant. These principles include:

Use a High-Level Language

Higher-level languages reduce errors and make complex calculations more manageable.

Divide into Jobs

Software was split into small jobs due to memory constraints, a practice echoed in modular design today.

Restart on Failure

Failed jobs were restarted from the beginning, not recovered in place. This is similar to how Kubernetes restarts failed containers.

Checkpoint Good State

Successful calculations were checkpointed, so restarts resumed from the last good state. Modern systems use stateless design and external storage for similar reasons.

Hardware Monitors Software

Hardware monitored software to prevent hangs, a precursor to modern health checks and preemptive multitasking.

Send Telemetry

Continuous telemetry enabled real-time monitoring and decision-making, just as logs and metrics do today.


The Challenge of Unpredictability

Even with strong design, unpredictable events can occur. The Apollo 11 mission nearly aborted due to a hardware bug and unexpected user actions, causing system overload and restarts. This shows that not all scenarios can be anticipated.


The Role of Testing in DevOps

Testing is essential for confirming software behavior. Automated tests are written to reproduce known issues and prevent regressions. Over time, a growing suite of tests increases system resilience and reliability.


Conclusion

Testing is the foundation of reliable software. Principles from the Apollo program—modularity, failure recovery, checkpointing, monitoring, and telemetry—continue to inform modern DevOps. Robust testing practices are vital for building resilient systems.


FAQ

  1. Testing is optional for most software projects
  2. Testing is the only way to know if software works as intended
  3. Testing is only needed after deployment
  4. Testing is only for large systems
(2) Testing is essential to confirm software works as intended.

  1. Use only low-level programming languages
  2. Restart failed jobs from the beginning
  3. Avoid splitting software into modules
  4. Ignore hardware monitoring
(2) Restarting failed jobs is a principle still used in modern systems.

  1. Writing automated tests for known issues
  2. Relying on manual testing only
  3. Avoiding telemetry data
  4. Using only hardware solutions
(1) Automated tests for known issues increase resilience.

PrincipleModern Equivalent
A. Checkpoint good state1. Stateless containers with external storage
B. Hardware monitors SW2. Health checks and preemptive multitasking
C. Send telemetry3. Real-time logs and metrics
A-1, B-2, C-3.

  1. Enables continuous delivery
  2. Prevents regressions
  3. Guarantees no unpredictable failures
  4. Increases reliability
(3) Automated testing cannot guarantee all failures are prevented.

  1. All failures can be predicted in advance
  2. Complex systems can behave unpredictably
  3. Hardware bugs are rare in space missions
  4. Telemetry is unnecessary
(2) Complex systems can behave unpredictably.

Automated testing is a cornerstone of modern DevOps practices.

True. Automated testing enables safe, continuous delivery in DevOps.