There are many ways to do good programming testing, and it all depends on the situation. One way may be better than another for a given project.
Expand your knowledge about this topic
Related to this topic
Why testing is important?