cbeust/testng — Issue #186: Remove '*.class' restriction from classfileset element in Ant task
Author: lukasj
Created: 2012-03-07 16:32:18+00:00
State: open

TestNG Ant task supports 'classfileset' element (=fileset) which adds "**/*.class" filter to the supplied fileset - this behaviour is not consistent with 'xmlfileset', which does not add any filter nor with how 'classfilesetref' attribute behaves and makes it difficult to pass tests from different test folders to the Ant task if one has to refer to test source files. Adding an explicit '**/*.class' filter to the fileset is also something quite easy for the user to do.

Since this may be used by Eclipse (or other) plugin, removal of this 'filter' may not be possible, so the other option would be to add fileset to supported elements for the Ant task.

What I'm trying to do is:
-I have a project with two folders containing test sources, say '/a/b' and 'c/d', test sources match '**/*Test.java'
-I want to pass them to TestNG Ant task at once
-I have to use pure Ant 1.8 (no Ant-contrib, no scripting, no augment task)

I can maybe get around this by using 'pathconvert' or by calling the task twice (once for each test root) but both ways seem to me to be inefficient.

[1]: https://github.com/cbeust/testng/blob/master/src/main/java/org/testng/TestNGAntTask.java#L337