Aggregate test results

Dear all,

I would like to create a single HTML page with all the test cases spread across several test classes.
What’s the best way to aggregate all the test cases in a single HTML page?
I’m using the spock framework.

Thank you.

I’m sure many would recommend xslt to transform the xml to html.

I personally think xslt is the worst technology I’ve ever encountered, so I’d suggest using a freemarker template

See http://freemarker.org/docs/xgui.html

Looks like there’s an ant task too
http://freemarker.org/docs/pgui_misc_ant.html

Thanks for your reply.

The default report is quite nice but I need to customize it a bit and I did not find where can I do that in Gradle. Maybe I’m just reading the wrong documentation but I did not find a way to change the default HTML report.

I don’t think there’s hooks to customize… it looks hard-coded to me

See TestReport.java, DefaultTestReport.java and ClassPageRenderer.java

Thanks, yes you are right. I’m going to use the xml, so I’m going to check the freemarker template.

If you like the style of the gradle test report, it should be simple enough to reverse engineer a freemarker template from the html

Perhaps you could come up with a solution where you can group the tests by custom logic. Eg first letter of test name, rather than the default of grouping by package name