So what do I mean by living documentation? As the application is built, automated tests are continually being written to ensure that speci c criteria are met. These tests come in many different shapes and sizes, ranging from unit tests to integration tests and leading up to end-to-end functional tests and beyond. All of these tests describe, in some way, how the application works. You have to admit that this sounds just like documentation.
This documentation may not be perfect, but that doesn't stop it from being documentation. Think of an application that has some unit tests, and maybe one badly written end-to-end test. I would equate that with the sort of documentation that you would get with a cheap electrical product, from somewhere like China. It comes with a manual that will undoubtedly include a small, badly written English section which doesn't really tell you very much. It will also have lots of documentation in a language that you probably don't understand, in this case Chinese, which is very useful for somebody who speaks that language. This doesn't mean that the product is bad; it's just hard to work out what to do with it. Most of the time, you can work out what to do without the manual. If it's really complex you will probably go and nd somebody who either speaks Chinese, or knows how the product works, and get them to
explain it to you.
When I talk about tests as documentation, I usually think of different test phases as being documentation for different people. Let's take the unit tests; these are highly technical in nature and explain how tiny bits of the system work in extreme detail.
If you compared this to the manual of an electrical product, these would probably be the tech specs in the appendix that provide lots of in-depth information that
most consumers don't care about. Integration tests would probably be the part of the manual that explains how to connect your electrical appliance to other electrical appliances. This is very useful if you are going to connect to another electrical appliance, but you probably don't care about it that much if you aren't. Finally the functional end-to-end tests are the bit of the documentation that actually tells you how to use the appliance. This is the part of the manual that will be read the most by the average user (they probably don't care about the technical nitty-gritty).