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

Making junit plugin using default test runner in case Spock testing framework is detected in classpath. #2838

Conversation

viktor-yengovatov
Copy link

No description provided.

… framework is detected in classpath.

Currently, when spock jar is in classpath, for example `spock-core-2.3-groovy-4.0.jar`, the IDE junit plugin detects PSI from the jar `org.junit.platform.engine.TestEngine` with value `org.spockframework.runtime.SpockEngine`. By that the IDE forces to use Junit5.

In case a project uses Spock with combination of Junit4 such detection logic makes junit4 test detection impossible when the tests are performed per package or project.

Withing the fix the IDE detects Spock and Junit4 tests simultaneously.
@BartvHelvert
Copy link
Member

Hi! Thanks for your patch, would you be able to add a test?

@viktor-yengovatov
Copy link
Author

Hi, sure. I am new in the community and would like to see and example for tests here. Also scope of what is testable outcome.

@BartvHelvert
Copy link
Member

Looking at it again, it seems like testing would be challenging here. I'll run your patch on CI, if there aren't any problems, it should be merged today. The fix will then be available starting from the next 2024.3 EAP.

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