Hi,
i'm completely against merging maven-failsafe-plugin into the life cycle...
Running maven-failsafe-plugin within integration-test phase is one
solution...but sometimes you have other things to do for integration
tests....
In pre-integration-test phase it's often the case to start an
application server / servlet engine or whatever kind of server (for
example using cargo-maven2-plugin) in which the tests will be run during
the integration-test phase and finally stop the server kind software in
post-integration-test...(typical scenarios in web applications for
selenium tests / jwebunit or arquillian tests)...
What about those database tests. The setup you need to do is either
clear the database setup the structure (DDL) and fill in those needed
default data you need to run your tests (prerequisite for your test)
(sql-maven-plugin for example)..So you need at least
pre-integration-test phase...which is not bound to maven-failsafe-plugin...
Furthermore if you think about other possibilies where you might for an
batch application which you can start via exec-maven-plugin....etc. etc.
That's from my point of view the reason not to integrate into the
default life-cycle....because it's not a general practice nor a general
solution....all other bindings are really general solutions which work
for all java projects...
An other point what about the check goal of maven-failsafe-plugin which
is intended to fail the build in case of failed integration tests....but
sometimes you don't like this...
And an other point which comes into my mind. Usually integration tests
are long runners which means if you like to make a release you would
have to run them as well if the integration tests bound to the life
cycle...if you have integration tests which runs hours you don't like to
have them executed every time you would like to make release...
If you wan't to try to prevent DRY the simple solution is to create a
company (project parent) pom which contains such kind of configurations
where you simply can bind maven-failsafe-plugin to the appropriate life
cycle phases.
Why do people stuck with maven-surefire-plugin? Simple answer: They
don't know it.
Often people don't understand that there is a subtle difference between
unit and integration tests...in particular in relationship to the build
you are running which gives you a better control over what exactly is
running...by definition unit tests can be parallelized in contradiction
integration tests can't.
Based on this you see a difference in configuration for
maven-surefire-plugin (multi threading) whereas you need to configure
maven-failsafe-plugin different...
Kind regards
Karl Heinz Marbaise
On 10/28/14 6:06 PM, Jeff Jensen wrote:
Integrating Failsafe in the same way as Surefire would be great for a lot
of people I think.
I agree!
Personally, I wonder why we don't merge them.
I've wondered the same thing... is there a technical reason why it "won't"
or is difficult to make work?
On Tue, Oct 28, 2014 at 11:54 AM, Benson Margulies <[email protected]>
wrote:
Personally, I wonder why we don't merge them.
Failsafe adds some lifestyle phase bindings and then changes some
defaults. Otherwise, it's a giant anti-DRY. Why not expand surefire to
have the extra executions with shifted defaults for things like test
class names?
On Tue, Oct 28, 2014 at 11:50 AM, Oliver B. Fischer
<[email protected]> wrote:
@Paul: Yes I think so or we find a way more convenient in this moment.
@all: I think this shows perfectly why Failsafe should be integrated as
Surefire already is.
Oliver
Am 28.10.14 16:02, schrieb Paul Benedict:
Thanks. Now I know when to use this. For my situation, which is
integration
testing against an existing database, I don't need to setup an
environment;
this explains why I never needed to use the plugin. There are other
cases
the plugin will be valuable, but I wonder if this is why most others
stick
with surefire. I guess programmers don't scratch unless there's an itch.
Cheers,
Paul
On Tue, Oct 28, 2014 at 9:21 AM, Anders Hammar <[email protected]>
wrote:
The answer is on the index page of the failsafe plugin [1].
"If you use the Surefire Plugin for running tests..."
/Anders
[1] http://maven.apache.org/surefire/maven-failsafe-plugin/
On Tue, Oct 28, 2014 at 3:18 PM, Paul Benedict <[email protected]>
wrote:
(to
[email protected]>
https://bitbucket.org/obfischer/bugreport-maven-failsafe.git
lot
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]