shinsato wrote:
Thanks, Ron - Jesse- our integration tests are mostly in separate modules -
though there is some internal pressure to keep the test code closer to the
source code - this is probably a clincher argument to put them in separate
modules. I've tended to have bad experiences running child projects
separately from their place in the reactor - but I can experiment and see
how it goes.
It is a bit hard to know what to suggest with so little insight into the
project.
I can only speak from my own experience where we started with big
projects with many source files in the projects and are now trying to
get them broken down into small projects that produce WAR files using
libraries that are built, and, I hope tested, separately. We are pulling
classes from the big projects into their own smaller projects that just
make jar files for inclusion into the WAR file projects as dependencies.
It is not really refactoring the code, just moving the sources into new
projects, making new POM files and adding dependencies to the old POMS.
Not big programming job, just a bit of thoughtful shuffling
Ron
ronatartifact wrote:
shinsato wrote:
How can you run integration or acceptance tests separately from the
compile
and package lifecycle phases using maven? In other words - given that all
my
artifacts have already been generated and are available in my local maven
cache (from a prior run of mvn install) or in the remote repository after
a
deploy - is it possible to run something like "mvn verify" or even "mvn
failsafe:verify" but WITHOUT running the earlier lifecycle phases again?
We
want to test on other platforms using the prior generated artifacts. It
would be ok to recompile the test classes again, but not the artifact
sources.
There are a few pages up already about how to write integration tests -
and
a few solutions and a few JIRA issues filed, but I've not found anything
that explicitly looks at the desire to avoid doing the compilation and
packaging again - and only to rely on currently installed or deployed
artifacts for testing.
http://jira.codehaus.org/browse/SUREFIRE-142 SUREFIRE-142
http://maven.apache.org/plugins/maven-failsafe-plugin/usage.html
maven-failsafe-plugin
http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing
Maven and Integration Testing
One simple way would be to create a test project (or set of test
projects) that has your libraries as dependencies so that they are
pulled in from your repository as a compiled jar.
You may have a few artifacts that can not be put into dependent
libraries but that should be a small compile step with only a few classes.
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]