The Concordion framework brings together testing and specification. Concrete examples of expected behaviour (written in HTML) can be instrumented with Concordion commands that run tests against the real system via some Java fixture code. The fixture code helps to decouple the specs from the system.

See here for a simple example.

Further Details