Test Inheritance: To have tests from one module used/inherited in
another project, you need to generate a test jar and include a
dependency on the test jar in the project using the tests. See the maven
mini guide
(http://maven.apache.org/guides/mini/guide-attached-tests.html) on
attaching tests for more info.

Problems/Workaround: Test dependencies are not dealt with transitively.
Apparently there are issues when doing a Maven release with it not
finding the dependent jar, so test inheritance is likely not widely used
or tested.  Although, I didn't do the release, so that issue should be
verified. 

Instead of trying test inheritance, just move test base classes into a
regular module, whether with other source, or by itself.  This assumes
you aren't actually running the test base classes as tests...

Paul Sundling 


-----Original Message-----
From: Putrycz, Erik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 25, 2007 9:33 AM
To: [email protected]
Subject: share test files between modules


Hi all,

 

I have a maven project with a master pom file and 3 modules. I'm
currently searching for a good way to share files between my tests
modules:

- module A test suite generates file F1

- module B and C test suites uses file F1

 

I have not found any way to define paths or other environment properties
across modules.

 

Any suggestions?

 

Thanks,

 

Erik Putrycz, Ph.D - Research Associate

Institute for Information Technology - Software Engineering Group

National Research Council, Canada - Building M-50, 1200 Montreal Road

Ottawa, Ontario, CANADA K1A 0R6

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to