You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Netbeans 15 properly detects all gradle test sourcesets and code within them, but when attempting to run or debug any tests other than those within the default test sourceset ("test"), they fail, because currently the run/debug actions are hard coded to the cleanTest and test tasks, when it should be clean[NameOfTestSourceSet] and [nameOfTestSourceSet] for all sourceset (which includes the default test sourceset "test").
Try to run or debug the 'appHasAGreeting()' test method in the IntegAppTest.java file and it should fail (Green arrow)
The actual gradle command contains this: "check cleanIntegTest integTest --tests gradleproject1.IntegAppTest.appHasAGreeting", but IntegAppTest is not in the test (default) sourceset, so it will complain that it cannot find the method to run.
Manual steps to create the referenced repo:
Start up NetBeans 15
File... New Project... (Ctrl+Shift+N)
Select Java with Gradle
Select Java Application
Press [Next] button
Leave as default or put something sensible in for project name and location, then Press [Finish] button
Open the new project (if not already opened)
Edit the app/build.gradle file and apply the 'jvm-test-suite' plugin and add a new integTest JvmTestSuite
9, Copy AppTest.java into a new file into app/src/integTest/java/gradleproject1/IntegAppTest.java (and fix the classname)
10. Try to run or debug the 'appHasAGreeting()' test method in the IntegAppTest.java file and it should fail (Green arrow)
Custom test sourcesets have been possible in Gradle for almost a decade now, but the above is the quickest way to highlight the issue with NetBeans 15 and the version of Gradle that it defaults to (Gradle 7.5).
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows and Linux
JDK
OpenJDK Java 11/17
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
Yes
Code of Conduct
Yes
The text was updated successfully, but these errors were encountered:
Apache NetBeans version
Apache NetBeans 15
What happened
Netbeans 15 properly detects all gradle test sourcesets and code within them, but when attempting to run or debug any tests other than those within the default test sourceset ("test"), they fail, because currently the run/debug actions are hard coded to the cleanTest and test tasks, when it should be clean[NameOfTestSourceSet] and [nameOfTestSourceSet] for all sourceset (which includes the default test sourceset "test").
How to reproduce
The actual gradle command contains this: "check cleanIntegTest integTest --tests gradleproject1.IntegAppTest.appHasAGreeting", but IntegAppTest is not in the test (default) sourceset, so it will complain that it cannot find the method to run.
Manual steps to create the referenced repo:
9, Copy AppTest.java into a new file into app/src/integTest/java/gradleproject1/IntegAppTest.java (and fix the classname)
10. Try to run or debug the 'appHasAGreeting()' test method in the IntegAppTest.java file and it should fail (Green arrow)
Custom test sourcesets have been possible in Gradle for almost a decade now, but the above is the quickest way to highlight the issue with NetBeans 15 and the version of Gradle that it defaults to (Gradle 7.5).
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows and Linux
JDK
OpenJDK Java 11/17
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
Yes
Code of Conduct
Yes
The text was updated successfully, but these errors were encountered: