More robust render-test

Enforcing some syntax rules and catching now the JSON errors.