Robert Fletcher
2010-08-05 12:35:48 UTC
Hi
I'd like to be able to make a simple customization to the JUnit
report. Specifically I want to append to
$testReportDir/stylesheet.css. If using ant:junitreport directly I
could pass the styleDir parameter and supply a custom XSL file. I
can't see any way to leverage that from Gradle, though. Since what I
want to do is so simple I thought I could just modify the file in
test.doLast. Unfortunately the modification I want to make is really
only useful when the tests fail - it makes the output clearer - and
the test.doLast closure is not run if the tests fail.
I could, I suppose, set ignoreFailures = true, do my modification then
try to detect the test state and fail, but that seems kinda hacky!
Anyone have any ideas?
Cheers,
Rob
I'd like to be able to make a simple customization to the JUnit
report. Specifically I want to append to
$testReportDir/stylesheet.css. If using ant:junitreport directly I
could pass the styleDir parameter and supply a custom XSL file. I
can't see any way to leverage that from Gradle, though. Since what I
want to do is so simple I thought I could just modify the file in
test.doLast. Unfortunately the modification I want to make is really
only useful when the tests fail - it makes the output clearer - and
the test.doLast closure is not run if the tests fail.
I could, I suppose, set ignoreFailures = true, do my modification then
try to detect the test state and fail, but that seems kinda hacky!
Anyone have any ideas?
Cheers,
Rob