regression: tests not detected
I'm not sure when it happened but sometime in the last weeks or possibly month https://github.com/jbangdev/jbang no longer gets its tests detected.
easy to reproduce, git clone https://github.com/jbangdev/jbang , open a test class and see that you can't run the tests from the UI anymore.
I could in past.
Any suggestions on how to pinpoint what causes the tests to not be found would be great :)
Hi @maxandersen, 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 pinpoint test-detection issues
- Open the Output panel (View → Output) and select Java Test to see the test-discovery logs. This often shows why tests aren’t picked up. (#1442)
- In your VS Code settings, set:
to get detailed discovery output. (#1442)"java.test.logLevel": "verbose" - Run Developer: Toggle Developer Tools (F1) and check the console for any errors from the Java Test extension.
- Use Java: Clean the Java language server workspace (via Command Palette) and reload the window, to rule out stale caches.
- Verify that JUnit (or your chosen test framework) and test dependencies are on the classpath (check your Gradle build file).
References with high confidence
- Update broke the extension (#1442) – describes where to find Java Test logs and how to enable verbose logging.
Other references with low confidence
- tests not detected (#4010) – reports a similar regression in test discovery after an update, though without a published solution.
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!
no java test found in output but it did make me retry/reinstall Cursor and Code and in Code the tests showsup, but not in Cursor until vscode shows them. Now i killed vscode and cursor seem to find them ... but lets see how long it will keep finding them :)
I verified i have the same plugins and versions installed from the Java extension pack - only diff is the AI extension only available on vscode but i assume that is not related.
Had the same issue today, I found that if I downgrade Language Support for Java by Red Hat from 1.47.0 to 1.46.0 the problem solved, but according to changelog 1.47.0 only released 9 hours ago, and your issue opened last week, so I don't know if it is relevant to yours.
Had the same issue today, I found that if I down grade Language Support for Java by Red Hat from 1.47.0 to 1.46.0 the problem solved, but according to changelog 1.47.0 only released 9 hours ago, and your issue opened last week, so I don't know if it is relevant to yours.
Thanks, this is the route cause, it saved me time.
@secf4ult Thanks, I wasted so much time because of this bug
Just some additional information, according to https://github.com/redhat-developer/vscode-java/issues/4225 it's already fixed by https://github.com/microsoft/vscode-java-test/pull/1798, but not released for now, you can use the binary the dev provided: https://github.com/redhat-developer/vscode-java/issues/4225#issuecomment-3472447349.
Had the same issue today, I found that if I downgrade Language Support for Java by Red Hat from 1.47.0 to 1.46.0 the problem solved, but according to changelog 1.47.0 only released 9 hours ago, and your issue opened last week, so I don't know if it is relevant to yours.
Thank you
Same problem, I downgrade to 1.46.0. It's works
I’ve experienced the same problem here, spent about 4 hours trying to solve, downgrading to 1.46.0 worked for me
I’ve experienced the same problem here, spent about 4 hours trying to solve, downgrading to 1.46.0 worked for me
Same with me. 1.46.0 works.
Had the same issue today, I found that if I downgrade Language Support for Java by Red Hat from 1.47.0 to 1.46.0 the problem solved, but according to changelog 1.47.0 only released 9 hours ago, and your issue opened last week, so I don't know if it is relevant to yours.
Thanks. Downgrading works for me as well.
@secf4ult You are an angel 😭, Thank u so much
@secf4ult Thanks, I've been pulling my hair out trying to work out what was wrong,
@secf4ult Thanks, this did save my day.
@
Had the same issue today, I found that if I downgrade Language Support for Java by Red Hat from 1.47.0 to 1.46.0 the problem solved, but according to changelog 1.47.0 only released 9 hours ago, and your issue opened last week, so I don't know if it is relevant to yours.
Big thanks! The downgrade solved my issue
I confirm this is the solution, lets hope they fix it
Had the same issue today, I found that if I downgrade Language Support for Java by Red Hat from 1.47.0 to 1.46.0 the problem solved, but according to changelog 1.47.0 only released 9 hours ago, and your issue opened last week, so I don't know if it is relevant to yours.
Yes same problem here, from version 1.47.0 the tests are not recognised anymore. This already happend few months ago, hopefully they solve it soon. I switched to 1.46.0 and the tests can be run as usual
@lollolg ~~latest version 0.43.2 should've fixed it.~~
Edit: looks like it breaks again.
I'm on 1.49.0 and the tests still cannot be seen