there is already a jira regarding this:
http://jira.codehaus.org/browse/GRADLE-243
default-pattern should IMO be:
test {
include '**/*.Test.class'
include '**/*.Tests.class'
exclude '**/Abstract*'
}
-> different people want to have different
defaults per gradle-installation ...
Adam Murdoch-2 wrote:
>
>
>
>
>
> Russel Winder wrote:
>> I have a class in my test hierarchy that is a support class for the
>> tests, it has no tests in itself. Gant, Maven, Ant, SCons are OK with
>> this, but Gradle is flagging this as a test failure: it seems Gradle
>> asserts that all classes in the test hierarchy must have one or more
>> test cases.
>>
>>
>
> I think this is due to 2 things:
> - The test task by default attempts to run every class in the test
> hierarchy as a junit test class, and
> - Junit asserts that every class it is given has some test cases in it.
>
> You can change which classes are treated as test classes using the test
> task's include() and exclude() methods:
>
> test {
> include '**/*.Test.class'
> exclude '**/Abstract*'
> }
>
> Having the test task run everything is not a particularly good default.
> We should pick a convention for test class naming, use it as the
> default, and allow you override the convention if you care. We could
> possibly also filter out classes which aren't test classes (eg abstract
> classes), regardless of the naming scheme we choose.
>
>> I am proposing to flag this as a bug and create a JIRA, but thought I
>> ought to check first.
>>
>>
>
> I think you should add something to JIRA. Stuff should just work without
> configuration (or fail with a reasonable error message), and this is not
> the case here.
>
>
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>
--
View this message in context:
http://www.nabble.com/classes-with-no-tests-in-the-test-hierarchy-tp19823357p19835539.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email