Bug 414139 - Move JFace unit tests into own plug-in
Summary: Move JFace unit tests into own plug-in
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2013-07-31 10:09 EDT by Lars Vogel CLA
Modified: 2015-01-19 13:19 EST (History)
6 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 2013-07-31 10:09:05 EDT
I think it would be useful if the JFace test would be contained in their own plug-in. Currently they are contained in org.eclipse.ui.tests and it looks to me that the JFace unit test in some cases also test platform code.

I suggest to move the tests to org.eclipse.jface.tests.

Let me know if you think if that is a good idea, if yes, we try to provide a Gerrit review request for it.
Comment 1 Paul Webster CLA 2013-08-01 10:03:40 EDT
I'm not sure why it's this way now, but aside from logically breaking them up I don't see much benefit at this time.  o.e.ui.tests has moved up to java 1.5, so it can handle the new jface.

PW
Comment 2 Lars Vogel CLA 2013-08-01 10:07:38 EDT
If we had tests only for JFace we could include these tests into the maven build of the jface plug-in.
Comment 3 Lars Vogel CLA 2014-03-25 07:19:03 EDT
(In reply to Paul Webster from comment #1)
> I'm not sure why it's this way now, but aside from logically breaking them
> up I don't see much benefit at this time.  o.e.ui.tests has moved up to java
> 1.5, so it can handle the new jface.
> 
> PW

We plan again a GSoC for JFace generics and it would be helpful if the student can work in isolation of the other tests. WE also plan to upgrade the JFace Viewer tests and to move the tests to JUnit 4.
Comment 4 Lars Vogel CLA 2014-03-25 08:11:26 EDT
Jeanderson, can you prepare a Gerrit review?
Comment 5 Jeanderson Candido CLA 2014-03-26 18:34:16 EDT
(In reply to Lars Vogel from comment #4)
> Jeanderson, can you prepare a Gerrit review?

Hi Lars,

To start working on this, could you confirm some information?

Plugin id: org.eclipse.jface.tests
Plugin name: JFace Tests
Target Platform: >= 3.5
Version: 3.9.0.qualifier (keep Version from org.eclipse.ui.tests?)
Execution Environmet: JavaSE-1.6
- No activator. Activate when one of its classes is loaded
- Singleton plug-in
- No contributions to the UI

Because JFace Tests belong to org.eclipse.ui.tests, I assume it has some dependencies. Should we move them to the new plug-in too or are we going to modify the test suite?
Comment 6 Paul Webster CLA 2014-03-27 09:16:31 EDT
This seems like a lot of work for something that is currently working.

You'd have to provide a test.xml for the new plugin, plus make sure our automated tests run them (somewhere in the aggregator).

PW
Comment 7 Jeanderson Candido CLA 2014-03-27 11:01:34 EDT
(In reply to Paul Webster from comment #6)
> This seems like a lot of work for something that is currently working.
> 
> You'd have to provide a test.xml for the new plugin, plus make sure our
> automated tests run them (somewhere in the aggregator).
> 
> PW

Thanks Paul,

I will look for resources about Eclipse tests to have a better understanding.
If you already have something, I appreciate if you could share with me.

Thanks in advance.
Comment 8 Paul Webster CLA 2014-03-27 11:10:02 EDT
Our automated test framework is described in:
https://wiki.eclipse.org/Platform-releng/Automated_Testing
https://wiki.eclipse.org/Platform-releng/Eclipse_Test_Framework

PW
Comment 9 Lars Vogel CLA 2014-03-27 11:14:56 EDT
(In reply to Paul Webster from comment #6)
> This seems like a lot of work for something that is currently working.
> 
> You'd have to provide a test.xml for the new plugin, plus make sure our
> automated tests run them (somewhere in the aggregator).
> 
> PW

I want to understand our test infrastructure. This is a good place to get to know it. Also I want to migrate to use JUnit4 und Mockito at a later stage and splitting parts of the tests out, will help with the change.

I plan that Jeanderson and I do the majority of the work, so you should not be concerned with to much additional work for you. He may only have to ping you for the batch integration.
Comment 10 Jeanderson Candido CLA 2014-03-30 00:11:26 EDT
(In reply to Paul Webster from comment #8)
> Our automated test framework is described in:
> https://wiki.eclipse.org/Platform-releng/Automated_Testing
> https://wiki.eclipse.org/Platform-releng/Eclipse_Test_Framework
> 
> PW

Thanks for the references Paul, they were very helpful to understand how to test things on Eclipse.

By the way, I was running the JFace Test suite on my computer and I got 6 errors and 1 failure from a total of 970 test cases. Failed tests are:

[1 Failure] - testForceModeText
[1 Error]   - testSetTitleImageEarly
[4 Errors]  - org.eclipse.jface.tests.images.ResourceManagerTest
[1 Error]   - testFileImageDescriptorWorkbench

Are they really failing or could it be a problem with my setup?

Windows 8.1 64bits
Version: Luna (4.4)
Build id: I20140306-1200

Do you get the same errors too Lars/Paul? After figuring this issue out I could have more confidence to start migrating JFace tests.

JBC
Comment 11 Paul Webster CLA 2014-03-31 10:25:55 EDT
(In reply to Jeanderson Candido from comment #10)
> Thanks for the references Paul, they were very helpful to understand how to
> test things on Eclipse.
> 
> By the way, I was running the JFace Test suite on my computer and I got 6
> errors and 1 failure from a total of 970 test cases. Failed tests are:
> 
> [1 Failure] - testForceModeText
> [1 Error]   - testSetTitleImageEarly
> [4 Errors]  - org.eclipse.jface.tests.images.ResourceManagerTest
> [1 Error]   - testFileImageDescriptorWorkbench
> 
> Are they really failing or could it be a problem with my setup?

The tests all run clean for me, when run from the JFace launch config.  Or are you trying to run them with the automated test framework?


PW
Comment 12 Jeanderson Candido CLA 2014-04-25 13:44:33 EDT
(In reply to Paul Webster from comment #11)
> (In reply to Jeanderson Candido from comment #10)
> > Thanks for the references Paul, they were very helpful to understand how to
> > test things on Eclipse.
> > 
> > By the way, I was running the JFace Test suite on my computer and I got 6
> > errors and 1 failure from a total of 970 test cases. Failed tests are:
> > 
> > [1 Failure] - testForceModeText
> > [1 Error]   - testSetTitleImageEarly
> > [4 Errors]  - org.eclipse.jface.tests.images.ResourceManagerTest
> > [1 Error]   - testFileImageDescriptorWorkbench
> > 
> > Are they really failing or could it be a problem with my setup?
> 
> The tests all run clean for me, when run from the JFace launch config.  Or
> are you trying to run them with the automated test framework?
> 
> 
> PW

Hi everyone. I was busy an unable to follow up this issue but now I'm working on it again.

Paul, I remember I was running the JFace tests directly from the test suite but running from the launch configuration file works as smoothly as expected.

Now I feel comfortable to start this migration. Any questions and concerns I will post here.

Thanks for the assistance guys.
Comment 13 Dani Megert CLA 2014-04-28 05:58:59 EDT
(In reply to Paul Webster from comment #6)
> This seems like a lot of work for something that is currently working.

+1. And definitely not something we'll touch for Luna (4.4) at this point.
Comment 14 Lars Vogel CLA 2014-04-28 11:12:52 EDT
(In reply to Dani Megert from comment #13)
> (In reply to Paul Webster from comment #6)
> > This seems like a lot of work for something that is currently working.
> 
> +1. And definitely not something we'll touch for Luna (4.4) at this point.

I thought we can still work on components which are not part of the Luna SDK delivery, e.g. demos, snippets unit tests. At least a wanted to update a few demos and snippets to the latest and great Luna API and cleanup some tests.
Comment 15 Dani Megert CLA 2014-04-28 11:16:01 EDT
(In reply to Lars Vogel from comment #14)
> (In reply to Dani Megert from comment #13)
> > (In reply to Paul Webster from comment #6)
> > > This seems like a lot of work for something that is currently working.
> > 
> > +1. And definitely not something we'll touch for Luna (4.4) at this point.
> 
> I thought we can still work on components which are not part of the Luna SDK
> delivery, e.g. demos, snippets unit tests. At least a wanted to update a few
> demos and snippets to the latest and great Luna API and cleanup some tests.

In principle yes. But it should be important / necessary for Luna. Restructuring the tests will for sure cause ripples and/or work for the releng team and that is a no go.
Comment 16 Lars Vogel CLA 2014-04-28 12:04:04 EDT
(In reply to Dani Megert from comment #15)

> In principle yes. But it should be important / necessary for Luna.
> Restructuring the tests will for sure cause ripples and/or work for the
> releng team and that is a no go.

Thanks for the clarification, makes sense.
Comment 17 Lars Vogel CLA 2015-01-19 13:19:41 EST
Marking as wontfix, no plans to work on this in the near future.