ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Swaminathan Gurumoorthy <>
Subject Re: How to call a JUnit TestSuite?
Date Mon, 12 May 2003 19:32:57 GMT
You can use something like creates a neat html report after running all tests. Replace
<test> tag in <junit> task with your own test name *********************************
<project name="projectname" default="main" basedir=".">
<property name="reportdir"          value="${basedir}/reports"/>
 <target name="init">
   <tstamp prefix="build"/>
   <echo>Build starts at ${build.DSTAMP}-${build.TSTAMP}</echo>
  </target>     <target name="unittest" depends="init">
       <junit printsummary="yes" haltonfailure="no">
         <classpath refid="project.class.path"/>
         <test name="" haltonfailure="no" outfile="result">
      <formatter type="xml"/>
       <mkdir dir="${reportdir}/report-${build.DSTAMP}-${build.TSTAMP}"/>
       <junitreport todir="${reportdir}/report-${build.DSTAMP}-${build.TSTAMP}">
    <fileset dir="${basedir}" includes="result.xml"/>
    <report format="frames" todir="${reportdir}/report-${build.DSTAMP}-${build.TSTAMP}"/>

"Duffey, Kevin" <> wrote:Hi all,

We are trying to get JUnit tests to run. Normally we create a class with main() and call the
suite() method which we run all tests with. Is there any way to call this from the junit task,
or do I have to run all the individual tests in the junit task?


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003

The information contained in this e-mail message may be 
confidential and protected from disclosure. If you are 
not the intended recipient, any dissemination, distribution
or copying is strictly prohibited. If you think that you 
have received this e-mail message in error,
please e-mail the sender at

To unsubscribe, e-mail:
For additional commands, e-mail:

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message