You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Frederic Camblor <fc...@gmail.com> on 2009/12/22 15:35:00 UTC

"incubating" tests

Hi all !

I'm facing a problem which looks simple but I've not succeeded resolving it
yet :-)

I'd like to create "incubation tests" in my project.

"incubation tests" are :
- part of tests hierarchy, but dissociated with test classes (that is to
say, I will locate them in something like src/incubating_test/java)
- should be compiled in the test-compile phase
- but not executed in the test phase (they will never be executed : they are
in incubation !)

If I add the src/incubating_test/java test source with the build helper
plugin, my incubating test will be executed
If I don't, they won't be compiled
I could add src/incubating_test/java directly to src ... but it will be
really confusing !

I precise : I don't search a "junit/testng" solution which will "disable" my
tests at runtime.

It is a maven build solution (surely with the help of maven-compiler-plugin
and maven-build-helper-plugin) that I'm looking for :-)

Thanks for you help.
Frédéric

Re: "incubating" tests

Posted by Ben Lidgey <BL...@movenetworks.com>.
Or use the excludes config of the surefire plugin to exclude those tests in an incubating phase, then when they grow up to be proper tests remove the name from the surefire plugin config.

See http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html

Ben

On 22 Dec 2009, at 15:04, Frederic Camblor wrote:

> I'm lovin this solution (looks like I forgotten the KISS principle this case
> ... :-))
> 
> Thanks
> Frédéric
> 
> On Tue, Dec 22, 2009 at 3:46 PM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
> 
>> Don't have your tests end in Test or TestCase or start with Test. That way
>> you can keep them in src/test/java and they will be compiled, but surefire
>> will not execute them
>> 
>> 2009/12/22 Frederic Camblor <fc...@gmail.com>
>> 
>>> Hi all !
>>> 
>>> I'm facing a problem which looks simple but I've not succeeded resolving
>> it
>>> yet :-)
>>> 
>>> I'd like to create "incubation tests" in my project.
>>> 
>>> "incubation tests" are :
>>> - part of tests hierarchy, but dissociated with test classes (that is to
>>> say, I will locate them in something like src/incubating_test/java)
>>> - should be compiled in the test-compile phase
>>> - but not executed in the test phase (they will never be executed : they
>>> are
>>> in incubation !)
>>> 
>>> If I add the src/incubating_test/java test source with the build helper
>>> plugin, my incubating test will be executed
>>> If I don't, they won't be compiled
>>> I could add src/incubating_test/java directly to src ... but it will be
>>> really confusing !
>>> 
>>> I precise : I don't search a "junit/testng" solution which will "disable"
>>> my
>>> tests at runtime.
>>> 
>>> It is a maven build solution (surely with the help of
>> maven-compiler-plugin
>>> and maven-build-helper-plugin) that I'm looking for :-)
>>> 
>>> Thanks for you help.
>>> Frédéric
>>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: "incubating" tests

Posted by Frederic Camblor <fc...@gmail.com>.
I'm lovin this solution (looks like I forgotten the KISS principle this case
... :-))

Thanks
Frédéric

On Tue, Dec 22, 2009 at 3:46 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> Don't have your tests end in Test or TestCase or start with Test. That way
> you can keep them in src/test/java and they will be compiled, but surefire
> will not execute them
>
> 2009/12/22 Frederic Camblor <fc...@gmail.com>
>
> > Hi all !
> >
> > I'm facing a problem which looks simple but I've not succeeded resolving
> it
> > yet :-)
> >
> > I'd like to create "incubation tests" in my project.
> >
> > "incubation tests" are :
> > - part of tests hierarchy, but dissociated with test classes (that is to
> > say, I will locate them in something like src/incubating_test/java)
> > - should be compiled in the test-compile phase
> > - but not executed in the test phase (they will never be executed : they
> > are
> > in incubation !)
> >
> > If I add the src/incubating_test/java test source with the build helper
> > plugin, my incubating test will be executed
> > If I don't, they won't be compiled
> > I could add src/incubating_test/java directly to src ... but it will be
> > really confusing !
> >
> > I precise : I don't search a "junit/testng" solution which will "disable"
> > my
> > tests at runtime.
> >
> > It is a maven build solution (surely with the help of
> maven-compiler-plugin
> > and maven-build-helper-plugin) that I'm looking for :-)
> >
> > Thanks for you help.
> > Frédéric
> >
>

Re: "incubating" tests

Posted by Stephen Connolly <st...@gmail.com>.
Don't have your tests end in Test or TestCase or start with Test. That way
you can keep them in src/test/java and they will be compiled, but surefire
will not execute them

2009/12/22 Frederic Camblor <fc...@gmail.com>

> Hi all !
>
> I'm facing a problem which looks simple but I've not succeeded resolving it
> yet :-)
>
> I'd like to create "incubation tests" in my project.
>
> "incubation tests" are :
> - part of tests hierarchy, but dissociated with test classes (that is to
> say, I will locate them in something like src/incubating_test/java)
> - should be compiled in the test-compile phase
> - but not executed in the test phase (they will never be executed : they
> are
> in incubation !)
>
> If I add the src/incubating_test/java test source with the build helper
> plugin, my incubating test will be executed
> If I don't, they won't be compiled
> I could add src/incubating_test/java directly to src ... but it will be
> really confusing !
>
> I precise : I don't search a "junit/testng" solution which will "disable"
> my
> tests at runtime.
>
> It is a maven build solution (surely with the help of maven-compiler-plugin
> and maven-build-helper-plugin) that I'm looking for :-)
>
> Thanks for you help.
> Frédéric
>