Tom Eyckmans wrote:
Hi all,
The behavior described in GRADLE-538 occures when there are no test
classes, in this case both JUnit / TestNG tasks try to execute all
classes as tests.
In order to solve this I'd like to skip test execution (calling of the
JUnit / TestNG Ant tasks). This results in an empty JUnit report and
no report in case of TestNG. The TestNG Ant task doesn't allow it to
be run for no test classes, the Ant JUnit task does. So I'd like to
add a GradleException when there are no test classes with a boolean to
disable the exception (failWhenNoTests) default true.
The general approach of most of our tasks is to be forgiving of things
like this. This approach leads to a more flexible system because the
tasks make less assumptions about the world, they just deal with the
world as they find it. Why should the test task care that there are no
executable test classes in the test classes dir? Why is this a failure
from it's point of view? The task should deal happily with either case,
I think.
One case for an exception like this is that it performs a kind of
verification that the world matches the model. However, this kind of
checking belongs with the thing that owns and understands the model,
that is, the Java plugin, not the executable steps, like the test task.
Currently when there are no test classes at all the build is ok in
case of JUnit but in case of TestNG it fails, this is not really
consistent, so we might want to straighten this out.
This may cause a lot off builds to fail so I'd like to hear your
optinions on this matter - to fail or not?
Not
Adam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email