You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Carlo Camerino <ca...@gmail.com> on 2010/01/15 11:35:28 UTC
Questinos Regarding Testing
Hi,
I'm trying to run a test on a project with several submodules in it.
One of our projects has an xml file which is included in a different project
with the one testing it.
dao
|
src/test/resources | --> test-dao.xml
service
|
src/test/resources | --> test-service.xml
When i run tests in the service layer, it can't seem to find the
test-dao.xml which i have a dependency on. I'm using testng to run this.
One of the work aroudn would be to include i in src/main/resourcew which i
don't want to do...
how do i handle this?
thanks
carlo
Re: Questinos Regarding Testing
Posted by Carlo Camerino <ca...@gmail.com>.
i'm using mvn test to run this btw
i'm using maven surefire plugin
On Fri, Jan 15, 2010 at 6:51 PM, Entner Harald <En...@afb.de> wrote:
> even this is not a maven related question (as i assume that the dependent
> jar is on the classpath), how do you open the file?
>
> -----Ursprüngliche Nachricht-----
> Von: Carlo Camerino [mailto:carlo.camerino@gmail.com]
> Gesendet: Freitag, 15. Januar 2010 11:35
> An: users@maven.apache.org
> Betreff: Questinos Regarding Testing
>
> Hi,
>
> I'm trying to run a test on a project with several submodules in it.
> One of our projects has an xml file which is included in a different
> project
> with the one testing it.
>
> dao
> |
> src/test/resources | --> test-dao.xml
> service
> |
> src/test/resources | --> test-service.xml
>
> When i run tests in the service layer, it can't seem to find the
> test-dao.xml which i have a dependency on. I'm using testng to run this.
> One of the work aroudn would be to include i in src/main/resourcew which i
> don't want to do...
>
> how do i handle this?
>
> thanks
> carlo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
AW: Questinos Regarding Testing
Posted by Entner Harald <En...@afb.de>.
even this is not a maven related question (as i assume that the dependent jar is on the classpath), how do you open the file?
-----Ursprüngliche Nachricht-----
Von: Carlo Camerino [mailto:carlo.camerino@gmail.com]
Gesendet: Freitag, 15. Januar 2010 11:35
An: users@maven.apache.org
Betreff: Questinos Regarding Testing
Hi,
I'm trying to run a test on a project with several submodules in it.
One of our projects has an xml file which is included in a different project
with the one testing it.
dao
|
src/test/resources | --> test-dao.xml
service
|
src/test/resources | --> test-service.xml
When i run tests in the service layer, it can't seem to find the
test-dao.xml which i have a dependency on. I'm using testng to run this.
One of the work aroudn would be to include i in src/main/resourcew which i
don't want to do...
how do i handle this?
thanks
carlo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Questinos Regarding Testing
Posted by Wayne Fay <wa...@gmail.com>.
> I can think of a couple ways of doing this. One, make a jar of your dao
> tests and then depend on this with test scope in the other module. Second,
> make a third module that has these test resources, then unpack where they
> need to go.
There's also the jar:test-jar option (which is essentially your first
point above but formalized):
http://maven.apache.org/plugins/maven-jar-plugin/test-jar-mojo.html
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Questinos Regarding Testing
Posted by David Hoffer <dh...@gmail.com>.
Tests (and test resources) from one module do not propagate to other
modules. You say you have a dependency on it, how did you specify this?
I can think of a couple ways of doing this. One, make a jar of your dao
tests and then depend on this with test scope in the other module. Second,
make a third module that has these test resources, then unpack where they
need to go.
-Dave
On Fri, Jan 15, 2010 at 3:35 AM, Carlo Camerino <ca...@gmail.com>wrote:
> Hi,
>
> I'm trying to run a test on a project with several submodules in it.
> One of our projects has an xml file which is included in a different
> project
> with the one testing it.
>
> dao
> |
> src/test/resources | --> test-dao.xml
> service
> |
> src/test/resources | --> test-service.xml
>
> When i run tests in the service layer, it can't seem to find the
> test-dao.xml which i have a dependency on. I'm using testng to run this.
> One of the work aroudn would be to include i in src/main/resourcew which i
> don't want to do...
>
> how do i handle this?
>
> thanks
> carlo
>