Strive for tests

Testing “hard” things is tough because you have to build them to test them,
which discourages speculative building just to see what will happen. But the
building process in software is ridiculously cheap. We’ve developed an entire
ecosystem of tools that make it easy to do just that: unit testing, mock objects,
test harnesses, and lots of other stuff. Other engineers would love to be able
to build something and test it under realistic conditions. As software developers,
we should embrace testing as the primary (but not the only) verification
mechanism for software. Rather than waiting for some sort of calculus for
software, we already have the tools at our disposal to ensure good engineering
practices. Viewed in this light, we now have ammunition against managers
who tell us “we don’t have time to test.” A bridge builder would never hear
from his boss, “Don’t bother doing structural analysis on that building—we
have a tight deadline.” The recognition that testing is indeed the path to reproducibility
and quality in software allows us as developers to push back on
arguments against it as professionally irresponsible.
Testing takes time, just like structural analysis takes time. Both activities ensure
the quality of the end product. It’s time for software developers to take up the
mantle of responsibility for what they produce. Testing alone isn’t sufficient,
but it is necessary. Testing is the engineering rigor of software development.

-Neal Ford

da “97 things every programmer should know” – O’Reilly


Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di

Stai commentando usando il tuo account Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.