We have migrated to both JUnit 4 and ant 1.7
The tests runs fine in eclipse, but the annotations are ignored when running the tests using ant.
According to t
This happened to me and it was because I was both using annotations and extending TestCase.
public class TestXXX extends TestCase {
@Test
public void testSimpleValidCase() {
// this was running
}
@Test
public void simpleValidCase() {
// this wasn't running
}
}
When you extend TestCase you are assuming JUnit3 style so JUnit4 annotations are ignored.
The solution is to stop extending TestCase.