[xwiki-devs] [Proposal] Using JUnit5 from now on?
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
+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 <[email protected]> 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
+1 Thanks, Alex On Mon, Apr 30, 2018 at 11:06 AM, Thomas Mortagne <[email protected]
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 <[email protected]> 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
+1 Thanks, Marius On Sun, Apr 29, 2018 at 3:52 PM, Vincent Massol <[email protected]> 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
+0 Thanks, Caty On Wed, May 2, 2018 at 11:18 AM, Marius Dumitru Florea < [email protected]> wrote:
+1
Thanks, Marius
On Sun, Apr 29, 2018 at 3:52 PM, Vincent Massol <[email protected]> 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
+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) <[email protected]
wrote:
+0
Thanks, Caty
On Wed, May 2, 2018 at 11:18 AM, Marius Dumitru Florea < [email protected]> wrote:
+1
Thanks, Marius
On Sun, Apr 29, 2018 at 3:52 PM, Vincent Massol <[email protected]> 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
participants (6)
-
Alex Cotiugă -
Ecaterina Moraru (Valica) -
Eduard Moraru -
Marius Dumitru Florea -
Thomas Mortagne -
Vincent Massol