Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Ant UI tests to JUnit 4 #753

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

HeikoKlare
Copy link
Contributor

Most tests in org.eclipse.ant.tests.ui are subclasses of AbstractAntUITest, which is still based on JUnit 3 by implementing the TestCase class.

This change does the following:

  • Migrates AbstractAntUITest and subclasses to JUnit 4
  • Introduces TestName rules where necessary
  • Adds the TestAgainExceptionRule, which handles TestAgainExceptions indicating the necessity of test retries
  • Adds the RunInSeparateThreadRule, which runs the actual test code in a non-UI thread

The newly introduced rules replace the overwritten runBare() method of the JUnit 3 tests in a reusable way.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2023

Test Results

     591 files  +57       591 suites  +57   1h 4m 20s ⏱️ + 5m 24s
  3 798 tests +  5    3 793 ✔️ +  5    5 💤 ±0  0 ±0 
12 000 runs  ±  0  11 964 ✔️ ±  0  36 💤 ±0  0 ±0 

Results for commit 8d389ac. ± Comparison against base commit 9802acd.

This pull request removes 209 and adds 214 tests. Note that renamed tests count towards both.
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ test20AntMigration
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ test20ProgramMigration
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ test21AntMigration
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ test21ProgramMigration
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ testAddBuildFilesAction
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ testAdvancedTaskLocation
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ testAntBuildFilesExtensionFilter
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ testAntCallTargetProposals
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ testAntHome
org.eclipse.ant.tests.ui.testplugin.AntUITests ‑ testAntcallTargetProposalImages
…
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetIncludeTargetsComplexHierarchyAlias
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetIncludeTargetsComplexHierarchyMisc
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetIncludeTargetsComplexHierarchyNoAlias
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetIncludeTargetsExternalFiles
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetIncludeTargetsPerformance
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetIncludeTargetsSimpleHierarchyAlias
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetIncludeTargetsSimpleHierarchyNoAliases
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetTargetsLaunchConfiguration
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetTargetsLaunchConfigurationMinusD
AntUITests org.eclipse.ant.tests.ui.AntUtilTests ‑ testGetTargetsLaunchConfigurationMinusDAndProperty
…

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review October 20, 2023 14:27
Copy link
Member

@akurtakov akurtakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the missing license headers before this can be approved.

Most tests in org.eclipse.ant.tests.ui are subclasses of
AbstractAntUITest, which is still based on JUnit 3 by implementing the
TestCase class.

This change does the following:
* Migrates AbstractAntUITest and subclasses to JUnit 4
* Introduces TestName rules where necessary
* Adds the TestAgainExceptionRule, which handles TestAgainExceptions
indicating the necessity of test retries
* Adds the RunInSeparateThreadRule, which runs the actual test code in a
non-UI thread

The newly introduced rules replace the overwritten runBare() method of
the JUnit 3 tests in a reusable way.
@HeikoKlare
Copy link
Contributor Author

@akurtakov I have added the missing license headers. Can this one be merged?

@akurtakov akurtakov merged commit 9e806a9 into eclipse-platform:master Nov 2, 2023
16 checks passed
@HeikoKlare HeikoKlare deleted the ant-ui-tests-junit4 branch November 3, 2023 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants