Sure, here we go:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.maven-surefire-plugin}</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>${version.maven-surefire-plugin}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>${version.maven-surefire-plugin}</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>**/*Spec*.java</include>
<include>**/*Feature.java</include>
<include>**/*Test.java</include>
<include>**/*TestCase.java</include>
</includes>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
Andreas
2013/7/24 Francesco Mari <[email protected]>
> Can you provide your configuration for the m-surefire-p?
>
>
> 2013/7/24 Andreas Dolk <[email protected]>
>
> > Hello all,
> >
> > we have maven builds for projects that use both jUnit and testNG tests.
> So
> > I configured the maven surefire plugin to use multiple providers (
> >
> >
> http://maven.apache.org/surefire/maven-surefire-plugin/examples/providers.html
> > )
> > and it works pretty well - apart from the problem, that now TestNG tries
> to
> > run every single jUnit test in the project. It takes about 2 seconds for
> > each test until it finds out that it has nothing to to (only jUnit
> > annotations on the test class)
> >
> > The annoying part is that now some tests that failed with jUnit are
> marked
> > ok after TestNG didn't find a problem.
> >
> > Is there anyway to configure surefire or the providers so that they only
> > run "their own" tests and ignore the others? A solution where rename the
> > test to filter by names would be fine for me.
> >
> > Best regards,
> >
> >
> > Andreas
> >
>
--
Andreas Dolk
Zurmainerstraße 33
D-54292 Trier
Phone「+49 651 4362884」
Mobile「+49 177 4970815」
EMail「[email protected]」