We need to answer some basic strategic questions before we can talk about the details of how to test:
What do we mean by testing?
When do we test?
How do we choose what logic to test?
How do we choose what data to test?
How do you test your software? Write an automated test.
Test is a verb meaning “to evaluate.” No software engineers release even the tiniest change without testing, except the very confident and the very sloppy. I'll assume that if you've gotten this far, you're neither. Although you may test your changes, testing changes is not the same as having tests. Test is also a noun, “a procedure leading to acceptance or rejection.” Why does test the noun, a procedure that runs automatically, ...