maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Edelson <>
Subject Re: Running tests with dynamic file sets
Date Tue, 05 Oct 2010 14:20:26 GMT

On 10/5/10 10:10 AM, Chris Audley wrote:
> I'm writing a POM for a project that needs to run unit tests in two
> groups, one with forkMode "once" and the other with forkMode "always".
>  I understand how to configure two separate executions of the surefire
> plugin in the <build> section with separate <configuration> blocks.
> The problem I have is that the files to be run by each execution can't
> be defined by file patterns in <includes> and <excludes> elements.
> Our current ant based build system uses annotations included in the
> test sources to create two filesets, a junit task is then used to run
> each of the filesets separately.  I know I can use ant within maven to
> create these filesets.  Is there a way I can feed these filesets into
> the surefire plugin?

Not as such. Surefire supports this for TestNG groups. You could
probably also do something similar with JUnit test suites, but that
wouldn't be exactly the same workflow as you have now.

> Is it better to just forego the surefire plugin and run my unit tests
> using an ant based mojo?

I think you'd be better off using TestNG groups if they meet your needs.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message