From Unit Tests to Fitnesse

Here we build out from a unit test example to working with fitnesse

The important thing to remember is that unit tests demonstrate the quality of a unit of code. They don’t test several components working together as one. You need another tool for this.

Another way to think about it is - if you were a large contractor hired by Network Rail to lay track infrastructure for the UK rail network you wouldn’t expect Network Rail or its infrastructure contractors to test the individual components that are going to be used to build the infrastructure. At some point the suppliers of the components would have demonstrated the quality of their components through a series of tests. The tests would be clearly designed to demonstrate that each components meets a specific requirement. We can call these tests unit tests.

The integration of all of those components is a different set of tests. This is not the purpose the unit tests. The unit tests allow the the supplier of those components to demonstrate the quality of the components. It is not the job of Network Rail or any of the contractors they recruit to build the infrastructure to test those components, unless there is reason to doubt the quality of the components. This wouldn’t be cost effective.

Tools like fitnesse and Gherkin and Cucumber, are an excellent way to verify what is being built (the execution of the integrated components) meets the acceptance criteria specified by the client.