Another perspective on this issue is that naming a file which is not a
test with the name *Test.java is not particularly clean either, right?
Maven is not just a build tool -- it is also a collection of best
practices enforced by default configurations provided in the plugins.
It sounds like the best practice "only tests are named *Test in my
project" is something you don't agree with -- in this case, you will
not want to accept the defaults, but instead override them with extra
configuration specific to your project.
Wayne
On 6/8/07, Martin Monsorno <[EMAIL PROTECTED]> wrote:
Hi,
thanks for the answers. I know that I can controls, which tests are
executed by including or excluding some of them, but that's not the
point. Any tests, that match the inclusion pattern, should not be
executed, if they are not a Junit TestCase, i.e. extend
junit.framework.TestCase and is not abstract. E.g. this class:
<code>
public class DoesThisExecuteTest {
}
</code>
should not be considered as test case and be executed, but it is when
running "mvn test":
...
Running de.kvb.apo.corrservice.DoesThisExecuteTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec <<<
FAILURE!
...
with this report:
-------------------------------------------------------------------------------
Test set: de.kvb.apo.corrservice.DoesThisExecuteTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec <<<
FAILURE!
de.kvb.apo.corrservice.DoesThisExecuteTest Time elapsed: 0 sec <<< ERROR!
java.lang.Exception: No runnable methods
at
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:34)
at
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
That's not a real problem, and will not exist any more with Junit 4,
but, well, it's not "really clean", is it?
Regards,
Martin.
--
Martin Monsorno
mailto:[EMAIL PROTECTED]
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]