News for hackers. Stuff that matters.
Re:Unit Testing: Is There Really Any Debate Any Longer? by JoeAltmaier on Wednesday September 12, 2012 @10:44AM (#4510894)
Agreed.

API testing has that wonderful property, its appearance is the whole deal, if it looks right then its working.

Anything but app code isn't so easily tested. When frameworks are written to support testing, they often are sub-useful - crippled versions of real programming languages etc.

Anecdote: I recall a QA guy asking me how to test our OS's file system. I said, make every filespec-based call with a good spec, a non-existant spec, an illegal spec, a null spec; log every result. After each release, diff the logs and explain every deviation.

He said "That's too hard, I'll just shotgun it." and left. Why ? Because his test-scripting framework wouldn't allow anything as sophisticated as lambdas etc.

So I spent half an hour writing a table and a loop, and sent it to him. He used it for the next 5 years to test every release.

My moral: do an exhaustive test when possible. The computer is fast, it doesn't feel any pain, and you will find more fencepost and boundary issues than you ever thought existed.

There are no comments on this comment yet.