In every earlier test-case we created the Markua input file manually and then we created the expected DOM in JSON representation also manually.

When we implemented the parsing and testing of Markua resources we ran the tests first and then took the dump of the error message and used that to create the JSON representation of both the DOM and the error report. It was a bit of unnecessary manual work. After all we could convert the generated DOM to JSON. Look at it to verify that we really want that to be the expected results and then save it as the expected JSON.

How can we make this easier?