On Mon, Dec 15, 2008 at 11:12 AM, Peter Niederwieser <[email protected]> wrote:
>> What you are saying is that the surefire plugin is not JUnit4 enabled?
>
> Unfortunately, Surefire isn't capable of detecting JUnit 4 tests by itself.
> You always have to adhere to some naming convention.

To be clearer - surefire will certainly detect JUnit 4 tests, but:

1) It will only search for JUnit tests if your project has a
dependency on junit:junit 4.x (this is hardcoded, but there is some
relaxation of rules for a few other scenarios - I don't know where
this is documented)

2) By default, it will only examine the following classes for JUnit 4 tests:
    - **/Test*.java
    - **/*Test.java
    - **/*TestCase.java
This is documented at
http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html.
That page also contains an example of the syntax for changing the set
of classes that are included or excluded from examination.

- John

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to