You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Harry Larsen <ha...@yahoo.com> on 2007/05/25 14:13:36 UTC
tests layout
Hello,
I have problems with directory layout of tests.
I have the standard directory layout
src\main\java
src\test\java
Problem is - everything under src\test\java is compiled and tested as unit tests.
But I have also integration tests, which can be only run with container. I don't want to run them. So I put the integration tests under src\test\integration.
I configured a little cargo, it compiles stuffs, starts container and stops container.
But it doesn't see any of integration tests.
How this can be done?
Thanks
Harry
---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.
Re: tests layout
Posted by Nelz <ne...@gmail.com>.
This is a bit of nastiness that I've encountered in the past as well.
All the suggestions offered are mostly functional, but ugly in my
view...
So, I have recently started committing to Maven... MNG-2010 is what
I've posted my first changes to, and will be hitting the compile and
surefire plugins as well... (I'm just not sure if the changes are
going to be accepted, because I haven't had any feedback yet...)
- nelz
On 5/25/07, Harry Larsen <ha...@yahoo.com> wrote:
> Hello,
>
> I have problems with directory layout of tests.
> I have the standard directory layout
> src\main\java
> src\test\java
>
> Problem is - everything under src\test\java is compiled and tested as unit tests.
>
> But I have also integration tests, which can be only run with container. I don't want to run them. So I put the integration tests under src\test\integration.
>
> I configured a little cargo, it compiles stuffs, starts container and stops container.
> But it doesn't see any of integration tests.
>
> How this can be done?
> Thanks
> Harry
>
>
>
>
>
> ---------------------------------
> Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: tests layout
Posted by Napoleon Esmundo Ramirez <nr...@gmail.com>.
Hello Harry,
For another example, you can check the integration/web ui tests of archiva
located at:
http://svn.apache.org/repos/asf/maven/archiva/trunk/archiva-web/archiva-webapp-test/pom.xml
Cheers!
Nap
On 5/27/07, Arnaud Bailly <ab...@oqube.com> wrote:
>
> Harry Larsen <ha...@yahoo.com> writes:
>
> > Hello,
> >
> > Thanks for this info. I now understand better, what should I need.
> > I configured my pom.xml accordingly.
> >
> > BUT maven still doesn't see the directory systest.
> >
> > I made this structure:
> > src/main/java
> > src/test/java
> > src/systest/java
> >
> Hello,
> Surefire can handle only one source directory. You can set this to be
> different from src/test/java using the testSourceDirectory
> configuration. In the example provided in my previous post, the
> systest directory is *within* src/test/java, not outside it.
>
> If you want different root sourcse, you could try something like:
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <executions>
> <execution>
> <id>surefire-it</id>
> <phase>integration-test</phase>
> <goals>
> <goal>test</goal>
> </goals>
> <configuration>
>
> <testSourceDirectory>src/systest/java</testSourceDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
>
> HTH
> --
> OQube < software engineering \ génie logiciel >
> Arnaud Bailly, Dr.
> \web> http://www.oqube.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: tests layout
Posted by Arnaud Bailly <ab...@oqube.com>.
Harry Larsen <ha...@yahoo.com> writes:
> Hello,
>
> Thanks for this info. I now understand better, what should I need.
> I configured my pom.xml accordingly.
>
> BUT maven still doesn't see the directory systest.
>
> I made this structure:
> src/main/java
> src/test/java
> src/systest/java
>
Hello,
Surefire can handle only one source directory. You can set this to be
different from src/test/java using the testSourceDirectory
configuration. In the example provided in my previous post, the
systest directory is *within* src/test/java, not outside it.
If you want different root sourcse, you could try something like:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<testSourceDirectory>src/systest/java</testSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
HTH
--
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: tests layout
Posted by Harry Larsen <ha...@yahoo.com>.
Hello,
Thanks for this info. I now understand better, what should I need.
I configured my pom.xml accordingly.
BUT maven still doesn't see the directory systest.
I made this structure:
src/main/java
src/test/java
src/systest/java
If I have tests in src/test/java, I am able include or exclude them, running individually.
but maven (surfire) doesn't execute anything in the src/systest/java.
How can I tell maven, that it should access also the src/systest/java directory?
Or is it that maven can only access src/test/java?
How to organize the structure then?
/src/main/java
src/test/java
src/test/systest/java
? isn't it ugly?
Thanks for suggestions,
Harry
Arnaud Bailly <ab...@oqube.com> wrote: Hello,
This is taken from Confluence maven wiki.
http://svn.apache.org/repos/asf/shale/framework/trunk/shale-apps/shale-usecases/pom.xml
HTH
--
OQube < software engineering \ g�nie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
Re: tests layout
Posted by Arnaud Bailly <ab...@oqube.com>.
Hello,
This is taken from Confluence maven wiki.
http://svn.apache.org/repos/asf/shale/framework/trunk/shale-apps/shale-usecases/pom.xml
HTH
--
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org