Another possible way that I've seen does "integration tests" and "unit
tests". I'm not actually a fan of this, but it might solve your problem.
In your src/test/java you have to have 2 sets of directories: itest and
utest.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.3-SNAPSHOT</version>
<configuration>
<skip>true</skip>
<forkMode>once</forkMode>
</configuration>
<executions>
<execution>
<id>utest</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<includes>
<include>
**/utest/**/*Test.java
</include>
</includes>
</configuration>
</execution>
<execution>
<id>itest</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<includes>
<include>
**/itest/**/*Test.java
</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
However, I'd go with default maven behaviour. Look into what else you can
do to make your tests faster.
Jim
On 9/12/07, Jason Chaffee <[EMAIL PROTECTED]> wrote:
>
> Use TestNG to run your tests in surefire and then you can use TestNG
> groups. For example,
>
> mvn test -Dgroups=smoke-test
>
> -----Original Message-----
> From: Michael McCallum [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 12, 2007 2:20 PM
> To: Maven Users List
> Subject: Re: Surefire support for 'smoke tests'
>
> refacator your artifacts...
>
> why make maven complicated
>
> On Thursday 13 September 2007 08:52, Brad from MA wrote:
> > Hi,
> > I have surefire working well running a full suite of tests. It is
> bound
> > to the test phase of the default lifecycle. The full suite of tests
> is
> > taking a long time (say 10 minutes and growing), and is onerous for
> > developers to run on a frequent basis as part of their rapid
> development
> > cycles.
> >
> > To remedy this, I'd like to support the ability for a developer to
> run
> > a much quicker subset of the tests to provide more immediate feedback
> > (seconds as opposed to minutes). Yes, it would not be as thorough
> > (probably catches 95% of test failures), but the automated build
> machine
> > will always run the full test suite on every checkin to catch any
> 'missed'
> > failures.
> >
> > 1. How can I configure surefire to support more than one
> 'configuration' of
> > tests to be run? I have no problem as getting surefire to run any
> desired
> > subset of tests; the problem is supporting more than one configuration
> of
> > tests to be run.
> >
> > 2. Ideally developer would be able to type something like: 'mvn
> smoketest'
> > or 'mvn test -Dtest.smoke=true' to invoke the quicker subset of tests.
> Any
> > ideas on how to configure a pom to support something like this?
> >
> > Any help greatly appreciated,
> > Brad
> >
> > p.s. I tried searching the forum for anything related to this, to no
> avail.
>
> --
> Michael McCallum
> Enterprise Engineer
> mailto:[EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> 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]
>
>