From the keynote at XpDay London: Mark Striebeck, engineering manager at Google where he is responsible for developer testing infrastructure, tools and adoption.
Here are some criteria to assess the usefulness of a unit test
It never fails or it is often ignored or it raises false alarms most of the times? This means that it is not giving back very much value. My advice: come on, just delete it !!!
And I add this advice, don't forget that the primary benefit of unit test and TDD is to make emerge a good design. Update: I learned that is perfectly acceptable TDD can be used to focus also on specifications and verifications, looks TDD Continuum.
Update: more notes on this keynote here: Improving testing practices at Google
Update: the blog of Google about Testing: http://googletesting.blogspot.com/
- How often the test fails? When the test never fails there are chances that it is not testing anything that need tests.
- Has the test been marked as "ignore" to release the system? So it's failure is not a real bug.
- When the test is red, what changes are needed usually to fix it?
- add or change a feature => ok
- change the test code => ko, a false alarm
- other changes => ko, a false alarm
Print | posted @ sabato 12 dicembre 2009 14.25