ant target for junit
i have Suite.java file as:
public class EshopServiceTestSuite extends TestSuite {
    public static Test suite() {
        TestSuite suite = new TestSuite();
        suite.addTestSuite(ImpactActionTypeTest.class);
        suite.addTestSuite(ProductServiceTest.class);
        return suite;
    }
    public static void main(String[] args) {
         TestRunner.run(EshopServiceTestSuite .class);
    }
}
ImpactActionTypeTest.java file extends TestCase it is working fine. But ProductServiceTest.java
extends ESWTestCase which intern extends TestCase, this causes junit atrget to fail.
<error type="java.lang.reflect.InvocationTargetException">java.lang.reflect.InvocationTargetException
Caused by: java.lang.ExceptionInInitializerError
    at org.apache.log4j.Logger.getLogger(Logger.java:94)
    at com.bgc.ecm.core.test.ElNinoAbstractTestCase.<clinit>(ElNinoAbstractTestCase.java:62)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at com.bgc.EshopServiceTestSuite.suite(EshopServiceTestSuite.java:41)
Caused by: sun.misc.InvalidJarIndexException: Invalid index
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:769)
    .....
</error>
  &开发者_开发技巧lt;system-out><![CDATA[]]></system-out>
  <system-err>< 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论