Back to basics - testing in full or testing for essentials

Colin Scott - the proverbial coder - has posted another addition to this "Testing" ideology with an excellent entry titled "Better testing through lower expectations".

Everybody (or rather, everybody should) talks about testing today but what is the fundamentals to testing? What do you test for? How do you write a test which covers key aspects?

In his blog post he talks about the fundamentals of testing and how to accomplish more, with less.

I like his "abstraction" of the top three principals of testing - i'll list them here because i'm in total agreement with him.

  1. Principal 1 - a test s hould only cover one output or behavior
  2. Principal 2 - Validate behavior or output - not both
  3. Principal 3 - Favor stubs over mocks

He goes into detail for each basis of these principals and i think he's hit the nail on the head with this one.

This is a very good read if you're new to testing, or just want to brush up on some of the basics.

well written Colin!

to read the full entry, click here

The idealogy of "testing" is obviously an abstract topic as there's many ways to skin a cat.

I'd like to know what others think about testing - what process do you go through? what works for you and why?  Do you test in full or do you test for essentials?

Published Thu, Mar 12 2009 9:06 by Brian Madsen

Comments

# re: Back to basics - testing in full or testing for essentials

Wednesday, March 11, 2009 8:58 PM by Colin Scott

Just to be clear I make no claim these principals are comprehensive. There's a lot more to unit testing they don't address.

# re: Back to basics - testing in full or testing for essentials

Wednesday, March 11, 2009 9:03 PM by Brian Madsen

Hey Colin,

that's why i put it into "the basics" context.

naturally there's plenty of other aspects - but this is a good start and if you don't pay attention to the basics when you head down the road of testing then you're going to get burned.

Maybe we'll be seeing some more posts from you on this topic in the near future then :)