Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse Gradle JUnit Test Issue?(Eclipse Gradle JUnit Test Issue?)
Eclipse Gradle JUnit Test Issue? [message #1861563] Thu, 19 October 2023 05:07 Go to next message
Charlotte Filemdar is currently offline Charlotte FilemdarFriend
Messages: 4
Registered: October 2023
Junior Member
I am currently utilizing Eclipse Version: 2020-09 (4.17.0), Build id: 20200910-1200, in conjunction with Gradle 6.7. Employing 'gradle eclipse' to generate project files has led to an issue where selecting a package triggers an 'No tests found with test runner 'JUnit 5'' error message, whereas selecting an individual class successfully runs JUnit tests. Despite extensive troubleshooting, there is no pertinent debug output in the console or Eclipse log.

Given that this issue likely stems from the Gradle-generated project files, I am seeking guidance on debugging strategies for this specific scenario. Any insights or pointers would be immensely helpful.

Thank you.
Re: Eclipse Gradle JUnit Test Issue? [message #1861578 is a reply to message #1861563] Thu, 19 October 2023 16:49 Go to previous messageGo to next message
Erik BrangsFriend
Messages: 55
Registered: February 2010
Member
I remember seeing a similar message when migrating from JUnit 4 to JUnit 5. The reason was that I already had launch configurations for my JUnit tests and the launch configurations had the wrong JUnit library selected.

When you open the launch configuration that Eclipse uses for running all the tests in a package, is the correct JUnit library selected there? You should have a drop-down list near "Test runner" in the launch configuration. The name of the launch configuration should be contained in the error message.
Re: Eclipse Gradle JUnit Test Issue? [message #1861724 is a reply to message #1861563] Tue, 31 October 2023 07:57 Go to previous messageGo to next message
Charlotte Filemdar is currently offline Charlotte FilemdarFriend
Messages: 4
Registered: October 2023
Junior Member
To debug the Gradle-generated project files, you can try the following steps:

Delete the Gradle-generated project files and regenerate them. To do this, run the following command:
gradle cleanEclipse
gradle eclipse
Check the Gradle console output for any errors. If there are any errors, they may provide clues as to why the JUnit 5 test runner is not finding the tests.
Check the Eclipse log for any errors. The Eclipse log can be found by going to Window > Show View > Other > General > Log View.
Try running the tests with a different version of Eclipse. This can help you to determine if the issue is caused by a specific version of Eclipse.
Re: Eclipse Gradle JUnit Test Issue? [message #1861736 is a reply to message #1861724] Tue, 31 October 2023 15:53 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4507
Registered: July 2009
Senior Member

Charlotte, it's very odd to answer your own question in a way that looks AI-generated.

_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Tue, 31 October 2023 16:03]

Report message to a moderator

Previous Topic:Eclipse and JavaSDK Setup
Next Topic:Restricted Identifier Error in Eclipse when using Mockitos when
Goto Forum:
  


Current Time: Sat Jan 18 00:46:27 GMT 2025

Powered by FUDForum. Page generated in 0.03166 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top