Nov
18

By: Adam Sroka
11/18/09 10:13 pm UTC
Topic: No Tags

Good unit tests are:

Fast – they run in no more than a few milliseconds on typical hardware

Isolated – they remove any dependencies using mocks which verify the way the dependencies are called and stub the return value.

Repeatable – they have no dependence on external state and can be run over-and-over with the same results (Unless the code changes.)

Examples – they demonstrate the way that the code is intended to be used and thus enable Coding By Intention (If you write them first.)

(note: due respect to the author of FIRST but I prefer my version.)

(2) Comments
Comments:
2 Comments posted on "Are your unit tests on FIRE?"
Fabrice Aimetti on November 26th, 2009 at 1:27 am

Hello Adam,
Good post! I’ve translated it in french : Vos tests unitaires sont-ils FIRE ?
Regards, Fabrice


[...] already know that good unit tests are on FIRE. Here are some characteristics of good [...]


Post a comment
Name: 
Email: 
URL: 
Comments: