http://qs1969.pair.com?node_id=315680


in reply to Testing modules and methods while waiting for Santa

Welcome to the world of testing. (Not that I've been here all that long, but welcome.)

For the benefit of others reading your post, let me point out that effective test suites can be pretty basic. Typically, my tests are a line or two each -- less elaborate than the systematic checker you posted here. My test file may contain many of these cases, but each unit test is pretty basic. And as I find bugs, I fix the bug and cover myself by testing that case.

The XP approach of very simple unit tests, written before the code itself, testing basic and edge cases, is a strong strategy. If comprehensive, any code that passes the suite by definition matches the spec. In short, the tests document the common and unusual behavior of every object and method.

Surely whomever brings you gifts this time of year will be impressed by any use of testing at all, so that should bode well for you!

rkg