Improvement TW-1255

- #TW-1255 New testing framework (thanks to Renato Alves).

Signed-off-by: Paul Beckingham <paul@beckingham.net>