Testing functional and legacy code
As we continued with this chapter, we got away from the “dots” on the hexagon and more to lines that run end-to-end. Increasingly, these look like things a customer could understand. As APIs start to look and feel more like actual business functions, it becomes possible to express tests as a table that customers can understand and run. Once it is possible to express functionality in terms a customer can understand, it might make sense to expose it to the customer so that they can see the tests as living documentation. We’ll talk more about this in Chapter 4, where we’ll cover customer-facing tests. Eventually, this may blur the line between developer–facing and customer-facing testing. We are okay with this.
Most of this chapter discussed tests as artifacts – that is, as bits of code. We think of a test as a living exploration of software. Remember that a test written down, institutionalized, and run over...