tests and testing

Occasionally we (thats the OSAF we) get into a discussion on IRC about what is a unit test and what is an integration test and even sometimes what are regression tests. Nothing glazes the eyes of the average developer over any faster than two TDD folks talking about the nitty- gritty of testing ;)

So it was interesting to run across a blog post on Planet RDF of a small list of things that make up A Set of Unit Testing Rules.

A test is not a unit test if:

  * It talks to the database

  * It communicates across the network

  * It touches the file system

  * It can't run at the same time as any of your other unit tests

  * You have to do special things to your environment (such as editing

config files) to run it.

Tests that do these things aren't bad. Often they are worth writing, and

they can be written in a unit test harness. However, it is important to be able to separate them from true unit tests so that we can keep a set of tests that we can run fast whenever we make our changes.

We probably need to take a look at our current tests for Chandler and start grouping the different tests in a way that devs can choose which they want to run. Currently we have the "you can get it in any colour you want ... as long as it's black" mindset ;)


Mentions