You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Martin Huber <Ma...@esg.de> on 2012/02/24 13:24:32 UTC
junit task: Unable to run JUnit4 test with TestCase super-class
Is there a way to force Ant 1.8.2 to use JUnit4 for JUnit4 tests which it
does not recognize correctly?
I have JUnit4 test classes which extend a class (SeleneseTestCase) which
in turn extends junit.framework.TestCase.
The tests require a custom JUnit4 Runner which is annotated to the test
classes using @org.junit.runner.RunWith.
To my knowledge, it is perfectly okay for JUnit4 test classes to have ANY
super class. Other tools do handle the tests as JUnit4.
(Every developer would recognize the class as JUnit4 at first glance, just
from the @RunWith annotation.)
With Ant 1.7.0, I was able to reliably switch to JUnit4 by adding JUnit4
libraries.
With Ant 1.8.2, my JUnit4 tests are run by JUnit3, without a happy ending
as you can imagine.
Martin
_____________________________________________________________________________________________________________________
ESG Elektroniksystem- und Logistik-GmbH
Rechtsform/Legal Form: Gesellschaft mit beschränkter Haftung
Sitz/Registered Office: München
Handelsregister/Commercial Register: Registergericht München, HRB 8130
Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Peter
Obermark
Vorsitzender der Geschäftsführung/CEO: Dipl.-Math. Gerhard Schempp,
Geschäftsführer/Managing Director: Dipl.-Kfm. Götz Graichen
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org