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
Describe the bug
JUnit tests in a class in the default package cannot be executed with dap-java-run-test-method (or any of the dap test functions).
As far as I can tell this happens because the code assumes that test classes are always in a named package, and the fully qualified name for the class is computed with an starting dot.
As far as I could test, a small change in dap-java-test-class and dap-java-test-method-at-point might be enough:
To Reproduce
Run a JUnit test class/method in a class in the default (unnamed) package.
Expected behavior
The test is executed by JUnit.
Logs
lsp-workspace-command-execute: ‘workspace/executeCommand’ with ‘vscode.java.resolveClasspath’ failed.
(error "Failed to resolve classpath: Main class ’.CommandTest’ doesn’t exist in the workspace.")
lsp-java version
Version: 20230507.517
Commit: 961f1a1
emacs version
GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.5 (Build 21G72)) of 2023-05-16
The text was updated successfully, but these errors were encountered:
Describe the bug
JUnit tests in a class in the default package cannot be executed with
dap-java-run-test-method
(or any of the dap test functions).As far as I can tell this happens because the code assumes that test classes are always in a named package, and the fully qualified name for the class is computed with an starting dot.
As far as I could test, a small change in
dap-java-test-class
anddap-java-test-method-at-point
might be enough:To Reproduce
Run a JUnit test class/method in a class in the default (unnamed) package.
Expected behavior
The test is executed by JUnit.
Logs
lsp-workspace-command-execute: ‘workspace/executeCommand’ with ‘vscode.java.resolveClasspath’ failed.
(error "Failed to resolve classpath: Main class ’.CommandTest’ doesn’t exist in the workspace.")
lsp-java version
Version: 20230507.517
Commit: 961f1a1
emacs version
GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.5 (Build 21G72)) of 2023-05-16
The text was updated successfully, but these errors were encountered: