You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Aaron Colwell <ac...@real.com> on 2005/08/01 17:37:51 UTC

Unit test directory question

I'm looking at migrating my project over to using Maven, but I've run into a
problem with how 'maven test' works. I have a directory tree with JUnit tests
in it, but I also have helper classes in that tree that the tests use. These
classes tend to be stub implementations of interfaces. It looks like Maven
tries to execute these as unit tests. They fail of course because they aren't
JUnit tests.

Is there a way to get maven to ignore these classes? What is the standard 
location for classes that are used only for unit testing, but aren't tests
themselves?

Thanks,
Aaron

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


Re: Unit test directory question

Posted by Aaron Colwell <ac...@real.com>.
I figured it out. I compared the project.xml from 'maven genapp' with my
project.xml that mevenide created for me. The unittest section was missing.
Once I added it, everything worked as expected. Sorry for the false alarm.

Thanks for the quick response.

Aaron

On Tue, Aug 02, 2005 at 03:04:38AM +1000, Brett Porter wrote:
> It could be a bug in 1.1-beta-1 (worth testing with 1.0.2) - can you
> post the <build> section (and parent build sections if you extend)?
> 
> - brett
> 
> On 8/2/05, Aaron Colwell <ac...@real.com> wrote:
> > That is what I thought it would do, but it's trying to run tests on classes
> > named FakeDynamicSource and other similarly named helper classes. I don't know
> > if Maven version matters. I'm using v1.1-beta-1.
> > 
> > Aaron
> > 
> > On Tue, Aug 02, 2005 at 02:45:08AM +1000, Brett Porter wrote:
> > > It picks up anything that ends in "Test". You can change this but
> > > adding <excludes> (or changing the <includes>) in the <unitTest>
> > > element inside <build>. See the project descriptor reference for more
> > > info.
> > >
> > > Cheers,
> > > Brett
> > >
> > > On 8/2/05, Aaron Colwell <ac...@real.com> wrote:
> > > > I'm looking at migrating my project over to using Maven, but I've run into a
> > > > problem with how 'maven test' works. I have a directory tree with JUnit tests
> > > > in it, but I also have helper classes in that tree that the tests use. These
> > > > classes tend to be stub implementations of interfaces. It looks like Maven
> > > > tries to execute these as unit tests. They fail of course because they aren't
> > > > JUnit tests.
> > > >
> > > > Is there a way to get maven to ignore these classes? What is the standard
> > > > location for classes that are used only for unit testing, but aren't tests
> > > > themselves?
> > > >
> > > > Thanks,
> > > > Aaron
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> 

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


Re: Unit test directory question

Posted by Brett Porter <br...@gmail.com>.
It could be a bug in 1.1-beta-1 (worth testing with 1.0.2) - can you
post the <build> section (and parent build sections if you extend)?

- brett

On 8/2/05, Aaron Colwell <ac...@real.com> wrote:
> That is what I thought it would do, but it's trying to run tests on classes
> named FakeDynamicSource and other similarly named helper classes. I don't know
> if Maven version matters. I'm using v1.1-beta-1.
> 
> Aaron
> 
> On Tue, Aug 02, 2005 at 02:45:08AM +1000, Brett Porter wrote:
> > It picks up anything that ends in "Test". You can change this but
> > adding <excludes> (or changing the <includes>) in the <unitTest>
> > element inside <build>. See the project descriptor reference for more
> > info.
> >
> > Cheers,
> > Brett
> >
> > On 8/2/05, Aaron Colwell <ac...@real.com> wrote:
> > > I'm looking at migrating my project over to using Maven, but I've run into a
> > > problem with how 'maven test' works. I have a directory tree with JUnit tests
> > > in it, but I also have helper classes in that tree that the tests use. These
> > > classes tend to be stub implementations of interfaces. It looks like Maven
> > > tries to execute these as unit tests. They fail of course because they aren't
> > > JUnit tests.
> > >
> > > Is there a way to get maven to ignore these classes? What is the standard
> > > location for classes that are used only for unit testing, but aren't tests
> > > themselves?
> > >
> > > Thanks,
> > > Aaron
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

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


Re: Unit test directory question

Posted by Aaron Colwell <ac...@real.com>.
That is what I thought it would do, but it's trying to run tests on classes 
named FakeDynamicSource and other similarly named helper classes. I don't know
if Maven version matters. I'm using v1.1-beta-1.

Aaron

On Tue, Aug 02, 2005 at 02:45:08AM +1000, Brett Porter wrote:
> It picks up anything that ends in "Test". You can change this but
> adding <excludes> (or changing the <includes>) in the <unitTest>
> element inside <build>. See the project descriptor reference for more
> info.
> 
> Cheers,
> Brett
> 
> On 8/2/05, Aaron Colwell <ac...@real.com> wrote:
> > I'm looking at migrating my project over to using Maven, but I've run into a
> > problem with how 'maven test' works. I have a directory tree with JUnit tests
> > in it, but I also have helper classes in that tree that the tests use. These
> > classes tend to be stub implementations of interfaces. It looks like Maven
> > tries to execute these as unit tests. They fail of course because they aren't
> > JUnit tests.
> > 
> > Is there a way to get maven to ignore these classes? What is the standard
> > location for classes that are used only for unit testing, but aren't tests
> > themselves?
> > 
> > Thanks,
> > Aaron
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> > 
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

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


Re: Unit test directory question

Posted by Brett Porter <br...@gmail.com>.
It picks up anything that ends in "Test". You can change this but
adding <excludes> (or changing the <includes>) in the <unitTest>
element inside <build>. See the project descriptor reference for more
info.

Cheers,
Brett

On 8/2/05, Aaron Colwell <ac...@real.com> wrote:
> I'm looking at migrating my project over to using Maven, but I've run into a
> problem with how 'maven test' works. I have a directory tree with JUnit tests
> in it, but I also have helper classes in that tree that the tests use. These
> classes tend to be stub implementations of interfaces. It looks like Maven
> tries to execute these as unit tests. They fail of course because they aren't
> JUnit tests.
> 
> Is there a way to get maven to ignore these classes? What is the standard
> location for classes that are used only for unit testing, but aren't tests
> themselves?
> 
> Thanks,
> Aaron
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

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


Re: Unit test directory question

Posted by Gisbert Amm <gi...@webde-ag.de>.
test/resources ?

Regards,
Gisbert Amm

Aaron Colwell wrote:
> I'm looking at migrating my project over to using Maven, but I've run into a
> problem with how 'maven test' works. I have a directory tree with JUnit tests
> in it, but I also have helper classes in that tree that the tests use. These
> classes tend to be stub implementations of interfaces. It looks like Maven
> tries to execute these as unit tests. They fail of course because they aren't
> JUnit tests.
> 
> Is there a way to get maven to ignore these classes? What is the standard 
> location for classes that are used only for unit testing, but aren't tests
> themselves?
> 
> Thanks,
> Aaron
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

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