Writing a library function is like designing an API. But do we always take the necessary care? Literate testing is an approach that gently guides you towards that care. You will create usable APIs, with better documentation and the most important tests: code examples. Design becomes a dialogue between documentation, examples-turned-tests and implementation sketches.
Literate testing is not new, but deserves wider usage in the Java world. This video present the approach in detail as well as a supporting tool called JCite. JCite cites snippets of Java source code or Excel sheets into HTML documents – API documentation, for instance. Citing from tests, or tested code, lets you guarantee that your examples really work. And they get automatic syntax highlighting.
Video Producer: http://www.devoxx.com/