Actually, it must be using JUnit 4 because I have a test suite
completely configured with annotations. Also, when one of my unit tests
throws an untrapped exception I see this in the stack tract:
java.lang.NullPointerException
at
... notice Spring Framework is doing something. My test class extends
AbstractJpaTestCase
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.access$001(AbstractAnnotationAwareTransactionalTests.java:71)
... Notice surefire Junit4TestSet
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
So this must be a spring problem.
Thanks,
Ryan
Ryan de Laplante wrote:
Hi,
My junit tests work if I prefix test method names with the word test.
If I don't do that and rely on the @Test annotation then the test
methods are not executed.
I have this in my POM:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
and in my build section I have:
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<includes>
<!-- Only execute test suites -->
<include>**/*TestSuite.java</include>
</includes>
</configuration>
</plugin>
</plugins>
So I am using the latest version of surefire. Any ideas why it's not
using Junit 4?
Thanks,
Ryan
---------------------------------------------------------------------
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]