[Proposal] Replace surefire plugin by failsafe plugin for functional tests

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Proposal] Replace surefire plugin by failsafe plugin for functional tests

vmassol
Administrator
Hi devs,

We’ve been using the surefire plugin from the beginning even for functional tests.

However it would be more correct to use the failsafe plugin for functional tests since this allows to perform some actions if a test fails (like stopping XWiki - Note that right now this is not affecting us since we start/stop XWiki from Java so we’ve implemented this behavior ourselves).

I need this for using the fabric8 docker plugin for ex so that if some functional test fails the docker containers will be stopped.

Ok with everyone?

For reference: http://maven.apache.org/surefire/maven-failsafe-plugin/

Thanks
-Vincent

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Replace surefire plugin by failsafe plugin for functional tests

Thomas Mortagne
Administrator
This plugin is part of Maven project itself and state that "The
Failsafe Plugin is designed to run integration tests while the
Surefire Plugin is designed to run unit tests" so indeed it looks like
the right move :)

+1

On Mon, Jan 15, 2018 at 1:36 PM, Vincent Massol <[hidden email]> wrote:

> Hi devs,
>
> We’ve been using the surefire plugin from the beginning even for functional tests.
>
> However it would be more correct to use the failsafe plugin for functional tests since this allows to perform some actions if a test fails (like stopping XWiki - Note that right now this is not affecting us since we start/stop XWiki from Java so we’ve implemented this behavior ourselves).
>
> I need this for using the fabric8 docker plugin for ex so that if some functional test fails the docker containers will be stopped.
>
> Ok with everyone?
>
> For reference: http://maven.apache.org/surefire/maven-failsafe-plugin/
>
> Thanks
> -Vincent
>



--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Replace surefire plugin by failsafe plugin for functional tests

Marius Dumitru Florea
+1

Thanks,
Marius

On Mon, Jan 15, 2018 at 2:55 PM, Thomas Mortagne <[hidden email]>
wrote:

> This plugin is part of Maven project itself and state that "The
> Failsafe Plugin is designed to run integration tests while the
> Surefire Plugin is designed to run unit tests" so indeed it looks like
> the right move :)
>
> +1
>
> On Mon, Jan 15, 2018 at 1:36 PM, Vincent Massol <[hidden email]>
> wrote:
> > Hi devs,
> >
> > We’ve been using the surefire plugin from the beginning even for
> functional tests.
> >
> > However it would be more correct to use the failsafe plugin for
> functional tests since this allows to perform some actions if a test fails
> (like stopping XWiki - Note that right now this is not affecting us since
> we start/stop XWiki from Java so we’ve implemented this behavior ourselves).
> >
> > I need this for using the fabric8 docker plugin for ex so that if some
> functional test fails the docker containers will be stopped.
> >
> > Ok with everyone?
> >
> > For reference: http://maven.apache.org/surefire/maven-failsafe-plugin/
> >
> > Thanks
> > -Vincent
> >
>
>
>
> --
> Thomas Mortagne
>
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Replace surefire plugin by failsafe plugin for functional tests

Guillaume Delhumeau
+1

Guillaume

2018-01-15 13:57 GMT+01:00 Marius Dumitru Florea <
[hidden email]>:

> +1
>
> Thanks,
> Marius
>
> On Mon, Jan 15, 2018 at 2:55 PM, Thomas Mortagne <
> [hidden email]>
> wrote:
>
> > This plugin is part of Maven project itself and state that "The
> > Failsafe Plugin is designed to run integration tests while the
> > Surefire Plugin is designed to run unit tests" so indeed it looks like
> > the right move :)
> >
> > +1
> >
> > On Mon, Jan 15, 2018 at 1:36 PM, Vincent Massol <[hidden email]>
> > wrote:
> > > Hi devs,
> > >
> > > We’ve been using the surefire plugin from the beginning even for
> > functional tests.
> > >
> > > However it would be more correct to use the failsafe plugin for
> > functional tests since this allows to perform some actions if a test
> fails
> > (like stopping XWiki - Note that right now this is not affecting us since
> > we start/stop XWiki from Java so we’ve implemented this behavior
> ourselves).
> > >
> > > I need this for using the fabric8 docker plugin for ex so that if some
> > functional test fails the docker containers will be stopped.
> > >
> > > Ok with everyone?
> > >
> > > For reference: http://maven.apache.org/surefire/maven-failsafe-plugin/
> > >
> > > Thanks
> > > -Vincent
> > >
> >
> >
> >
> > --
> > Thomas Mortagne
> >
>



--
Guillaume Delhumeau ([hidden email])
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Replace surefire plugin by failsafe plugin for functional tests

caubin
Hi,

+1

Thanks,
Clément

On 01/15/2018 02:23 PM, Guillaume Delhumeau wrote:

> +1
>
> Guillaume
>
> 2018-01-15 13:57 GMT+01:00 Marius Dumitru Florea <
> [hidden email]>:
>
>> +1
>>
>> Thanks,
>> Marius
>>
>> On Mon, Jan 15, 2018 at 2:55 PM, Thomas Mortagne <
>> [hidden email]>
>> wrote:
>>
>>> This plugin is part of Maven project itself and state that "The
>>> Failsafe Plugin is designed to run integration tests while the
>>> Surefire Plugin is designed to run unit tests" so indeed it looks like
>>> the right move :)
>>>
>>> +1
>>>
>>> On Mon, Jan 15, 2018 at 1:36 PM, Vincent Massol <[hidden email]>
>>> wrote:
>>>> Hi devs,
>>>>
>>>> We’ve been using the surefire plugin from the beginning even for
>>> functional tests.
>>>>
>>>> However it would be more correct to use the failsafe plugin for
>>> functional tests since this allows to perform some actions if a test
>> fails
>>> (like stopping XWiki - Note that right now this is not affecting us since
>>> we start/stop XWiki from Java so we’ve implemented this behavior
>> ourselves).
>>>>
>>>> I need this for using the fabric8 docker plugin for ex so that if some
>>> functional test fails the docker containers will be stopped.
>>>>
>>>> Ok with everyone?
>>>>
>>>> For reference: http://maven.apache.org/surefire/maven-failsafe-plugin/
>>>>
>>>> Thanks
>>>> -Vincent
>>>>
>>>
>>>
>>>
>>> --
>>> Thomas Mortagne
>>>
>>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Replace surefire plugin by failsafe plugin for functional tests

Ecaterina Moraru (Valica)
+ 0

Thanks,
Caty

On Mon, Jan 15, 2018 at 3:33 PM, Clément Aubin <[hidden email]> wrote:

> Hi,
>
> +1
>
> Thanks,
> Clément
>
> On 01/15/2018 02:23 PM, Guillaume Delhumeau wrote:
> > +1
> >
> > Guillaume
> >
> > 2018-01-15 13:57 GMT+01:00 Marius Dumitru Florea <
> > [hidden email]>:
> >
> >> +1
> >>
> >> Thanks,
> >> Marius
> >>
> >> On Mon, Jan 15, 2018 at 2:55 PM, Thomas Mortagne <
> >> [hidden email]>
> >> wrote:
> >>
> >>> This plugin is part of Maven project itself and state that "The
> >>> Failsafe Plugin is designed to run integration tests while the
> >>> Surefire Plugin is designed to run unit tests" so indeed it looks like
> >>> the right move :)
> >>>
> >>> +1
> >>>
> >>> On Mon, Jan 15, 2018 at 1:36 PM, Vincent Massol <[hidden email]>
> >>> wrote:
> >>>> Hi devs,
> >>>>
> >>>> We’ve been using the surefire plugin from the beginning even for
> >>> functional tests.
> >>>>
> >>>> However it would be more correct to use the failsafe plugin for
> >>> functional tests since this allows to perform some actions if a test
> >> fails
> >>> (like stopping XWiki - Note that right now this is not affecting us
> since
> >>> we start/stop XWiki from Java so we’ve implemented this behavior
> >> ourselves).
> >>>>
> >>>> I need this for using the fabric8 docker plugin for ex so that if some
> >>> functional test fails the docker containers will be stopped.
> >>>>
> >>>> Ok with everyone?
> >>>>
> >>>> For reference: http://maven.apache.org/surefire/maven-failsafe-
> plugin/
> >>>>
> >>>> Thanks
> >>>> -Vincent
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Thomas Mortagne
> >>>
> >>
> >
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Replace surefire plugin by failsafe plugin for functional tests

vmassol
Administrator
In reply to this post by vmassol
FYI I’m doing the following changes in order to be closer to the default configuration values and spirit of Maven:

* Moving functional tests in src/test/java (the default, one less line in the poms)
* Differentiating the surefire tests from the failsafe tests by using test naming conventions (again that’s the default)
* Following default test naming conventions of the failsafe plugin, i.e.
** Tests should be of the form **/*IT.java
** When we want to execute only a test suite, name it AllTestsIT.java (similar to surefire test suites that we’re naming AllTests.java)

Let me know quickly if you see a problem with that since I’ve already started the move ;)

Thanks
-Vincent

> On 15 Jan 2018, at 13:36, Vincent Massol <[hidden email]> wrote:
>
> Hi devs,
>
> We’ve been using the surefire plugin from the beginning even for functional tests.
>
> However it would be more correct to use the failsafe plugin for functional tests since this allows to perform some actions if a test fails (like stopping XWiki - Note that right now this is not affecting us since we start/stop XWiki from Java so we’ve implemented this behavior ourselves).
>
> I need this for using the fabric8 docker plugin for ex so that if some functional test fails the docker containers will be stopped.
>
> Ok with everyone?
>
> For reference: http://maven.apache.org/surefire/maven-failsafe-plugin/
>
> Thanks
> -Vincent
>

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Replace surefire plugin by failsafe plugin for functional tests

vmassol
Administrator


> On 18 Jan 2018, at 10:58, Vincent Massol <[hidden email]> wrote:
>
> FYI I’m doing the following changes in order to be closer to the default configuration values and spirit of Maven:
>
> * Moving functional tests in src/test/java (the default, one less line in the poms)
> * Differentiating the surefire tests from the failsafe tests by using test naming conventions (again that’s the default)
> * Following default test naming conventions of the failsafe plugin, i.e.
> ** Tests should be of the form **/*IT.java
> ** When we want to execute only a test suite, name it AllTestsIT.java (similar to surefire test suites that we’re naming AllTests.java)

Correction:

* It’s **/*IT.java without the “Test” part. For example: ExtensionIT.java for failsafe tests and ExtensionTest.java for surefire tests.
* And AllITs.java for failsafe suites vs AllTests.java for surefire suites.

Thanks
-Vincent

>
> Let me know quickly if you see a problem with that since I’ve already started the move ;)
>
> Thanks
> -Vincent
>
>> On 15 Jan 2018, at 13:36, Vincent Massol <[hidden email]> wrote:
>>
>> Hi devs,
>>
>> We’ve been using the surefire plugin from the beginning even for functional tests.
>>
>> However it would be more correct to use the failsafe plugin for functional tests since this allows to perform some actions if a test fails (like stopping XWiki - Note that right now this is not affecting us since we start/stop XWiki from Java so we’ve implemented this behavior ourselves).
>>
>> I need this for using the fabric8 docker plugin for ex so that if some functional test fails the docker containers will be stopped.
>>
>> Ok with everyone?
>>
>> For reference: http://maven.apache.org/surefire/maven-failsafe-plugin/
>>
>> Thanks
>> -Vincent
>>
>