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

Enable JUnit 5 test suite engine in tycho-surefire #2462 #3358

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented Jan 12, 2024

Currently, Tycho is not capable of running JUnit 5 test suites, since the required SuiteTestEngine is not provided while running tests.

This change adds the SuiteTestEngine to tycho-surefire executions using JUnit Platform 1.8 (the first with suite support) or newer. To this end, the SuiteTestEngine is always enabled when running JUnit 5 tests. It also adds a regression test for executing a test suite based on JUnit Jupiter 5.9.

I do not see any problems of simply making the SuiteTestEngine always available (other than the VintageTestEngine), but let me know if you think different. The problem when adding further fragments like junit59withvintage for when the suite API is on the classpath is the combinatorial complexity, as you would need junitX, junitXwithvintage, junitXwithsuite, junitXwithsuiteandvintage.

Fixes #2462
Closes #3342

@laeubi laeubi added the backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change label Jan 12, 2024
Currently, Tycho is not capable of running JUnit 5 test suites, since
the required SuiteTestEngine is not provided while running tests.

This change adds the SuiteTestEngine to tycho-surefire executions using
JUnit Platform 1.8 (the first with suite support) or newer. To this end,
the SuiteTestEngine is always enabled when running JUnit 5 tests. It
also adds a regression test for executing a test suite based on JUnit
Jupiter 5.9.

Fixes eclipse-tycho#2462
@HeikoKlare HeikoKlare marked this pull request as ready for review January 12, 2024 17:34
Copy link

Test Results

  579 files  ±0    579 suites  ±0   3h 25m 2s ⏱️ - 24m 2s
  383 tests +1    376 ✅ +1   7 💤 ±0  0 ❌ ±0 
1 149 runs  +3  1 127 ✅ +3  22 💤 ±0  0 ❌ ±0 

Results for commit a842a10. ± Comparison against base commit 178782d.

@laeubi laeubi requested a review from akurtakov January 14, 2024 18:18
Copy link
Member

@laeubi laeubi left a comment

Choose a reason for hiding this comment

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

@akurtakov It looks al sane to me, but as you have done the surefire parts in the past you probably want to take a second look.

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.

Change looks good to me.

@akurtakov akurtakov merged commit 82dd36b into eclipse-tycho:main Jan 15, 2024
10 checks passed
Copy link

💚 All backports created successfully

Status Branch Result
tycho-4.0.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@HeikoKlare
Copy link
Contributor Author

Thank you for reviewing and merging this so fast, @laeubi and @akurtakov!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JUnit 5 Test Suite not working - "No tests found"
3 participants