Hi,
I tested it this way:
Configuration:
Maven version: 2.0.9
Java version: 1.5.0_09
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
1). I renamed my test class from ServiceTest to ServiceXxx
I run
mvn clean install
==> The file was ignored
2). I renamed my test class from ServiceXxx to ServiceTest
All test methods in the file have the form:
@Test
public void noNameGetPersonByNameNoPerson() throws Exception
I run
mvn clean install
==> All tests were executed
==> The test file must be named according to
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#includes
==> The test methods don't have to follow any convention.
Only the annotation @Test is necessary.
Best Regards.
Jean-Claude
-----Ursprüngliche Nachricht-----
Von: Anders Hammar [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 10. Dezember 2008 14:06
An: [email protected]
Betreff: Re: Is Maven / JUnit 4.x broken (annotations)
Or "*Test.java", or "*TestCase.java". That's the names surefire is configured
for by default.
(http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#includes)
I would suggest trying it in Eclipse first. If it works there, then there is
some configuration issue for Maven.
/Anders
Josh Suereth wrote:
>
> I believe the name of the class still matters. Try calling it
> "Test*.java"
>
> On Wed, Dec 10, 2008 at 12:16 AM, CheapLisa <[EMAIL PROTECTED]> wrote:
>
>>
>> I have JUnit 4.5 as a dependency in my maven pom
>> and I have imported annotations into my test case but
>> it is not recognizing the @Test and @Ignore annotations.
>>
>> I still have to preface the method name with "test"
>> and the @Ignore tests get executed.
>>
>> Is something broken? What do I need to do to get this
>> to work like expected and to take advantage of JUnit 4.x
>> which has over a year of release now.
>>
>>
>> thanks
>>
>> Lisa
>> --
>> View this message in context:
>> http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20929389.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20934997.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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]