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
{{ message }}
Repository navigation
Testing view refreshes every time I run tests #1787
I have a gradle-based Java project, and it has been working fine. Recently it started refreshing the testing view every time a test run completes. It takes five or so seconds to load. It briefly shows the message that there are no tests, then the subtree containing the test I just ran, and then the entire test tree. It's very annoying :)
I saw it on the current version, and I also tried pre-release 0.43.2025040304 and saw it there too. This is vscode 1.103.1.
build.gradle:
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java application project to get you started.
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.8/userguide/building_java_projects.html in the Gradle documentation.
*/
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
id 'java'
}
repositories {
// Use Maven Central for resolving dependencies.
mavenLocal()
mavenCentral()
}
dependencies {
implementation 'com.microsoft.java:com.microsoft.java.debug.core:0.53.1'
// Use JUnit Jupiter for testing.
testImplementation('org.junit.jupiter:junit-jupiter:5.6.0')
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
application {
// Define the main class for the application.
mainClass = 'gradle.test.App'
}
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
This is being triggered by something during the build or by saving source files maybe? - if I have a compile error, the test doesn't run, but the tree refreshes anyway.
!ENTRY org.eclipse.osgi 4 0 2025-11-03 20:03:20.299
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563)
at org.eclipse.equinox.launcher.Main.run(Main.java:1415)
at org.eclipse.equinox.launcher.Main.main(Main.java:1387)
I was able to workaround the issue by changing the Java test profile of "Delegate Test to Gradle". I had never used that option before so something is broken in the default profile.
Hi Tim Kington (@TimKingtonFC), 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.
It isn’t currently possible to stop VS Code’s Java Test extension from fully rebuilding the Test Explorer tree after each run. Here are a few work-arounds and references:
• Disable auto-reveal of the Test Explorer when you run tests:
// in your settings.json"testing.autoReveal": false// built-in VS Code setting// or for Java Test specifically:"java.test.autoOpenTestView": false
• Run tests via the Gradle Tasks view (View → Terminal → Run Task → test) instead of the Test Explorer; that won’t trigger the Test Explorer’s full refresh.
• Keep an eye on the incremental-refresh work in the Java Test extension:
– Test runners interfere with Java language server (incremental refresh planned): #260 (comment)
Other references with low confidence
• After rerunning a test, previously opened report should refresh – requests a better refresh experience for the report: #132
• First time click to refresh Gradle Status will re-update the project – another full-refresh-on-click problem (Gradle extension): microsoft/vscode-gradle#943
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!
I have a similar (same?) issue. The testing UI glitches every time I run a test. I have to reload the window to fix it. I experience this issue on the latest version, 0.44.0. I also tried downgrading to 0.43.0 and 0.42.0 and have the same issue.
Edit
This seems to only happen with some projects but not all.
Activity
TimKingtonFC commentedon Aug 14, 2025
I looked at my settings.json, and I don't have any non-default settings related to testing except for golang.
TimKingtonFC commentedon Aug 14, 2025
This is being triggered by something during the build or by saving source files maybe? - if I have a compile error, the test doesn't run, but the tree refreshes anyway.
bluecontainer commentedon Nov 3, 2025
I am having the same issue for a gradle project and it also only recently started.
Version: 1.105.1 (user setup)
Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084
Date: 2025-10-14T22:33:36.618Z
Electron: 37.6.0
ElectronBuildId: 12502201
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100
Name: Test Runner for Java
Id: vscjava.vscode-java-test
Description: Run and debug JUnit or TestNG test cases.
Version: 0.43.2
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test
The only error logged that I can see is:
!SESSION 2025-11-03 20:03:19.345 -----------------------------------------------
eclipse.buildId=unknown
java.version=21.0.8
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: --pipe=/tmp/lsp-37cb961d130f50806ff5c5315981845e.sock
Command-line arguments: -data /home/vscode/.vscode-server/data/User/workspaceStorage/df6951322be6947d19296dfdc090c8e6/redhat.java/ss_ws --pipe=/tmp/lsp-37cb961d130f50806ff5c5315981845e.sock
!ENTRY org.eclipse.osgi 4 0 2025-11-03 20:03:20.299
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563)
at org.eclipse.equinox.launcher.Main.run(Main.java:1415)
at org.eclipse.equinox.launcher.Main.main(Main.java:1387)
bluecontainer commentedon Nov 4, 2025
I was able to workaround the issue by changing the Java test profile of "Delegate Test to Gradle". I had never used that option before so something is broken in the default profile.
github-actions commentedon Nov 13, 2025
Hi Tim Kington (@TimKingtonFC), 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.
It isn’t currently possible to stop VS Code’s Java Test extension from fully rebuilding the Test Explorer tree after each run. Here are a few work-arounds and references:
• Disable auto-reveal of the Test Explorer when you run tests:
• Run tests via the Gradle Tasks view (View → Terminal → Run Task → test) instead of the Test Explorer; that won’t trigger the Test Explorer’s full refresh.
• Keep an eye on the incremental-refresh work in the Java Test extension:
– Test runners interfere with Java language server (incremental refresh planned): #260 (comment)
Other references with low confidence
• After rerunning a test, previously opened report should refresh – requests a better refresh experience for the report: #132
• First time click to refresh Gradle Status will re-update the project – another full-refresh-on-click problem (Gradle extension): microsoft/vscode-gradle#943
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!
daniel-nagy commentedon Feb 9, 2026
I have a similar (same?) issue. The testing UI glitches every time I run a test. I have to reload the window to fix it. I experience this issue on the latest version, 0.44.0. I also tried downgrading to 0.43.0 and 0.42.0 and have the same issue.
Edit
This seems to only happen with some projects but not all.
wenytang-ms commentedon Mar 3, 2026
Hi Tim Kington (@TimKingtonFC) Daniel Nagy (@daniel-nagy) bluecontainer
we shipped a fix pre-release 0.44.2026030208 to vscjava.vscode-java-test, and the pre-release 3.17.2026022802 to Gradle for Java. please install these two bits and verify this issue. thanks!
daniel-nagy commentedon Mar 16, 2026
Hi wenyt (@wenytang-ms), I've updated to the prerelease version and the testing UI does appear to be stable now, thanks!
TimKingtonFC commentedon Mar 22, 2026
It looks like that fixed it. Thanks!