in reply to Testing at the right granularity

dragonchild has it right -- in my tests on tree structures, I will stringify the two trees in question and simply compare the strings. If your tree object collections do not have built-in stringification, then use something like Data::Dumper to stringify them.

Now if this test fails, you, as the developer, will no doubt be interested in such questions as whether all nodes are incorrect or only a specific subset of nodes, etc. So perhaps the node-level testing could be a fallback upon failure of the overall stringified comparison test.

Cheers,
Matt