Skip to content

Missing run test Icon [No tests found in this file] #1805

Closed

Description

@Hatung69

I have been using VScode to Code Spring Boot for the past few weeks, before that I was running the test normally but now I can't find a way to run the test anymore?

I tried to create a new project but still no run test Button to click

Image

Activity

  1. github-actions commented on Nov 2, 2025

    @github-actions

    Hi Ha Tung (@Hatung69), 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.

    Suggestions to restore the Run Test icon and discover your Spring Boot tests:

    • Ensure the Java Test Runner extension is active
    – Run Developer: Show Running Extensions and look for vscjava.vscode-java-test. If it’s greyed-out or not running, completely uninstall (delete its folder under ~/.vscode/extensions/vscjava.vscode-java-test-*) and reinstall.
    Reference: microsoft/vscode-java-pack#948 (microsoft/vscode-java-pack#948 (comment))

    • Enable Java Tests in the Testing view
    – Open the TESTING sidebar. If you see “No tests have been found in this workspace yet,” click Enable Java Tests and reload.
    Reference: #1498 (#1498)

    • Verify project layout and dependencies
    – Test classes must live under src/test/java.
    – Make sure your pom.xml includes the JUnit 5 engine (e.g., via spring-boot-starter-test).

    • Restart the Java language server and check logs
    – Command Java: Restart Language Server, then open the Java Test Runner output channel for any errors.

    Other references with low confidence

    • microsoft/vscode-java#2297 – tests not discovered when testSourceDirectory isn’t set to src/test/java; ensures correct Maven layout (redhat-developer/vscode-java#2297)

    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!

  2. RaSoZaLu commented on Nov 2, 2025

    @RaSoZaLu

    I have the same problem. I updated Visual Studio Code and reinstalled the extensions. When I start it, I get the following message in the output window:

    [Error - 11:17:11] 02.11.2025, 11:17:09 FrameworkEvent ERROR
    org.osgi.framework.BundleException: Could not resolve module: com.microsoft.java.test.plugin [136]
    Unresolved requirement: Require-Bundle: org.objectweb.asm; bundle-version="[9.8.0,9.9.0)"

    at org.eclipse.osgi.container.Module.start(Module.java:495)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:2110)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:146)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2101)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2041)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:2003)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1915)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:341)
    
  3. CloudSen commented on Nov 2, 2025

    @CloudSen
    !ENTRY com.microsoft.java.test.plugin 4 0 2025-11-02 19:02:06.155
    !MESSAGE FrameworkEvent ERROR
    !STACK 0
    org.osgi.framework.BundleException: Could not resolve module: com.microsoft.java.test.plugin [126]
      Unresolved requirement: Require-Bundle: org.objectweb.asm; bundle-version="[9.8.0,9.9.0)"
    
    	at org.eclipse.osgi.container.Module.start(Module.java:495)
    	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:2110)
    	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:146)
    	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2101)
    	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2041)
    	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:2003)
    	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1915)
    	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:341)
    
  4. Akiko-QA commented on Nov 2, 2025

    @Akiko-QA

    HI
    I have kinda same issue and copilot said:
    In short, the reason is found: JDT Language Server does not load Test Runner / Jacoco bundles because you have a version conflict with the ASM library. The log shows:

    org.jacoco.core (in Test Runner) requires org.objectweb.asm ver "[9.8.0,9.9.0)"
    from the Red Hat extension redhat.java is set to asm 9.9.0 - 9.9.0 is no longer in the range (the upper limit is excluded), so Jacoco does not resolve → JDT LS crashes → tests are not detected in VS Code.

    I switched back to 1.46.0 for Red Hat and now i have a buttons but it's not working properly anyway i'm trying to figure it out T.T
    UPD: Yes it works with 1.46.0 fine i'm just dumb.

  5. RaSoZaLu commented on Nov 2, 2025

    @RaSoZaLu

    Thanks Akiko-QA, the workaround works.

  6. SuvabrataChowdhury commented on Nov 2, 2025

    @SuvabrataChowdhury

    It looks like this is similar to this issue,
    #1802

  7. Hatung69 commented on Nov 3, 2025

    @Hatung69
    Author

    Thank you, guys. So this problem is Red Hat version conflict. Try to update the extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions