ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Stevens" <insomniacpeng...@googlemail.com>
Subject Re: ant and junit assertion error
Date Thu, 31 Jul 2008 12:11:12 GMT
2008/7/31 tacman <keplere@morwadi.com>:
> Hi
>
> I am using JUnit and Ant to run/build/test my java code.

Using the <junit> optional task, presumably.  What versions of Ant & JUnit?

> Whenever I try to run a test class (ant test) I receive the following error:
>
> junit.framework.AssertionErrorFailed => no tests found in [....etc]
>
> The test class:
> 1. Imports the junit framework
> 2. has @Test before every test method

Strange; my first guess was it's using the JUnit 3.8.x test runner and
your test methods aren't named testXYZ(), however...

> The test classes in which no tests were found all have the tests methods
> named as initAndTestSomething(). I changed the method names to contain
> 'test' e.g. testInitAndTestSomething(), cleaned the build, recompiled, and
> retested.

... if that were the case, I'd expect this to fix it :-(

> Needless to say, I still receive the assertion error.
>
> Does anyone have any idea what I'm doing wrong?

Can you post the task from your build script?  Maybe someone will spot
something amiss in it.  Also, how are you making the junit jar
available to Ant?


Andy.
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku application

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message