| Summary: | [Tests] Move test suite of o.e.ui.tests and migrate progress jobs to JUnit 4 | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Alexander Kurtakov <akurtakov> |
| Component: | UI | Assignee: | Alexander Kurtakov <akurtako> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, Lars.Vogel, nobody, psuzzi |
| Version: | 4.5 | ||
| Target Milestone: | 4.6 M2 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/53050 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4100c90a8b9e169fbda136878f33cefbbc3a98b4 https://git.eclipse.org/r/53755 https://git.eclipse.org/r/53758 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=9650a451af8866afab65d01a119398e3b253dc70 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8f5fb7ab69b1d58548433700030f850e26f91e0b |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 436344, 474832 | ||
|
Description
Alexander Kurtakov
We have automatic conversion tools available for simple cases. See http://codemodify.vogella.com/ New Gerrit change created: https://git.eclipse.org/r/53050 (In reply to Eclipse Genie from comment #2) > New Gerrit change created: https://git.eclipse.org/r/53050 Thanks Alexander. Please give our vogella test migration tool a try, it should be as simple as "Convert to JUnit 4" from the context menu to do this work. (In reply to Lars Vogel from comment #3) > (In reply to Eclipse Genie from comment #2) > > New Gerrit change created: https://git.eclipse.org/r/53050 > > Thanks Alexander. Please give our vogella test migration tool a try, it > should be as simple as "Convert to JUnit 4" from the context menu to do this > work. Will do, next time I have to convert some tests. Wouldn't it make it easier to find if available in JDT directly. (In reply to Alexander Kurtakov from comment #4) > Will do, next time I have to convert some tests. Wouldn't it make it easier > to find if available in JDT directly. Not sure that that conversion is something JDT wants or should have. It is a one-time thing IMHO. I relabeled the bug report, as Alexander only migrated a few tests. Gerrit change https://git.eclipse.org/r/53050 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4100c90a8b9e169fbda136878f33cefbbc3a98b4 Thanks Alexander This causes a mix of JUnit 3 and JUnit 4 which surfaces a bug in JUnit and hence results in test failures in our official build: http://download.eclipse.org/eclipse/downloads/drops4/N20150812-2000/testresults/html/org.eclipse.e4.core.tests_linux.gtk.x86_64_8.0.html See https://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes#JUnit-4-style_test_suites on how to workaround this. Please either fix this or revert the change for the next build. (In reply to Dani Megert from comment #10) > Please either fix this or revert the change for the next build. Do we have a bug report for the failing tests only showing as "Initialization error" instead of the test name? (In reply to Lars Vogel from comment #11) > (In reply to Dani Megert from comment #10) > > Please either fix this or revert the change for the next build. > > Do we have a bug report for the failing tests only showing as > "Initialization error" instead of the test name? We can use this bug report since the change is responsible for the problem. To reproduce locally add the JUnit4TestAdapter to the suite, e.g. public class XYZTestSuite { public static Test suite() { return new JUnit4TestAdapter(XYZTestSuite.class); } } and run it with the JUnit 3 runner. New Gerrit change created: https://git.eclipse.org/r/53755 (In reply to Eclipse Genie from comment #13) > New Gerrit change created: https://git.eclipse.org/r/53755 This one converts as many test suites to JUnit 4. New Gerrit change created: https://git.eclipse.org/r/53758 (In reply to Eclipse Genie from comment #15) > New Gerrit change created: https://git.eclipse.org/r/53758 This one adds the @RunWith annotation to the remaining JUnit3 test suites. Adding the following to UiTestSuite and running it via a JUnit3 runner as suggested by Dani, was successful.
public static Test suite() {
return new JUnit4TestAdapter(UiTestSuite.class);
}
Gerrit change https://git.eclipse.org/r/53755 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=9650a451af8866afab65d01a119398e3b253dc70 Gerrit change https://git.eclipse.org/r/53758 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8f5fb7ab69b1d58548433700030f850e26f91e0b Next batch test run will show if all errors are fixed, locally everything worked (In reply to Lars Vogel from comment #20) > Next batch test run will show if all errors are fixed, locally everything > worked Thanks Lars! |