Automated testing confers a lot of advantages, many of them indirect. One of the advantages of the process that’s rarely discussed but which I find to play a daily role in my understanding of tested source is how failing tests outline the dependency streams in your code, revealing the organic shape of complexity that we usually confront in the isolated methods and classes which compose it.

Developers must be comfortable quickly moving up and down levels of abstraction in their mental models of the code, but for any sufficiently sized project it will become increasingly difficult to analyze any full branch of execution, let alone to recline and mentally survey the interconnections of the involved objects on the whole.
Class diagrams and UML are supposed to help with this, but they’re just forms of documentation, typically designed to express intent and not reality. Testing eclipses their purpose in this regard, by (formulaically!) expressing intent and then comparing it to the reality of the code. As a developer, your integration knowledge comes from running breaking tests with changing methods or changing classes, which then sends a distinct cascade of dependency failures throughout the body of the code.
Automating this process over your entire source, along with the logical visualization provided by the test results, can be instrumental in pushing at the edges of the code, finding the boundaries between objects, and heuristically bringing architectural issues to the surface. In fact, it’s a trick you’ve probably already used if, out of perverse or practical curiosity, you ever changed a method or class name and compiled just to get a documented list of the failing locations. As a byproduct of testing, this greater awareness comes naturally every time you run your tests, and especially when a cascade of failures are triggered.

Code is a restless, shadowy creature of our our making, into which our work is cast to be consumed by the darkness of time and intricacy. Testing is the angel-light which falls against its back and reminds us of its shape, how many limbs it has, and how it moves.
