Specification by Example, A must for Continuous Integration
Chris C. Schotanus
CGI
“One of the most effective ways of specifying something is to describe (in detail) how you would accept (test) it if someone gave it to you.” Bill Hetzel
The rule “working software over comprehensive documentation” is often misinterpreted which leads to a situation that no or minimal documentation is delivered at the end of a sprint.
A reason to spend as little as possible on documentation is that, due to the flexibility of the process, documents easily become outdated and lose their value. Specification by Example, based on the principles of test Driven Development, will solve this.
Main advantages
There are three main advantages of Specification by Example. It leads to
• Common understanding; the whole team understands what should be done
• Implicitly created Acceptance Test Cases
• Living documentation; with each new change, the test cases must be changed first.
Continuous Integration
When Specification by Example is used the path towards continuous integration is paved: test cases and test automation are ready to be executed right from the start. So every time a developer checks in the software, the automated execution of the acceptance test cases can be run and feedback on quality of the software is given. If there are test cases of which the developer did not create software yet it will lead to known errors. So after the last build iteration and the final execution of the acceptance test cases, the software is ready to be shipped.