Test bystanders
If I'm writing a functional test that should update a particlar database record, I'll include some other records and check that they are not updated. I've caught some dodgy where clauses that way.
Do you remember the pistol competition in the second Dirty Harry film? Both bad-guys and innocent bystanders were painted on pop-up targets; Clint Eastwood lost to Hutch by shooting a bystander target. I call these extra records test bystanders: the code is supposed to miss them.

0 Comments:
Post a Comment
<< Home