ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 46879] Enhance <batchtest> to support running tests from multiple source folders
Date Fri, 20 Mar 2009 16:29:15 GMT

--- Comment #7 from Boris Capitanu <>  2009-03-20 09:29:13 PST ---
I discovered that since I'm compiling all test cases into the same destination
folder, I can forego using the <mappedresources> and do the following:

   <fileset dir="${build.test.dir}" includes="**/*Test.class"/>

where build.test.dir is populated as follows:

       <javac destdir="${build.test.dir}" debug="on">
            <src refid="src.test.dirs"/>
                <path refid="meandre.core.classpath"/>
                <path refid="test.classpath"/>
                <pathelement location="${build.src.dir}"/>

This is as simple as it can get, and works in the current Ant releases.

I didn't know that <batchtest> uses the enclosed resource collection (in my
case the <fileset>) only to determine the class names of the unit tests it
needs to run (and these class names are derived from the file names returned by
the fileset).   I thought that the fileset needed to reference the actual java
source code of the unit tests, but it doesn't.  

Thanks again for all your help.  The <mappedresources> is still something I can
find a lot of uses for - so I can't wait for Ant 1.8 :-)

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message