Run Test -> Delegate to Gradle does not work
Summary: Running a test case using "Delegate to Gradle" does not produce any test results. It doesn't look like the tests actually run.
Looks like this problem was reported as a VSCode bug some time ago, but was closed there as it was an extension issue. I followed the instructions in that issue and ran the extension bisect, which pointed to the Java Test Runner extension as the problem.
The problem can be reproduced with a default Gradle project by following the steps below.
Environment: macOS Sequoia 15.4 VSCode Version: 1.99.3 (Universal) Extensions:
- Extension Pack for Java Version 0.29.0
- Test Runner for Java Version 0.43.1
- Gradle for Java Version 3.16.4
Steps to Reproduce:
- Open VSCode
- Create a new Java Project
- Select a Gradle Project from the options
- Select Kotlin for the DSL (I suspect the problem will occur with Groovy as well)
- Specify a new folder for the project
- Open the project folder after it has been created.
- The project will have an AppTest.java automatically created with a single test case.
- Open the AppTest.java file.
- Run the test case from the gutter. This will use the Java Test Runner by default. This will succeed, and show up as a success under the test results tab.
- Now switch to the Testing view, and change the default test runner to "Delegate to Gradle"
- Re-run the test case from the gutter. This time there won't be any indication of the test succeeding or failing or even running in the test results tab.
Have you tried pre-release version of the Gradle extension?
I used the pre-release Version 3.17.2025040701 of the Gradle extension and that doesn't work either. As before, there is no information about the test succeeding/failing. I'm attaching a snapshot of the Test Runner output, The oldest test (at 4:17:02) is using the built in test runner and shows the test running and succeeding. When I delegate to Gradle, there is a run listed (at 4:17:16) which doesn't show the success/failure status, and I can't tell if it actually did anything else.
Not working for me either. Replication steps
- generate spring project, https://start.spring.io/
- open project in vscode
- go to tests, select test, Delegate To Gradle
I also have the same issue.
Hi @ssbusc1, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Here are some steps to get “Delegate to Gradle” working:
- Make sure you’re on the latest extensions (Test Runner for Java ≥ 0.44.0, Gradle for Java ≥ 3.16.4).
- In the Testing view, click the dropdown next to the Run button → Select Default Profile → check Delegate Test to Gradle.
- Or right-click on a test gutter icon → Execute Using Profile… → choose Delegate Test to Gradle → Run.
References:
- Issue #1436: instructions on enabling Gradle delegation via default profiles and one-off executions
https://github.com/microsoft/vscode-java-test/issues/1436#issuecomment-2268094468 - Issue #1045: tracking lack of VS Code support for Gradle test delegation
https://github.com/microsoft/vscode-java-test/issues/1045#issuecomment-676911725
If after updating and configuring you still see no test output, follow or comment on issue #1045 for progress on full support.
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!