ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject RE: junit testing question
Date Wed, 03 Nov 2004 23:08:42 GMT
> From: Scott Purcell [] 
> Prior to using ant, our code base was written to use a 
> TestSuite(xxx.class)
> And we ran them via a script like so:
> java junit.textui.TestRunner classname
> Can I still use these with ant? or do I need to rewrite the tests?

I'm not entirely sure I have the same thing you do, but perhaps this
example will help:

public class TestTrakhistViewDAO extends TestCase {
  public static void main(String[] theArgs)
  { suite() ); }

  public static Test suite()
  { // All methods starting with "test" will be executed in the test
    return new TestSuite(TestTrakhistViewDAO.class); }

<target name="test" depends="compile-test">
  <junit showoutput="true">
     <test name="edu.asu.vpia.dao.files.TestTrakhistViewDAO"/>
     <formatter type="plain"/>
     <classpath refid="test.classpath"/>

Wendy Smoak

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

View raw message