Revised automation system to use JSON returns.

NEW
* Added documentation in `TESTING.md`

CHANGES
* Test cases are now required to return a JSON object as this is more
flexible for debugging purposes.