| |
Evil Unit Testing
by Paul Wheaton
As a contractor, I have now appeared at no less than six different companies beaming with pride that they have
"unit testing"! And, combined with that great pride is concern that this "unit testing" is turning out to be a
hassle. "Other people talk about how great unit testing is, but this is really becoming painful. The tests take 45
minutes to run, and for every little change to the code, we break about seven tests!"
What these folks have is a massive pile of functional tests. They fell into the popular trap of thinking that because
they run the tests with JUnit, they must be unit tests. 90% of their problems could have been resolved with just a
wee bit of vocabulary.
To clarify the number one struggle shops have with "unit testing":
Making good unit tests requires an understanding of
To get an idea of how a project might keep all of this stuff straight, take a gander at a
Fin
This is just a quick overview of this topic. But once you have your head wrapped around this, you're ready for
- continuous integration
- ant
- improving your layer interfaces while not sacrificing testability (static methods using inner implementation classes)
- testing one class or one test method from your IDE
- test first development (sometimes called test driven development) - should you do it more, than, say 30% of the time?
- Extreme Programming!
- Fitnesse
|
|