News for hackers. Stuff that matters.
Re:Unit testing best practices by ExpiredLink on Tuesday November 06, 2012 @02:09PM (#4750025)
> Unit testing is not about finding bugs

Of course it is!

> Mock out all external services and state

... unless those 'external services' are an essential part of you application (e.g. databases).

> Don’t unit-test configuration settings

Unit-test anything that needs to be unit-tested.

> All methods, regardless of visibility, should have appropriate unit tests

Capable of being misunderstood ...

> Aim for each unit test method to perform exactly one assertion

This limitation makes no sense.

> Do not print anything out in unit tests

Arbitrary restriciton.

> Capture results using the XML formatter

But why?

tl;dr Thanks, but I stick to my own tried and proven Unit-test guidelines.

There are no comments on this comment yet.