I would like to personalize the content of a Spock Report. In this case I would like to replace the xml output by something more readable. In my test scenarios, expected xml body must match HttpStatus with the following datatable (I just kept the two first scenarios for simplicity)
where:
xml | returnedCode | errorsReceived | errorsNotReceived
innerClass.getFileContent("TS0001_TC0001.xml") | HttpStatus.OK | null | null
innerClass.getFileContent("TS0001_TC0002.xml") | HttpStatus.OK | null | null
I obtain one of the following as a test scenario:
As you can see above, the xml output is displayed properly. However, readability is very poor. I would like to Spock report not to display the xml but instead some input parameters. Documentation mentions very little about Spock Report and ways we could play around.
Can I tell Spock Report to display something (in that case just a text) instead of something else (in that case the xml output), while not changing the essence of the test ?
Thanks for your contributions.