You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Jason van Zyl <jv...@zenplex.com> on 2002/03/29 16:25:36 UTC

[maven] testing set

Hi,

After going through a little run of trying to setup latka I think there
may be a better way to do the testing. David Peugh suggested using the
source references instead of class references which is what I would like
to do.

So we would have something like the following:

<sourceDirectories>
  <sourceDirectorysrc/java</sourceDirectory>
</sourceDirectories>


<testSourceDirectories>
  <testSourceDirectory>src/test</testSourceDirectory>
</testSourceDirectories>


Where you will notice that the <testSourceDirectories> only include the
paths for directories with tests in them. We can wrangle the process so
that the <sourceDirectories> are aggregated with <testSourceDirectories>
when compiling so that everything is there and we can have something
like the following:

<unitTestEntries>
  <unitTestEntry>include = **/*Test*.java</unitTestEntry>
</unitTestEntries>

And in the <batchtest> we will use only the <testSourceDirectories> in
the <fileset> so that we can avoid having to deal with non-test sources
all together, plus using the sources (as David Peugh pointed out) means
that we don't have to explicity exclude inner classes.

We might even be able to have a default behaviour where the
**/*Test*.java pattern in implicit so that people don't have to define
<unitTestEntries> unless they want to exclude something.

Makes sense?

Thoughts?



-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [maven] testing set

Posted by Jason van Zyl <jv...@zenplex.com>.
On Fri, 2002-03-29 at 12:21, Peter Donald wrote:
> On Sat, 30 Mar 2002 02:25, Jason van Zyl wrote:
> > We might even be able to have a default behaviour where the
> > **/*Test*.java pattern in implicit so that people don't have to define
> > <unitTestEntries> unless they want to exclude something.
> 
> That would not work well with quite a few projects. It is fairly common for 
> some projects to have both *TestCase.java and *TestSuite.java (or TestAll) 
> and thius would lead to tests being executed twice.

We just decided against in IRC actually.
 
> BTW is there any support for optional compilation/junit stuff. ie How easy is 
> it to only compile certain classes if certain jars are in Classpath and so 
> forth?

We threw that one around and initially decided that conditional
compilation in a project isn't a great idea because it leads to code
that isn't maintained. This is what has happened in the Turbine tree.
With the update-jars facility it really isn't that hard to compile
everything. This is what we've decided anyway. This might be annoying
for things like non distributable JARs but provides some consistency
w.r.t. developers are building.

Conditional support is easy to add, we've just decided against it at
this point in time.

> -- 
> Cheers,
> 
> Pete
> 
> *************************************************
> * Committee: Individuals who can do nothing     *
> * individually and sit to decide that nothing   *
> * can be done together.                         *
> *************************************************
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [maven] testing set

Posted by Peter Donald <pe...@apache.org>.
On Sat, 30 Mar 2002 02:25, Jason van Zyl wrote:
> We might even be able to have a default behaviour where the
> **/*Test*.java pattern in implicit so that people don't have to define
> <unitTestEntries> unless they want to exclude something.

That would not work well with quite a few projects. It is fairly common for 
some projects to have both *TestCase.java and *TestSuite.java (or TestAll) 
and thius would lead to tests being executed twice.

BTW is there any support for optional compilation/junit stuff. ie How easy is 
it to only compile certain classes if certain jars are in Classpath and so 
forth?

-- 
Cheers,

Pete

*************************************************
* Committee: Individuals who can do nothing     *
* individually and sit to decide that nothing   *
* can be done together.                         *
*************************************************

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>