Have been using Cursor for my Java Project on Mac. It updated to 2.0 automatically a day or two earlier and I realised today that I’m unable to run Unit tests from within Cursor.
I tried re-installing cursor (after deleting all extensions, removing project settings) but to no avail.
This may or may not be related to the latest update, but everything used to work fine till a day earlier.
Steps to Reproduce
On trying to run a test from the Project Explorer (by clicking a small triangle against the test class) - It just continues to show a message saying “Searching Tests…” (Source Debugger for Java).
On trying to run the test from Cmd - Shift - P > Java: Run Test; it says “No test found in this file”.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Hey, thanks for the report. This looks like an extension compatibility issue similar to others we’ve seen after the 2.0 update.
Cursor 2.0 runs on the VS Code engine 1.99.3, and the latest Java extension may require a newer engine. @dev_brklyn’s suggestion to downgrade the extension is the right approach.
If downgrading doesn’t help, I’ll pass this to the team.
Hey, Thanks a lot for your response. Yes downgrading the version of “Language Support for Java” resolved the problem for me. I’ve disabled the auto-update on this extension for now.
I completely un-installed cursor from my laptop and my project specific settings, re-installed cursor. Installed the “Extension Pack for Java” - The problem persisted. As recommended by @dev_brklyn, I then downgraded “Language Support for Java” extension to version 1.46.0 (4 weeks old version), cleaned java language server workspace and things came back to normal. I could run the tests again.
Problem: Play buttons do not appear above @Test annotated methods, and clicking “Run Java” in the top-right shows “No test found in this file.”
Expected Behavior: Play buttons () should appear in the gutter next to @Test methods to run/debug individual tests, similar to IntelliJ IDEA or VS Code with Java Extension Pack.
Actual Behavior:
No play buttons appear above @Test methods
TestNG annotations are recognized for syntax highlighting and code completion
Java Language Server activates successfully (“Java: Ready”)
Running “Java: Run Test” command shows “No test found in this file”
Project Details
Project Type: Gradle multi-module project (Gradle 8.1)
Language: Java 17
Test Framework: TestNG 7.8.0
Build Tool: Gradle with Kotlin DSL
Platform: macOS 15.6.1 (Apple Silicon)
Cursor Version: Latest
Project Structure:
automation-mobile-native-apps/├── build.gradle.kts├── settings.gradle.kts├── gradle/│ └── libs.versions.toml├── mobile-Tests/ # Test module│ ├── build.gradle.kts│ └── src/test/java/│ └── glassdoor/│ └── employerprofile/│ └── EmployerProfileCopilotTest.java└── mobilePages/ # Page object module └── build.gradle.kts
TestNG Dependency: TestNG is provided transitively through a custom internal library (mobileConfig) rather than declared directly:
// mobile-Tests/build.gradle.ktsdependencies { api(libs.bsh) api(projects.mobilePages) // mobilePages includes mobileConfig which provides TestNG transitively}// Verified TestNG is in classpath:// org.testng:testng:7.8.0 (via io.qameta.allure:allure-testng:2.20.0)
Test Configuration:
// mobile-Tests/build.gradle.ktstasks.named(“test”) { useTestNG() { useDefaultListeners = true // … additional configuration }}
Sample Test File: mobile-Tests/src/test/java/glassdoor/employerprofile/EmployerProfileCopilotTest.java
package glassdoor.employerprofile;import org.testng.annotations.Test;import testng.TestCaseId;public class EmployerProfileCopilotTest extends EmployerProfileCopilotBaseTest { @Test( description = “EP Copilot - Loading state”, groups = {“employerProfileCopilot”, “Android”, “iOS”, “P0”}) @TestCaseId(android = “MOBILE_T4461”, iOS = “MOBILE_T4453”) public void verifyLoadingStateOfCopilotBottomSheet() { // test code… }}
Installed Extensions Confirmed Installed:
Extension Pack for Java (v0.30.4)
Language Support for Java (Red Hat Java) - v1.48.2025110108
Test Runner for Java - v0.43.1
Debugger for Java - v0.58.2
Maven for Java - v0.44.0
Gradle for Java - v3.17.0
Project Manager for Java - v0.26.2
What We’ve Tried
Extension Management: Uninstalled and reinstalled Extension Pack for Java Cleared all extension caches:
~/Library/Application Support/Cursor/CachedExtensionVSIXs/.trash/
~/Library/Application Support/Cursor/User/globalStorage/redhat.java
~/Library/Application Support/Cursor/User/workspaceStorage/*/redhat.java Verified extensions are active and enabled
Java Language Server: Ran “Java: Clean Java Language Server Workspace” multiple times Selected “Restart and delete” Waited for “Java: Ready” status in the status bar Java Language Server successfully indexes the project
Steps to Reproduce
Open Cursor IDE on macOS (15.6.1, Apple Silicon)
Install Extensions:
Go to Extensions (⌘ + Shift + X)
Search for and install “Extension Pack for Java” by Microsoft
Wait for all extensions to install (Test Runner for Java, Language Support, etc.)
Open or Clone the Project:
Open a Gradle multi-module project with:
Java 17
TestNG 7.8.0 (as transitive dependency via custom library)
Gradle 8.1 with Kotlin DSL
Test files using @Test annotation from org.testng.annotations.Test
Wait for Java Language Server to Initialize:
Wait for “Java: Ready” or checkmark in status bar (bottom right)
Allow indexing to complete (can take 1-5 minutes)
Open a TestNG Test File:
Navigate to: mobile-Tests/src/test/java/glassdoor/employerprofile/EmployerProfileCopilotTest.java
Or any test file with @Test
Expected Behavior
Play Buttons in the Editor
Small play icons () should appear in the left gutter (margin) next to:
Each @Test annotated method
Each test class name
The @BeforeClass and @AfterClass methods should NOT have play buttons (these are setup/teardown, not tests)