ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Junit + Ant
Date Tue, 22 Jul 2003 12:47:54 GMT
Maybe you TestSuite has some errors. For faster tests during development I
wrote
a TestSuite for testing selectors. With that skelleton you should be able to
start.



package org.apache.tools.ant.types.selectors;

import junit.framework.*;

public class BSTTestSuite {
  public static junit.framework.Test suite() {
        TestSuite rv = new TestSuite();

        // tests only that single testcase "testRespondsToError"
        //rv.addTest(new
org.apache.tools.ant.types.selectors.CacheSelectorTest("testRespondsToError"
));

        // tests all testcases inside CacheSelectorTest class
 
rv.addTestSuite(org.apache.tools.ant.types.selectors.CacheSelectorTest.class
);

        return rv;
    }
}


Have you implemented the suite() method?


Jan


> -----Original Message-----
> From: Aloizio Pereira da Silva [mailto:aloizio@dcc.ufmg.br]
> Sent: Tuesday, July 22, 2003 2:39 PM
> To: user@ant.apache.org
> Subject: Junit + Ant
> 
> 
> Hi everybody,
> 
> I am trying to run my unit tests. I have a class java, its name is
> Testador.java that runs all the tests in a package. I obtain 
> the following
> message:
> 
> Buildfile: build.xml
> 
> runtests:
>     [junit] .F
>     [junit] Time: 0
>     [junit] There was 1 failure:
>     [junit]
> 1) warning(junit.framework.TestSuite$1)junit.framework.AssertionF
> edError: No tests found in teste.siace.remessaanual.Testador
> 
>     [junit] FAILURES!!!
>     [junit] Tests run: 1,  Failures: 1,  Errors: 0
> 
> 
> BUILD FAILED
> file:M:/Aloizio/JAVADOC/synergia_checkstyle/build.xml:207: Java
> returned: 1
> 
> Total time: 2 seconds
> 
> Could someone help me?
> 
> 
>             *****************************************************
>             *         Federal University of Minas Gerais        *
>             *          Department of Computer Science          *
>             *         Master Degree in Computer Science         *
>             *                                                   *
>             *                 Aloizio Silva                     *
>             *         http://www.dcc.ufmg.br/~aloizio          *
>             *                                                   *
>             *      Mobile Computer and Network Optimization     *
>             
> *****************************************************         
>                  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message