Chapter 32. The Philosophy of Testing
Much like we gain knowledge about the behavior of the physical universe via the scientific method, we gain knowledge about the behavior of our software via a system of assertion, observation, and experimentation called "testing."
There are many things one could desire to know about a software system. It seems that most often we want to know if it actually behaves like we intended it to behave. That is, we wrote some code with a particular intention in mind, does it actually do that when we run it?
In a sense, testing software is the reverse of the traditional scientific method, where you test the universe and then use the results of that experiment to refine your hypothesis.
Instead, with software, if our "experiments" (tests) don't prove out our hypothesis (the assertions the test is making), we change the system we are testing.
That is, if a test fails, it hopefully means that our software needs to be changed, not that...