Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 448862

Summary: [Tests] Migrate org.eclipse.jface.tests.databinding tests to JUnit 4
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Conrad Groth <info>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: info, Lars.Vogel, nobody, simon.scholz, thibaultleouay
Version: 4.5Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/#/c/81857/
Whiteboard:

Description Lars Vogel CLA 2014-10-25 20:44:12 EDT

    
Comment 1 Lars Vogel CLA 2014-11-06 12:42:55 EST
Is a script changing my bug classification? If yes, can this be stopped? I use the tag [Tests] for bug work, if you want to add other tags, please add it after my tags.
Comment 2 Nobody - feel free to take it CLA 2015-10-28 09:23:34 EDT
Simon I'm grabbing this if you don't mind as I plan to push this migration forward.
Comment 3 Simon Scholz CLA 2015-10-28 09:52:07 EDT
No Problem Sopot. Thank you
Comment 4 Conrad Groth CLA 2016-09-24 16:55:56 EDT
I committed a first-shot, to see how many failures Jenkins produces. I had only one left, I cannot understand.
Comment 5 Conrad Groth CLA 2016-09-24 17:59:49 EDT
Jenkins doesn't have any test failures at all, but unfortunately it doesn't count those tests, I had to start via this workaround:
	@Test
	public void testSuite() throws Exception {
		JUnitCore.runClasses(Suite.class);
	}

	@RunWith(AllTests.class)
	public static class Suite {
		public static junit.framework.Test suite() {
			return ...
		}
	}
Comment 6 Conrad Groth CLA 2016-09-25 06:21:57 EDT
I reworked my patch again, so that all test cases are counted correctly and results are correctly forwarded to the overall build result.

All suite() methods are now wired together by the BindingTestSuite class, which is executed by a JUnit38ClassRunner.´The suite() methods are executing several contract tests, which are placed in the bundle org.eclipse.jface.tests.databinding.conformance. These tests still have JUnit 3 style. Migrating those tests to JUnit 4 needs a refactoring and I didn't want to add more changes to my already huge patch.

I can also work on that, but before I start working on that, the proposed patch has to be reviewed and merged.
Comment 7 Nobody - feel free to take it CLA 2016-09-26 06:35:34 EDT
(In reply to Conrad Groth from comment #6)
> I reworked my patch again, so that all test cases are counted correctly and
> results are correctly forwarded to the overall build result.
> 
> All suite() methods are now wired together by the BindingTestSuite class,
> which is executed by a JUnit38ClassRunner.´The suite() methods are executing
> several contract tests, which are placed in the bundle
> org.eclipse.jface.tests.databinding.conformance. These tests still have
> JUnit 3 style. Migrating those tests to JUnit 4 needs a refactoring and I
> didn't want to add more changes to my already huge patch.
> 
> I can also work on that, but before I start working on that, the proposed
> patch has to be reviewed and merged.

Thanks for the patch. I'll try to review this by end of working day.
Comment 8 Conrad Groth CLA 2016-10-01 10:38:10 EDT
(In reply to Sopot Cela from comment #7)
> (In reply to Conrad Groth from comment #6)
> > I reworked my patch again, so that all test cases are counted correctly and
> > results are correctly forwarded to the overall build result.
> > 
> > All suite() methods are now wired together by the BindingTestSuite class,
> > which is executed by a JUnit38ClassRunner.´The suite() methods are executing
> > several contract tests, which are placed in the bundle
> > org.eclipse.jface.tests.databinding.conformance. These tests still have
> > JUnit 3 style. Migrating those tests to JUnit 4 needs a refactoring and I
> > didn't want to add more changes to my already huge patch.
> > 
> > I can also work on that, but before I start working on that, the proposed
> > patch has to be reviewed and merged.
> 
> Thanks for the patch. I'll try to review this by end of working day.

Hi Sopot, how is the review going? Can I answer any questions?
Comment 9 Lars Vogel CLA 2017-12-18 15:44:11 EST
Thanks, Conrad.
Comment 10 Conrad Groth CLA 2017-12-18 16:15:30 EST
(In reply to Conrad Groth from comment #6)
> ... The suite() methods are executing
> several contract tests, which are placed in the bundle
> org.eclipse.jface.tests.databinding.conformance. These tests still have
> JUnit 3 style. Migrating those tests to JUnit 4 needs a refactoring and I
> didn't want to add more changes to my already huge patch.
> 
> I can also work on that, but before I start working on that, the proposed
> patch has to be reviewed and merged.

The o.e.jface.tests.databinding.conformance bundle needs to be migrated as well. I will work on that soon.
Comment 11 Dani Megert CLA 2018-01-31 08:48:29 EST
Please set a target milestone again when you really plan to work on it.
Comment 12 Lars Vogel CLA 2019-02-15 05:38:43 EST
(In reply to Conrad Groth from comment #10)
> (In reply to Conrad Groth from comment #6)
> > ... The suite() methods are executing
> > several contract tests, which are placed in the bundle
> > org.eclipse.jface.tests.databinding.conformance. These tests still have
> > JUnit 3 style. Migrating those tests to JUnit 4 needs a refactoring and I
> > didn't want to add more changes to my already huge patch.
> > 
> > I can also work on that, but before I start working on that, the proposed
> > patch has to be reviewed and merged.
> 
> The o.e.jface.tests.databinding.conformance bundle needs to be migrated as
> well. I will work on that soon.

org.eclipse.jface.tests.databinding is migrated, please open a new bug for jface.tests.databinding.conformance is you plan to work on it.