On 27/07/10 12:13 AM, Lars Heuer wrote:
Hi there,
I have an additional test task where I set a system property to
another value:
task implTests(type: Test, dependsOn: jar) {
classpath = test.classpath
testClassesDir = test.testClassesDir
systemProperties['myprop'] = 'myval'
}
build.dependsOn implTests
That works so far (at least I see at the cmd line that the tests are
executed), but I wonder if it is possible to add these tests to the
HTML test report. I only get the test results for the "default" tests,
but not for my "implTests".
Note, that I execute the *same* tests but with another implementation.
Any clue?
Both test tasks will have the same (default) test results and report
dirs, so the task that runs second will scribble over the results of the
other.
You can configure the results and reports dir. For example:
implTests {
testResultsDir = new File(project.testResultsDir, 'implTests')
testReportDir = new File(project.testReportDir, 'implTests')
}
Of course, you could argue that:
1. Having all the test task instance use the same default directories is
not a very good idea.
2. The test report should handle the case where multiple instances of
the same test are run.
And I think you'd be right. Problem 1 we will aim to fix before Gradle
1.0 is release (there's a few other places where this problem exists).
Problem 2 we will fix when we switch to using our own test reporting,
rather than relying on the Ant junit report. Not sure when this will
happen, possibly not before Gradle 1.0, but it's certainly on the wishlist.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email