[Proposal] Using JUnit5 from now on?

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

[Proposal] Using JUnit5 from now on?

vmassol
Administrator
Hi devs,

I’ve recently worked on converting our JUnit4 @Rule rules into JUnit5 equivalent.

There are now equivalent for:
- MockitoComponentManagerRule,
- ComponentManagerRule
- AllLogRule
- MockitoOldcoreRule

See http://dev.xwiki.org/xwiki/bin/view/Community/Testing#HJavaUnitTesting for examples of how to use them.

Feel free to ask here if you have questions or if you have ideas on how to better integrate with JUnit5 (I’m sure we’ll need to perform some tuning and there are use cases that I have forgotten that we’ll need to support).

I’m thus proposing that from now on, we start writing new tests as JUnit5 tests and that we start converting old JUnit3/4 tests into JUnit5 ones. For example if we need to add a method to a JUnit4 test, we convert it to JUnit5 and then add the new test method. It’s pretty simple to do the conversion.

WDYT?

Thanks
-Vincent


Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Using JUnit5 from now on?

Thomas Mortagne
Administrator
+1, I actually started to write simple tests using Junit 5 since a
little while (except for those that were requiring one of our custom
rules)


On Sun, Apr 29, 2018 at 2:52 PM, Vincent Massol <[hidden email]> wrote:

> Hi devs,
>
> I’ve recently worked on converting our JUnit4 @Rule rules into JUnit5 equivalent.
>
> There are now equivalent for:
> - MockitoComponentManagerRule,
> - ComponentManagerRule
> - AllLogRule
> - MockitoOldcoreRule
>
> See http://dev.xwiki.org/xwiki/bin/view/Community/Testing#HJavaUnitTesting for examples of how to use them.
>
> Feel free to ask here if you have questions or if you have ideas on how to better integrate with JUnit5 (I’m sure we’ll need to perform some tuning and there are use cases that I have forgotten that we’ll need to support).
>
> I’m thus proposing that from now on, we start writing new tests as JUnit5 tests and that we start converting old JUnit3/4 tests into JUnit5 ones. For example if we need to add a method to a JUnit4 test, we convert it to JUnit5 and then add the new test method. It’s pretty simple to do the conversion.
>
> WDYT?
>
> Thanks
> -Vincent
>
>



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

Re: [Proposal] Using JUnit5 from now on?

Alex Cotiugă
+1

Thanks,
Alex

On Mon, Apr 30, 2018 at 11:06 AM, Thomas Mortagne <[hidden email]
> wrote:

> +1, I actually started to write simple tests using Junit 5 since a
> little while (except for those that were requiring one of our custom
> rules)
>
>
> On Sun, Apr 29, 2018 at 2:52 PM, Vincent Massol <[hidden email]>
> wrote:
> > Hi devs,
> >
> > I’ve recently worked on converting our JUnit4 @Rule rules into JUnit5
> equivalent.
> >
> > There are now equivalent for:
> > - MockitoComponentManagerRule,
> > - ComponentManagerRule
> > - AllLogRule
> > - MockitoOldcoreRule
> >
> > See http://dev.xwiki.org/xwiki/bin/view/Community/Testing#
> HJavaUnitTesting for examples of how to use them.
> >
> > Feel free to ask here if you have questions or if you have ideas on how
> to better integrate with JUnit5 (I’m sure we’ll need to perform some tuning
> and there are use cases that I have forgotten that we’ll need to support).
> >
> > I’m thus proposing that from now on, we start writing new tests as
> JUnit5 tests and that we start converting old JUnit3/4 tests into JUnit5
> ones. For example if we need to add a method to a JUnit4 test, we convert
> it to JUnit5 and then add the new test method. It’s pretty simple to do the
> conversion.
> >
> > WDYT?
> >
> > Thanks
> > -Vincent
> >
> >
>
>
>
> --
> Thomas Mortagne
>
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Using JUnit5 from now on?

Marius Dumitru Florea
In reply to this post by vmassol
+1

Thanks,
Marius

On Sun, Apr 29, 2018 at 3:52 PM, Vincent Massol <[hidden email]> wrote:

> Hi devs,
>
> I’ve recently worked on converting our JUnit4 @Rule rules into JUnit5
> equivalent.
>
> There are now equivalent for:
> - MockitoComponentManagerRule,
> - ComponentManagerRule
> - AllLogRule
> - MockitoOldcoreRule
>
> See http://dev.xwiki.org/xwiki/bin/view/Community/Testing#HJavaUnitTesting
> for examples of how to use them.
>
> Feel free to ask here if you have questions or if you have ideas on how to
> better integrate with JUnit5 (I’m sure we’ll need to perform some tuning
> and there are use cases that I have forgotten that we’ll need to support).
>
> I’m thus proposing that from now on, we start writing new tests as JUnit5
> tests and that we start converting old JUnit3/4 tests into JUnit5 ones. For
> example if we need to add a method to a JUnit4 test, we convert it to
> JUnit5 and then add the new test method. It’s pretty simple to do the
> conversion.
>
> WDYT?
>
> Thanks
> -Vincent
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Using JUnit5 from now on?

Ecaterina Moraru (Valica)
+0

Thanks,
Caty

On Wed, May 2, 2018 at 11:18 AM, Marius Dumitru Florea <
[hidden email]> wrote:

> +1
>
> Thanks,
> Marius
>
> On Sun, Apr 29, 2018 at 3:52 PM, Vincent Massol <[hidden email]>
> wrote:
>
> > Hi devs,
> >
> > I’ve recently worked on converting our JUnit4 @Rule rules into JUnit5
> > equivalent.
> >
> > There are now equivalent for:
> > - MockitoComponentManagerRule,
> > - ComponentManagerRule
> > - AllLogRule
> > - MockitoOldcoreRule
> >
> > See http://dev.xwiki.org/xwiki/bin/view/Community/Testing#
> HJavaUnitTesting
> > for examples of how to use them.
> >
> > Feel free to ask here if you have questions or if you have ideas on how
> to
> > better integrate with JUnit5 (I’m sure we’ll need to perform some tuning
> > and there are use cases that I have forgotten that we’ll need to
> support).
> >
> > I’m thus proposing that from now on, we start writing new tests as JUnit5
> > tests and that we start converting old JUnit3/4 tests into JUnit5 ones.
> For
> > example if we need to add a method to a JUnit4 test, we convert it to
> > JUnit5 and then add the new test method. It’s pretty simple to do the
> > conversion.
> >
> > WDYT?
> >
> > Thanks
> > -Vincent
> >
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Using JUnit5 from now on?

Eduard Moraru
+1 (still have to catch up on the changes in JUnit5)

For example if we need to add a method to a JUnit4 test, we convert it to
> JUnit5 and then add the new test method. It’s pretty simple to do the
> conversion.


This, however, is most likely going to be a PITA.

Thanks,
Eduard

On Wed, May 2, 2018 at 3:01 PM, Ecaterina Moraru (Valica) <[hidden email]
> wrote:

> +0
>
> Thanks,
> Caty
>
> On Wed, May 2, 2018 at 11:18 AM, Marius Dumitru Florea <
> [hidden email]> wrote:
>
> > +1
> >
> > Thanks,
> > Marius
> >
> > On Sun, Apr 29, 2018 at 3:52 PM, Vincent Massol <[hidden email]>
> > wrote:
> >
> > > Hi devs,
> > >
> > > I’ve recently worked on converting our JUnit4 @Rule rules into JUnit5
> > > equivalent.
> > >
> > > There are now equivalent for:
> > > - MockitoComponentManagerRule,
> > > - ComponentManagerRule
> > > - AllLogRule
> > > - MockitoOldcoreRule
> > >
> > > See http://dev.xwiki.org/xwiki/bin/view/Community/Testing#
> > HJavaUnitTesting
> > > for examples of how to use them.
> > >
> > > Feel free to ask here if you have questions or if you have ideas on how
> > to
> > > better integrate with JUnit5 (I’m sure we’ll need to perform some
> tuning
> > > and there are use cases that I have forgotten that we’ll need to
> > support).
> > >
> > > I’m thus proposing that from now on, we start writing new tests as
> JUnit5
> > > tests and that we start converting old JUnit3/4 tests into JUnit5 ones.
> > For
> > > example if we need to add a method to a JUnit4 test, we convert it to
> > > JUnit5 and then add the new test method. It’s pretty simple to do the
> > > conversion.
> > >
> > > WDYT?
> > >
> > > Thanks
> > > -Vincent
> > >
> > >
> > >
> >
>