Bug 474832 - [Tests] Move o.e.ui.tests to JUnit 4
Summary: [Tests] Move o.e.ui.tests to JUnit 4
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.15 M1   Edit
Assignee: Rolf Theunissen CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on: 474132
Blocks:
  Show dependency tree
 
Reported: 2015-08-12 12:35 EDT by Lars Vogel CLA
Modified: 2019-12-10 14:40 EST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2015-08-12 12:35:00 EDT
+++ This bug was initially created as a clone of Bug #474132 +++
Comment 1 Lars Vogel CLA 2019-04-25 08:28:39 EDT
Not sure if that work is still open nor not. From a quick look the plug-in has been updated.

Adding Paul and Rolf, which looked at some of the tests recently.
Comment 2 Paul Pazderski CLA 2019-04-25 11:23:40 EDT
There is still plenty of work to do. The UI-Session Tests.launch is configured to run with JUnit 3. The other launches use JUnit 4.

Apart from that there are still some JUnit 3 suites (extends TestSuite) and any test which extends UITestCase and is not annotated with 
@RunWith(BlockJUnit4ClassRunner.class) is run as JUnit 3 test.

Btw: I would suggest to inherit every test class from UITestCase to archive a consistent logging.
Comment 3 Lars Vogel CLA 2019-04-25 11:47:45 EDT
Instead of inheritance I would prefer a utility class with a log method.
Comment 4 Paul Pazderski CLA 2019-04-25 12:17:51 EDT
Which must explicit called in every test class therefor all need an own setup and teardown method. Have not checked it but I'm quite sure the vast majority of tests is already a child of UITestCase.
Comment 5 Lars Vogel CLA 2019-04-25 12:24:43 EDT
A custom Junit rule should do the trick.
Comment 6 Andrey Loskutov CLA 2019-04-25 15:51:20 EDT
(In reply to Lars Vogel from comment #5)
> A custom Junit rule should do the trick.

Why tricks, if extending a base class is most natural way to inherit common behavior?
Comment 7 Paul Pazderski CLA 2019-04-25 16:38:51 EDT
Thanks to the JUnit4 way of life a Rule is necessary anyway so the different between inheritance and Rule per class is rather small.

I created a separate bug 546756 since the logging stuff refers mostly (or only) to JUnit4 tests.
Comment 8 Eclipse Genie CLA 2019-10-21 05:36:55 EDT
New Gerrit change created: https://git.eclipse.org/r/151367
Comment 9 Eclipse Genie CLA 2019-10-21 11:51:36 EDT
New Gerrit change created: https://git.eclipse.org/r/151401
Comment 12 Lars Vogel CLA 2019-11-04 09:08:01 EST
I think this is done. Thanks, Rolf.
Comment 13 Rolf Theunissen CLA 2019-11-04 11:28:47 EST
This is not even close to being fixed, almost all of the test cases still run with the JUnit3 runner.
Comment 14 Eclipse Genie CLA 2019-11-21 10:17:40 EST
New Gerrit change created: https://git.eclipse.org/r/153133
Comment 15 Eclipse Genie CLA 2019-11-21 10:23:08 EST
New Gerrit change created: https://git.eclipse.org/r/153134
Comment 16 Eclipse Genie CLA 2019-11-21 12:06:33 EST
New Gerrit change created: https://git.eclipse.org/r/153138
Comment 19 Eclipse Genie CLA 2019-11-22 10:46:33 EST
New Gerrit change created: https://git.eclipse.org/r/153197
Comment 20 Eclipse Genie CLA 2019-12-01 07:51:31 EST
New Gerrit change created: https://git.eclipse.org/r/153610
Comment 21 Eclipse Genie CLA 2019-12-01 09:17:17 EST
New Gerrit change created: https://git.eclipse.org/r/153611
Comment 22 Eclipse Genie CLA 2019-12-01 09:21:30 EST
New Gerrit change created: https://git.eclipse.org/r/153612
Comment 23 Eclipse Genie CLA 2019-12-01 09:31:43 EST
New Gerrit change created: https://git.eclipse.org/r/153613
Comment 24 Eclipse Genie CLA 2019-12-01 09:44:57 EST
New Gerrit change created: https://git.eclipse.org/r/153614
Comment 25 Eclipse Genie CLA 2019-12-01 10:14:12 EST
New Gerrit change created: https://git.eclipse.org/r/153615
Comment 26 Eclipse Genie CLA 2019-12-01 10:45:51 EST
New Gerrit change created: https://git.eclipse.org/r/153617
Comment 27 Eclipse Genie CLA 2019-12-01 11:49:44 EST
New Gerrit change created: https://git.eclipse.org/r/153619
Comment 30 Rolf Theunissen CLA 2019-12-01 12:05:38 EST
About another 20 test-suites need to be migrated, I don't think this will be finished for 4.14. If anyone has some time left, feel free to help.
Comment 31 Eclipse Genie CLA 2019-12-01 12:35:27 EST
New Gerrit change created: https://git.eclipse.org/r/153621
Comment 32 Eclipse Genie CLA 2019-12-01 15:06:32 EST
New Gerrit change created: https://git.eclipse.org/r/153622
Comment 33 Eclipse Genie CLA 2019-12-01 15:18:06 EST
New Gerrit change created: https://git.eclipse.org/r/153623
Comment 34 Rolf Theunissen CLA 2019-12-01 15:53:02 EST
This migration cannot be finished completely for 4.14. 
The org.eclipse.ui.tests.session.SessionTests depend on support from SessionTestSuite, which do not provide a JUnit4 counterpart yet. See Bug 553648.
Comment 35 Eclipse Genie CLA 2019-12-05 14:18:01 EST
New Gerrit change created: https://git.eclipse.org/r/153932
Comment 36 Eclipse Genie CLA 2019-12-05 14:18:06 EST
New Gerrit change created: https://git.eclipse.org/r/153931
Comment 37 Eclipse Genie CLA 2019-12-05 14:18:12 EST
New Gerrit change created: https://git.eclipse.org/r/153935
Comment 38 Eclipse Genie CLA 2019-12-05 14:18:17 EST
New Gerrit change created: https://git.eclipse.org/r/153934
Comment 39 Eclipse Genie CLA 2019-12-05 14:18:22 EST
New Gerrit change created: https://git.eclipse.org/r/153933
Comment 40 Rolf Theunissen CLA 2019-12-05 14:59:09 EST
(In reply to Rolf Theunissen from comment #34)
> This migration cannot be finished completely for 4.14. 
> The org.eclipse.ui.tests.session.SessionTests depend on support from
> SessionTestSuite, which do not provide a JUnit4 counterpart yet. See Bug
> 553648.

The SessionTests are not part of the main UiTestSuite, therefore moving that migration to a separate bug, Bug 553838.
Comment 54 Andrey Loskutov CLA 2019-12-06 06:14:01 EST
Rolf, die you received mail from Sarika about closed master branch?
Comment 57 Rolf Theunissen CLA 2019-12-06 06:25:46 EST
(In reply to Andrey Loskutov from comment #54)
> Rolf, die you received mail from Sarika about closed master branch?

Last mail I got from Sarika related to development is from December 1st, stating:
'Ongoing changes to documentation, tests or examples do not require approval.'

Noting about a closed master branch
Comment 58 Andrey Loskutov CLA 2019-12-06 06:41:44 EST
(In reply to Rolf Theunissen from comment #57)
> (In reply to Andrey Loskutov from comment #54)
> > Rolf, die you received mail from Sarika about closed master branch?
> 
> Last mail I got from Sarika related to development is from December 1st,
> stating:
> 'Ongoing changes to documentation, tests or examples do not require
> approval.'
> 
> Noting about a closed master branch

Correction, mail from Noopur today.
You should really subscribe to platform-releng-dev@eclipse.org, see https://www.eclipse.org/lists/platform-releng-dev/msg35314.html.
Comment 59 Rolf Theunissen CLA 2019-12-06 06:50:58 EST
(In reply to Andrey Loskutov from comment #58)
> (In reply to Rolf Theunissen from comment #57)
> > (In reply to Andrey Loskutov from comment #54)
> > > Rolf, die you received mail from Sarika about closed master branch?
> > 
> > Last mail I got from Sarika related to development is from December 1st,
> > stating:
> > 'Ongoing changes to documentation, tests or examples do not require
> > approval.'
> > 
> > Noting about a closed master branch
> 
> Correction, mail from Noopur today.
> You should really subscribe to platform-releng-dev@eclipse.org, see
> https://www.eclipse.org/lists/platform-releng-dev/msg35314.html.

These kind of announcements should not (only) go to platform-releng-dev they should go to platform-dev and/or eclipse-dev (with I do have a subscription on)
Comment 60 Lars Vogel CLA 2019-12-06 07:19:53 EST
(In reply to Rolf Theunissen from comment #59)
> These kind of announcements should not (only) go to platform-releng-dev they
> should go to platform-dev and/or eclipse-dev (with I do have a subscription
> on)

+1, such emails should be send to all relevent email lists, similar to our milestone emails.
Comment 61 Dani Megert CLA 2019-12-06 09:15:56 EST
(In reply to Rolf Theunissen from comment #57)
> Noting about a closed master branch
(In reply to Lars Vogel from comment #60)
> (In reply to Rolf Theunissen from comment #59)
> > These kind of announcements should not (only) go to platform-releng-dev they
> > should go to platform-dev and/or eclipse-dev (with I do have a subscription
> > on)
> 
> +1, such emails should be send to all relevent email lists, similar to our
> milestone emails.
Yes, that got lost in the RC2 reminder, BUT, master is/was ALWAYS closed after Wednesday in the milestone/RC week. So, everyone, please try to remember this, even if Releng forgets to mention it in the reminder that's sent out to all the mentioned lists.
Comment 62 Rolf Theunissen CLA 2019-12-06 09:56:55 EST
(In reply to Dani Megert from comment #61)
> (In reply to Rolf Theunissen from comment #57)
> > Noting about a closed master branch
> (In reply to Lars Vogel from comment #60)
> > (In reply to Rolf Theunissen from comment #59)
> > > These kind of announcements should not (only) go to platform-releng-dev they
> > > should go to platform-dev and/or eclipse-dev (with I do have a subscription
> > > on)
> > 
> > +1, such emails should be send to all relevent email lists, similar to our
> > milestone emails.
> Yes, that got lost in the RC2 reminder, BUT, master is/was ALWAYS closed
> after Wednesday in the milestone/RC week. So, everyone, please try to
> remember this, even if Releng forgets to mention it in the reminder that's
> sent out to all the mentioned lists.

These kind of things are very hard to remember, especially when you don't deal with them every day. Even old timers like Lars (sorry to mention you) struggle with this, as can be seen in one of the Gerrit review messages.
If possible, it would be really nice if these kind of rules are enforced by the tools. Git has hooks that could prevent any commit from going in.
Comment 63 Lars Vogel CLA 2019-12-06 10:10:55 EST
(In reply to Rolf Theunissen from comment #62)
> (In reply to Dani Megert from comment #61)
> > (In reply to Rolf Theunissen from comment #57)
> > > Noting about a closed master branch
> > (In reply to Lars Vogel from comment #60)
> > > (In reply to Rolf Theunissen from comment #59)
> > > > These kind of announcements should not (only) go to platform-releng-dev they
> > > > should go to platform-dev and/or eclipse-dev (with I do have a subscription
> > > > on)
> > > 
> > > +1, such emails should be send to all relevent email lists, similar to our
> > > milestone emails.
> > Yes, that got lost in the RC2 reminder, BUT, master is/was ALWAYS closed
> > after Wednesday in the milestone/RC week. So, everyone, please try to
> > remember this, even if Releng forgets to mention it in the reminder that's
> > sent out to all the mentioned lists.
> 
> These kind of things are very hard to remember, especially when you don't
> deal with them every day. Even old timers like Lars (sorry to mention you)
> struggle with this, as can be seen in one of the Gerrit review messages.
> If possible, it would be really nice if these kind of rules are enforced by
> the tools. Git has hooks that could prevent any commit from going in.

If the emails don't say it's closed, it is not closed. As rules are constantly changing there is nothing to remember. And we always had such emails, that I remembered. :-) Thanks Rolf for considering me as an old-timer, I still think if myself as a newcomer, still in rebellion against certain established practices. ,;-(
Comment 64 Lars Vogel CLA 2019-12-06 10:13:15 EST
More serious we can not expect that people contributing in their free time like Rolf and me remember all rulers, so the email should be clear.
Comment 65 Dani Megert CLA 2019-12-06 11:07:33 EST
(In reply to Lars Vogel from comment #64)
> More serious we can not expect that people contributing in their free time
> like Rolf and me remember all rulers, so the email should be clear.
Sure, this was just an omission by the Releng person and that can happen. Also, anyone did not point to anyone or asked to revert the unexpected changes.
Comment 67 Rolf Theunissen CLA 2019-12-10 14:35:18 EST
All remaining migrations are tracked in other bugs.
Comment 68 Lars Vogel CLA 2019-12-10 14:40:01 EST
Thanks Rolf