in reply to Testing at the right granularity

I think it really depends on what the module does. The objective of your test suite should be that you can safely modify code and know if the changes you have made affect existing functionality. Exactly how you reach that goal from a test point of view really depends on the functionality. Some things you want to have a whole load of micro tests for each little possible changes. Tests like these if they are well coupled to the functionality make working out what went wrong easier. OTOH having a bunch of coarse tests that WILL fail if things change will give you sufficient warning of a mistake to make enhancements a lot easier, without necessarily requiring the precision of the microtests.

In Data::Dump::Streamer I use a small number of fine grain tests for simple things with the rest tested via doing stright string comparisons of the output. Even a single one of the coarse grained tests represents a whole whack of fine grained tests.

---
demerphq