ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: JUnit BatchTest
Date Wed, 23 Oct 2002 15:31:12 GMT
No, it is not AFAIK. It relies on files on disk, and cannot deal with files
(classes) inside a JAR. We do not use <batchtest>, but have written our own
'DynamicTestSuite' that finds tests based on similar pattern criteria (plus
additional ones) as <batchtest>, but takes a classpath-like searchpath
(which defaults to the classpath) which can include dirs and/or JARs.

Many such JUnit 'smart' test suite exist in the wild. --DD

-----Original Message-----
From: Tim Sheridan [mailto:tsheridan@intersectsoft.com] 
Sent: Wednesday, October 23, 2002 10:27 AM
To: 'Ant Users List'
Subject: JUnit BatchTest

I am compiling all our test code to a single JAR file of JUnit test cases.
Is there a way the nested <batchtest> tag in the JUnit task can take just a
JAR file? The following code runs the test cases just fine, but I would be
prefer to simply specify a single JAR file. Is it possible? Suggestions?
Thanks, Tim.

    <target name="run.ut">
        <mkdir dir="${ut.result.path}\summary"/>
        <mkdir dir="${ut.result.path}\reports"/>

        <junit fork="yes" maxmemory="256m" showoutput="true"
printsummary="yes">
            <classpath refid="test.code.path"/>
            <formatter type="xml"/>
            <batchtest fork="yes" todir="${ut.result.path}\reports">
                <fileset dir="${output.path}">
                    <include name="**/ut/*.class"/>
                </fileset>
            </batchtest>
        </junit>

        <junitreport todir="${ut.result.path}\reports">
            <fileset dir="${ut.result.path}\reports">
                <include name="TEST-*.xml"/>
            </fileset>
            <report format="frames" todir="${ut.result.path}\summary"/>
        </junitreport>
    </target>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message