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   51m 16s ⏱️ - 1m 25s
 7 990 tests ±0   7 747 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 424 runs  ±0  19 769 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit 19731be. ± Comparison against base commit ff1f1b7.

♻️ 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.

@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.

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.

I just noted that the log outputs for the JUnit 4 tests are not missing anymore, but the outputs for the JUnit 5 tests are not present either. This seems to be caused by the org.junit.platform.launcher import being required by the actual test bundle ( org.eclipse.tests.ui) as well. Adding that package import to the test bundle leads to proper log output.
And then actually logging is also done for the JUnit 4 tests executed by the vintage engine, so your initial changes to remove the rules for those test swere actually correct. The issue was just that no logging by the TestExecutionListener was done at all.

@trancexpress trancexpress force-pushed the gh4032 branch 5 times, most recently from 80b77bf to cc66009 Compare May 31, 2026 13:25
@trancexpress
Copy link
Copy Markdown
Contributor Author

Anything else from your side @HeikoKlare ? If not I'll merge this.

@HeikoKlare
Copy link
Copy Markdown
Contributor

Is it working as expected now? I would have expected some ... STARTING and ... DONE logging for the tests in org.eclipse.ui.tests, which I also get during local execution, e.g.:

!ENTRY org.eclipse.ui.tests.harness 1 0 2026-06-01 08:51:19.238
!MESSAGE JUnit Platform Suite STARTING

!ENTRY org.eclipse.ui.tests.harness 1 0 2026-06-01 08:51:19.242
!MESSAGE JUnit Platform Suite DONE: SUCCESSFUL

!ENTRY org.eclipse.ui.tests.harness 1 0 2026-06-01 08:51:19.243
!MESSAGE JUnit Vintage STARTING

!ENTRY org.eclipse.ui.tests.harness 1 0 2026-06-01 08:51:19.258
!MESSAGE MultipleWindowsTest STARTING

!ENTRY org.eclipse.ui.tests.harness 1 0 2026-06-01 08:51:19.264
!MESSAGE testIndependentWorkingSets STARTING

!ENTRY org.eclipse.ui.tests.harness 1 0 2026-06-01 08:51:20.068
!MESSAGE testIndependentWorkingSets DONE: SUCCESSFUL

But in the Jenkins and GHA logs for this PR, I do not find anything like that.

@trancexpress
Copy link
Copy Markdown
Contributor Author

Is it working as expected now? I would have expected some ... STARTING and ... DONE logging for the tests in org.eclipse.ui.tests, which I also get during local execution, e.g.:
[..]
But in the Jenkins and GHA logs for this PR, I do not find anything like that.

The start and end messages are logged in the workspace log, not printed to command line. I guess we can do both, if you require this, but the entries in the workspace log are the most useful for me. Its easy to tell what logged errors occurred during which test, which tracing belongs to which test and so on.

@HeikoKlare
Copy link
Copy Markdown
Contributor

I see. For me it's fine to not have verbose output to the command line for this. Do we have access to the workspace logs for GHA and Jenkins executions in PRs? I did not find those logs yet.

@trancexpress
Copy link
Copy Markdown
Contributor Author

I see. For me it's fine to not have verbose output to the command line for this. Do we have access to the workspace logs for GHA and Jenkins executions in PRs? I did not find those logs yet.

I don't know where the logs are for GH jobs.

I check the I-build ones (e.g. https://download.eclipse.org/eclipse/downloads/drops4/I20260531-1800/testresults/logs.html), if the starts and ends are missing in the first I-build with the change here, I'll check what is going wrong.

….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.

Additionally, usage of TestRunLogUtil.LOG_TESTRUN rule is removed,
since the new listener covers the rule functionality.

Fixes: eclipse-platform#4032
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