How to run all annotated tests contained in the classpath?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   watzlaw_wutz
Posted On:   Wednesday, May 23, 2007 04:07 PM

Hi, I would like to run all annotated tests within my classpath using an ant task. By using common IDEs like Idea or Eclipse it is possible to to so. But using ant the following task does not work: Unfortunately Ant tries to instantiate all classes (and not only the one which contain annotated tests methods and for sure the required empty constructor), which fails with the following error message: Testcase: initializationError0 took 0.031 sec Caused an ERROR Test class should have public zero-argument constructor java.lang.Exception: Test class should have public zero-argument constructor at java.lang.ref   More>>

Hi,


I would like to run all annotated tests within my classpath using an ant task. By using common IDEs like Idea or Eclipse it is possible to to so. But using ant the following task does not work:














Unfortunately Ant tries to instantiate all classes (and not only the one which contain annotated tests methods and for sure the required empty constructor), which fails with the following error message:


Testcase: initializationError0 took 0.031 sec
Caused an ERROR
Test class should have public zero-argument constructor
java.lang.Exception: Test class should have public zero-argument constructor
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
........


Is there another possibility to run all annotated tests using Ant?


Best regards,
Watzlaw Wutz

   <<Less
About | Sitemap | Contact