According to
http://maven.apache.org/plugins/maven-surefire-plugin/usage.html
it should work with both TestNG and JUnit.

What I'm wondering about is why TestNG is getting into your classpath. Your
dependency should typically have a test scope dependency to TestNG, which
will be omitted in the transitive dependency. Something is strange here. Or
do you have a dependency to an artifact including test classes which have
compile scope dependency to TestNG?

One way to solve this is to add a dependency exclusion for TestNG on your
dependency.

/Anders

On Wed, Oct 21, 2009 at 14:54, Bulat Nigmatullin <[email protected]> wrote:

> I have a project with a lot of JUnit test. Recently I've added new
> dependency wich have TestNG in it's dependencies. From that moment
> Surefire plugins don't run JUnit test anymore. It seems to me that
> Surefire tries to find TestNG tests but not find them and don't search
> for JUnit tests. Is this behaviour correct and how can i fix this?
>
> I have the following line in log:
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running TestSuite
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.117
> sec
>
> Results :
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
>
> Best regards,
> Bulat Nigmatullin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to