Skip to content

Use TestExecutionListener to log test start and end in org.eclipse.ui.tests#4034

Open
trancexpress wants to merge 1 commit into
eclipse-platform:masterfrom
trancexpress:gh4032
Open

Use TestExecutionListener to log test start and end in org.eclipse.ui.tests#4034
trancexpress wants to merge 1 commit into
eclipse-platform:masterfrom
trancexpress:gh4032

Conversation

@trancexpress
Copy link
Copy Markdown
Contributor

@trancexpress trancexpress commented May 29, 2026

Add a JUnit Jupiter TestExecutionListener to org.eclipse.ui.tests, which logs test start and end events via UIPlugin.
The listener is defined in org.eclipse.ui.tests.harness, so that it can be reused by other test bundles.

Fixes: #4032

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

Test Results

   864 files  ±0     864 suites  ±0   55m 31s ⏱️ + 3m 49s
 7 988 tests ±0   7 745 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 418 runs  ±0  19 763 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit 32c7d9a. ± Comparison against base commit 956129f.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

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

The change looks good to get the logging of execution orders for JUnit 5 UI tests again. I just don't think we should move the JUnit 4 rules until those tests have been migrated to JUnit 5.

Comment on lines -34 to -35
@Rule
public TestWatcher LOG_TESTRUN = TestRunLogUtil.LOG_TESTRUN;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These rules should not be removed before the test class has been migrated to JUnit 5. Otherwise the log output is lost until the migration is done. You can, e.g., see that the logs for this PR do not contain logging for the testIndependentWorkingSets of this class anymore whereas previous builds contain it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Where can I see the logs actually? I checked the build job link but nothing was immediately obvious.

I thought JUnit 4 tests would be run with the vintage engine, but the listener would still be notified, resulting in double logging. If that is not the case, no issue to keep the rule.

….tests

Add a JUnit Jupiter TestExecutionListener to org.eclipse.ui.tests,
which logs test start and end events via UIPlugin.
The listener is defined in org.eclipse.ui.tests.harness,
so that it can be reused by other test bundles.

Fixes: eclipse-platform#4032
@trancexpress
Copy link
Copy Markdown
Contributor Author

The change looks good to get the logging of execution orders for JUnit 5 UI tests again. I just don't think we should move the JUnit 4 rules until those tests have been migrated to JUnit 5.

Sure, that makes things even more simple.

If we do see duplicated logged starts/ends in the first I-build with the changes, we can check where and why.

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.

Use TestExecutionListener to log test start and end in org.eclipse.ui.tests

2 participants